GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — Fix pnpm YAML settings read by drifted readers (#1918) by mikolalysenko · Pull Request #1973 · SocketDev/socket-patch Conversation
|
| Reader | Test | Before |
|---|---|---|
yaml_top_level_value |
workspace::tests::yaml_top_level_value_decodes_yaml_quoting |
it''s |
governing_root lockfileDir |
workspace_lockfile_dir_reads_the_top_level_key |
../it''s |
.modules.yaml packageManager (version gate) |
version::tests::modules_yaml_pin_reads_the_last_key |
first key (9.0.0) |
.modules.yaml virtualStoreDir (crawler) |
npm_crawler::tests::modules_yaml_virtual_store_dir_uses_the_shared_reader |
.pnpm # default |
Plus workspace::tests::top_level_scalar_table (plain, comment, escapes, surrogates,
'', empty, unpaired quotes, malformed escape, block scalar, BOM, CRLF),
modules_yaml::tests::reads_json_and_yaml_records_alike,
guidance::tests::workspace_trust_plan_reads_the_last_key_as_yaml,
upstream::npm::tests::nested_settings_values_decode_yaml_quoting.
Local gates:
cargo fmt --all -- --check: okcargo clippy --workspace --all-features -- -D warnings: okcargo test --workspace --all-features --no-fail-fast: all pass except tests thatmain in this container (it runs as uid 0, so chmod-basedcopy_tree/vlt_heal/pypi_poetry/pypi_requirements write-failure tests,in_process_redirect x3, repair x2, e2e_bun_lockb x2 (live blob fetch, see Fix bun.lockb nightly e2e reaching the live blob API #1905).origin/main for the core and in_process_redirect ones.e2e_safety_pnpm --ignored (4 ok), e2e_redirect_pnpm_build --ignored --skip pnpm_pinned_matrix (11 ok, pnpm 10.28), scan_pnpm_relocated_store_cwd_e2e (41 ok),in_process_redirect_pnpm (23 ok).npm/, pypi/, gem/) change needed: they only dispatch to the binary.9 findings. Fixed: escaped-quote comment truncation, missing escapes / surrogate
pairs, registries:/yarn nested trim, trustLockfile first-key read, \u+041
accepted, block-scalar header read as value, pnpm_spec_version re-trim, the
version.rs one-line wrapper. Not fixed: ".modules.yaml parsed into a full JSON
tree per call": the callers already did that before this PR, so it's not a
regression, and caching the record is a separate perf change.
https://claude.ai/code/session_011f9aeRTcq7ezZiUt7xTkrb
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
The pnpm settings readers decode quoted values and duplicate keys differently depending on the caller (#1918). These tests pin the pnpm YAML reading: '' is one quote, an unpaired quote is kept, the last top-level key wins and a trailing comment is not the value. Assisted-by: Claude Code:claude-opus-5-5
A quoted value in pnpm-workspace.yaml, .yarnrc.yml or a YAML .modules.yaml was decoded differently depending on which feature read it: modulesDir: 'it''s' or lockfileDir: "a'" could resolve to different paths, and a duplicated packageManager key in .modules.yaml was read as the first value by one reader and the last by another (#1918). Every top-level settings scalar now goes through formats::pnpm::workspace::top_level_scalar, which decodes the value with the file's own YAML single/double-quote decoders (last key wins, unpaired quotes kept, empty kept as empty). .modules.yaml is read once, by formats::pnpm::modules_yaml::field, for the crawler's virtualStoreDir, the version gate and the redirect upstream. The three private unquote helpers are gone. Assisted-by: Claude Code:claude-opus-5-5
Review follow-ups for #1918: a double-quoted value with an escaped quote before " #" is no longer cut at the quote, YAML escapes (surrogate pairs, \x, \U, \b) decode as pnpm reads them and a malformed one is not guessed, a block scalar header is not read as the value, and the trustLockfile, registries and yarn nested readers use the same decoder instead of trimming quote characters. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fab9b08. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does Risk: low. Read-only parsing of settings files, no writes changed. The behaviour shifts only for odd inputs (quoted values with Look here
Verified
Changes I made: none Open questions: none. The lockfile-grammar unquotes are deliberately left for a follow-up, as the description says Auto-merge is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
[agent] Reviewed fab9b0815f88ab5e2ccf9aa2dff270f992ae1729. Checked shared YAML scalars, escapes, duplicate-key precedence and pnpm version/store/config readers. No major correctness issues found. Validation: source and regression-test review plus the available exact-head CI checks; no local test pass is claimed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Read pnpm YAML settings through one formats::pnpm scalar reader: three top-level-value readers drifted on quotes and empty values, and .modules.yaml is parsed twice
There was an error while loading. Please reload this page.