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 modulesDir store being skipped (#661, #696) by mikolalysenko · Pull Request #698 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without fix | With fix |
|---|---|---|---|
| #661 | core test_pnpm_modules_dir_is_a_crawl_root (workspace yaml, quoted/commented yaml key, .npmrc, .modules.yaml probe) |
FAILED | ok |
| #661 | core test_pnpm_modules_dir_setting_resolution (workspace member, yaml beats .npmrc, out-of-project values refused) |
FAILED | ok |
| #661 | cli in_process_alternate_installers::pnpm_modules_dir_install_is_patched (yaml and .npmrc) |
FAILED (apply exit 0, file unpatched: the reported symptom) | ok |
| #661 | cli in_process_alternate_installers::pnpm_modules_dir_install_then_apply_patches_file (real pnpm install; skips if pnpm < 10.12) |
n/a (new real-toolchain leg) | ok on pnpm 10.28.0 |
| #696 | cli e2e_vex_redirect::pnpm_modules_dir_install_is_hash_verified_not_lockfile_attested |
FAILED (exit 0 attested) | ok: hash_mismatch, exit 1; patched copy attests; nothing installed attests |
| #696 | core test_pnpm_store_outside_project |
FAILED | ok |
| #696 | cli e2e_vex_redirect::pnpm_store_outside_project_is_not_lockfile_attested (GVS-style outside store, in-project store control, nothing-installed control) |
FAILED (exit 0 attested) | ok |
Local runs on Linux, Rust 1.93.1:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo fmt: the changed files are fmt-clean. main itself isn't fmt-clean under this toolchain and CI doesn't run fmt, so I left unrelated files untouched.cargo test --workspace --all-features --no-fail-fast: 9731 passed, 12 failed, 253 ignored. All 12 failures are write-failure / unremovable-file simulations that depend on chmod denying writes. This sandbox runs as root (uid 0), which bypasses that. The 4 core-lib ones (copy_tree::relax_loop_must_not_traverse_symlinked_root, vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry, pypi_poetry::wire_write_failure_maps_error_and_leaves_lock_untouched, pypi_requirements::wire_failure_rolls_back_already_written_files) fail identically on origin/main. The others are in covgap_commands_vendor, in_process_redirect and repair, none of which touch the npm crawler or the vex exemption. CI runs non-root.🤖 Generated with Claude Code
https://claude.ai/code/session_01JKwbXnQ94oRf1r94V1yupy
Note
Medium Risk
Changes npm discovery and hosted VEX attestation for pnpm layouts; incorrect handling could miss patches or over-attest, but behavior is narrowly scoped and heavily regression-tested.
Overview
Fixes pnpm modulesDir layouts (pnpm 10.12+ puts the virtual store under <modulesDir>/.pnpm with no node_modules). The npm crawler now treats configured modulesDir (pnpm-workspace.yaml / .npmrc) and child dirs with .modules.yaml as install roots, so agent apply patches those store copies instead of treating them as not installed (#661).
Hosted vex hash-checks installs under that layout. It also stops using lockfile-only attestation for pkg:npm/ when .modules.yaml records a virtualStoreDir outside the project (global virtual store or an escaping path), because transitive deps there are invisible to the crawler (#696). With nothing installed, lock-pin attestation is unchanged.
CLI_CONTRACT.md and CHANGELOG.md document the behavior; new unit and e2e tests cover crawl roots, setting resolution, apply, and vex outcomes.
Reviewed by Cursor Bugbot for commit f548ad0. Configure here.
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
pnpm 10.12+ with `modulesDir` set installs into `<modulesDir>/.pnpm` and leaves no node_modules, so agent apply skipped every package as "not installed" and exited 0 unpatched, and hosted vex attested not_affected over the unpatched install. The crawler now treats the configured modulesDir (pnpm-workspace.yaml or .npmrc), or a project dir holding pnpm's .modules.yaml, as an install root. Hosted vex also stops excusing a missing npm package as "nothing installed" when pnpm keeps the installed virtual store outside the project (global virtual store, or a virtualStoreDir that climbs out), since transitive deps there are invisible to the crawler. Fixes #661, #696. Assisted-by: Claude Code:claude-opus-5-5
Adds a real-pnpm leg that installs with `modulesDir: deps` and checks agent apply patches the `deps/.pnpm` store copy, and records the new behavior in CLI_CONTRACT.md and the CHANGELOG. 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 f548ad0. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Ready for review at head
Slack announcement not sent this run (Slack send tool unavailable). Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Resolves conflicts with main's npm alias (#738), first-party link (#634) and pnpm store (#698) changes: - CLI_CONTRACT.md: keep main's hosted row and this PR's agent row. - vex_consumed.rs: drop aliases the installed lookup already found (main), then store-expand only the new ones (this PR), so already expanded copies are not scanned again. - Tests: keep both sides' new multicopy and e2e_vex regressions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0174mrknEY9ge42c94RNRRBx
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Hosted pnpm vex attests not_affected over an unpatched install when pnpm'smodulesDir is set (pnpm 10.12+), because the missed install is treated as "nothing installed"
Agent mode ignores pnpm's modulesDir: on pnpm 10.12+ every installed package is "not installed", and apply exits 0 leaving it unpatched
There was an error while loading. Please reload this page.