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 Bun and vlt stray member locks skipping refusal (#1101, #1134) by mikolalysenko · Pull Request #1161 · SocketDev/socket-patch Conversation
|
| Issue | Test | Red → green |
|---|---|---|
| #1101 | hosted::governing_root::tests::bun_member_with_stray_bun_lock_is_refused (all 4 text/binary mixes, plus the shortcut cases) |
✔ |
| #1134 | hosted::governing_root::tests::vlt_member_with_stray_vlt_lock_is_refused (vlt.json workspaces and the package.json fallback) |
✔ |
| #1101, #1134 | vendor::npm_flavor::tests::bun_and_vlt_members_with_stray_lock_are_refused (engine + Bun/vlt takeover preflights, nothing written) |
✔ |
| #1101, #1134 (+#1094) | vex::discover::member_stray_lock_tests::a_member_lock_its_manager_ignores_attests_nothing |
✔ |
| #1101, #1134 | CLI in_process_redirect_pnpm::hosted_scan_from_bun_or_vlt_member_with_stray_lock_refuses (scan and get, 5 layouts) |
✔ |
The existing vlt_workspace_member_is_refused assertion "a member with its own lock is its own root" now also needs the member's own vlt.json, which is the case #1134 is about.
Local runs:
cargo clippy --workspace --all-features -- -D warnings: clean.rustfmt --check on every file this PR touches: clean. cargo fmt --all -- --check reports drift that already exists on main in untouched files; CI does not run fmt, and this PR leaves those files alone.cargo test --workspace --all-features --no-fail-fast: 11,645 passed, 13 failed. All 13 are environment-only and fail the same way without this change. 12 use chmod to make a path unwritable or unremovable, which root (the sandbox user) ignores. pipenv_hosted_to_vendored_names_the_unpatched_requirements needs pypi.org, which the sandbox network blocks.--include-ignored, SOCKET_PATCH_BUN_E2E_REQUIRED=1): e2e_redirect_bun_build 35/35, e2e_vendor_bun_build 37/37, mode_migration_bun 33/33.left-pad from npmjs, which the sandbox blocks. CI's vlt legs cover them.No wrapper (npm/, pypi/, gem/) changes are needed; this is core refusal and discovery logic.
🤖 Generated with Claude Code
https://claude.ai/code/session_0118z8gCQpYXnzeeinQdsTEp
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
A workspace member that still held its own package-lock.json or npm-shrinkwrap.json skipped the workspace-member refusal. npm never reads a lock inside a member: it installs every member from the workspace root's lock. So hosted scan/get pinned the ignored member lock and vendored mode vendored into it. Both exited 0 while npm kept installing the unpatched package. Hosted scan/get from such a member now refuse with redirect_workspace_lockfile_elsewhere, naming the root lock and the ignored member lock. Vendored refuses with vendor_lockfile_missing, as it does for a member with no lock. A member that also holds a lock its own manager reads (pnpm, yarn, Bun, vlt, Rush), or a workspace root with no npm lock, keeps the own-lock shortcut. Fixes #1094 (hosted and vendored legs) Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
…stray-lock # Conflicts: # crates/socket-patch-cli/CLI_CONTRACT.md # crates/socket-patch-core/src/hosted/governing_root.rs
A vendored run from an npm workspace member with a stray lock refused only inside the vendor backend, after the hosted-to-vendored takeover had already restored a leftover hosted pin. The takeover preflight now raises the same vendor_lockfile_missing refusal first, so nothing is reverted. The hosted and vendored messages no longer suggest deleting the stray lock: the directory is still a listed workspace member, so it would be refused again. Both name the workspace root to run from. Refs #1094 Assisted-by: Claude Code:claude-opus-5-5
main replaced the hosted lock-name lists with NpmLockFamily. The stray member-lock check now reads npm's own locks and the other families' locks from that table instead of the removed constants. Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
106ff87 to
58834ec
Compare
A Bun or vlt workspace member that still holds its own bun.lock, bun.lockb or vlt-lock.json (typically left behind when the package moved into the monorepo) skipped the workspace-member refusal. Bun and vlt never read that lock: they install the member from the root lock. Hosted and vendored scans then pinned or vendored a lock nothing installs from and reported success, and vex from the member attested not_affected. The npm-only check from #1094 now covers every manager that ignores a member lock. Hosted runs refuse with redirect_workspace_lockfile_elsewhere, vendored runs and the takeover preflights refuse with vendor_lockfile_missing, and vex discovery reads the ignored lock as absent, naming it in one diagnostic. Fixes #1101, #1134. Assisted-by: Claude Code:claude-opus-5-5
Regression tests for #1101 and #1134 at every layer the fix touches: the vendored engine and the Bun and vlt takeover preflights refuse a member holding a stray bun.lock, bun.lockb or vlt-lock.json; vex discovery from such a member reads the ignored lock as absent and names it in one warning; and hosted scan and get from the member refuse, leaving both locks untouched. CLI_CONTRACT documents the Bun and vlt cases next to the npm one. Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Takes main's squash of #1095 and keeps only this branch's Bun and vlt changes on top. Also drops the unrelated reformatting an earlier commit picked up from a workspace-wide cargo fmt. 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The refusal names the workspace root as the walk resolves it, which is canonical: a \\?\ prefix on Windows, /private on macOS. The test now compares against the canonical root, so the Windows test leg passes. 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…y-bun-vlt-lock # Conflicts: # crates/socket-patch-cli/CLI_CONTRACT.md
main (#1027) changed the --json top-level error to a {code, message} object. CLI_CONTRACT.md now uses main's `error.code` rows with this branch's Bun/vlt sentence, and the new CLI test reads error.message. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0118z8gCQpYXnzeeinQdsTEp
…ock' Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0118z8gCQpYXnzeeinQdsTEp
|
bugbot run 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
main (#1058) dropped DiscoverCtx::root, which broke the merge-queue build of this branch. The check now gets the root from disk_root_reading and declares the project files it reads (member_stray_lock_own_files). A read recording therefore stays usable, and an npm-only discovery still reads only through the view. The ancestors it walks are above the project, which no overlay of the project's files changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0118z8gCQpYXnzeeinQdsTEp
|
BugBot review 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[final reviewer] Tanmay Singla (@Tanmay182003) One non-merge commit landed after your approval on
Everything else since your approval is merges from main. CI on Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Still Ready for review, now at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: this PR conflicts with main ( Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
CLI_CONTRACT.md conflict: this branch changed the redirect_pnpm_lockfile_elsewhere / redirect_workspace_lockfile_elsewhere row and main changed the redirect_pnpm_settings_elsewhere row next to it. The merge keeps both changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0118z8gCQpYXnzeeinQdsTEp
|
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 09af6d7. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review (burn-down agent).
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.
Hosted and vendored scans from a vlt workspace member with a stray vlt-lock.json write to that lock, which vlt ignores, and exit 0 (vendored VEX then attests not_affected whilevlt ci fails)
Hosted and vendored scans from a Bun workspace member with a stray bun.lock / bun.lockb pin that ignored lock, exit 0, and lock-only VEX attests not_affected while Bun installs the unpatched package
There was an error while loading. Please reload this page.