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 vlt 1.4 pnpm-workspace.yaml members (#1564) by mikolalysenko · Pull Request #1574 · SocketDev/socket-patch Conversation
|
| Issue shape | Test | Red on main |
|---|---|---|
#1564 hosted, no member lock (#942 shape) and stray member lock (#1134 shape), root with and without vlt.json |
hosted::governing_root::tests::vlt_pnpm_workspace_yaml_member_is_refused |
yes, not refused |
#1564 version gate and precedence: 1.4 lock refuses; 1.3.8 lock, empty lock, never installed, package.json workspaces (incl. []), vlt.json workspaces, ! in the yaml and unlisted dir don't; unreadable lock refuses |
hosted::governing_root::tests::vlt_pnpm_workspace_yaml_reads_the_root_lock |
yes, 1.4 lock not refused |
#1564 vendored stray lock → vendor_lockfile_missing, nothing written |
vendor::npm_flavor::tests::bun_and_vlt_members_with_stray_lock_are_refused (new case) |
yes, vendor_lock_entry_not_found |
| #1564 VEX: stray member lock attests nothing | vex::discover::member_stray_lock_tests::a_member_lock_its_manager_ignores_attests_nothing (new case) |
yes, pin attested |
Review finding: uninstalled inner pnpm-workspace.yaml doesn't hide the outer vlt.json root |
hosted::governing_root::tests::vlt_uninstalled_pnpm_workspace_yaml_walks_on |
passes on main; failed on the first fix commit |
Commands run locally (Linux, as root):
cargo fmt --all -- --check: okcargo clippy --workspace --all-features -- -D warnings: okcargo test --workspace --all-features --lib: 7,435 passed. The 4 failures are environment-only write-failure tests that can't fail as root (vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry, copy_tree::relax_loop_must_not_traverse_symlinked_root, pypi_poetry::wire_write_failure_maps_error_and_leaves_lock_untouched, pypi_requirements::wire_failure_rolls_back_already_written_files). They fail identically on main.in_process_redirect, in_process_vendor, in_process_rollback_hosted, in_process_vendor_bun_takeover, e2e_vex, e2e_vex_redirect, redirect_golden, vlt_locks: all pass except 3 root-only write-failure tests in in_process_redirect (partial_lockfile_write_failure_exits_1_and_writes_no_ledger, redirect_json_mode_write_failures_emit_error_envelope, vlt::scan_redirect_vlt_heal_invalidation_failure_warns), which also fail on main as root. The sandbox disk can't hold every test binary of the full cargo test --workspace, so CI runs the rest (non-root).npm/, pypi/, gem/) only dispatch to the binary and need no change.vlt.json. A member with no dependency has no edge of its own but is still a member. An unreadable root lock keeps the refusing side, matching vlt_lists_member (Hosted and vendored scans from a vlt workspace member with a stray vlt-lock.json still write to that lock and exit 0 when the root's workspaces glob uses an extglob (packages/+(a|b), packages/@(a|b)); vendored VEX then attests not_affected #1542): vlt can't install from that lock either.package.json workspaces: null / {nohoist: [...]} suppresses the yaml. This matches vlt. resolveWSConfig falls back to pnpm-workspace.yaml only when workspaces === undefined, and asManifestWSConfig returns {} for an object without packages. So vlt reads no members there either.pnpm-workspace.yaml per ancestor, and reads package.json only where a yaml exists. That is one stat for each ancestor without a yaml, the same cost as the existing vlt.json probe. Left as is.🤖 Generated with Claude Code
https://claude.ai/code/session_01P3dvgTvNF8SCp2PAoebdaA
Note
Medium Risk
Changes governing-root detection for npm-family workspaces (hosted, vendored, VEX); wrong classification could refuse valid runs or allow silent no-ops, but behavior is heavily tested and mirrors vlt 1.4 precedence.
Overview
vlt 1.4 can treat pnpm-workspace.yaml packages: as the workspace member list when neither vlt.json nor package.json defines workspaces. This PR teaches socket-patch to recognize those members so it no longer pins or vendors a member lock while vlt installs from the root vlt-lock.json.
Hosted runs from such a member now fail closed with redirect_workspace_lockfile_elsewhere, naming pnpm-workspace.yaml and the root. Vendored runs with a stray member vlt-lock.json get vendor_lockfile_missing. VEX treats the stray lock as absent (no false not_affected). Logic lives in vlt_workspace_groups / vlt_workspace_root, with precedence matching vlt (vlt.json → package.json field presence → yaml) and a lock edge gate so vlt ≤1.3 (which ignores the yaml) still allows patching the member unless the root lock shows vlt 1.4 installed from listed dirs.
Docs add a short vlt “Workspace members” note; tests cover refusal, version/precedence edge cases, and nested uninstalled inner yaml.
Reviewed by Cursor Bugbot for commit 3608d88. 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
vlt 1.4 installs a member listed by the root pnpm-workspace.yaml packages: from the root vlt-lock.json when neither vlt.json nor package.json declares workspaces. These tests show hosted, vendored and VEX runs from such a member treating it as its own project, and pin the vlt 1.3.8 and precedence controls that must stay as they are. Assisted-by: Claude Code:claude-opus-5-5
vlt 1.4 lists workspace members from the root pnpm-workspace.yaml packages: when neither vlt.json nor package.json declares workspaces, and installs them from the root vlt-lock.json. socket-patch read only the first two sources, so hosted and vendored scans from such a member rewrote a lock vlt never reads and exited 0, and vendored VEX attested not_affected while vlt installed the unpatched package. The vlt root lookup now reads the third source. vlt 1.3.8 and older ignore the file, so its directories count as members only when the root lock has an edge from one of them, which only vlt 1.4 writes. Hosted, vendored and VEX runs share the lookup. Fixes #1564 Assisted-by: Claude Code:claude-opus-5-5
A pnpm-workspace.yaml with no vlt-lock.json beside it, such as a vendored pnpm sub-monorepo, is not shown to be vlt's, so it no longer stops the search for an outer vlt.json root that installs the member. Also shares one helper for vlt's per-group glob check and fixes the refusal code's doc. 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 3608d88. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: labeled Ready for review at head
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does. vlt 1.4 can read a workspace's members from Risk: low–medium. It only adds refusals, and only when the root has a Look here
Verified
Changes I made: none. Open questions: none blocking. vlt 1.4.0 isn't in the real-vlt CI matrix yet; the PR says that is a separate change. Auto-merge is armed (squash), 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 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.
vlt 1.4.0 reads workspaces from pnpm-workspace.yaml, so the #942 / #1134 member refusals miss those members: hosted and vendored scans write a stray member lock and exit 0, and vendored VEX attests not_affected
There was an error while loading. Please reload this page.