Repository navigation
Fix vlt hints that point to vendored mode (#1601) - #1677
Conversation
Assisted-by: Claude Code:claude-opus-5-5
A hosted vlt scan that skipped a package resolved from a named or scoped registry told users to "use --mode vendored or agent mode". Vendored mode refuses those same nodes, so following the hint failed with vendor_lock_entry_unsupported and left the package unpatched. When the lock had only such nodes, the scan also warned redirect_vlt_entry_not_found and said to run `vlt install`, which can never add a default-registry node for that package. The hosted warning now names agent mode only, the duplicate entry_not_found warning is dropped when every instance is foreign, and the vendored refusal names agent mode as the way out. Fixes #1601 Assisted-by: Claude Code:claude-opus-5-5
Review follow-up. A lock whose only nodes install the package from git, a remote tarball or a local folder still got the "run `vlt install` first" hint beside the agent-mode warning; it now gets the agent-mode warning alone, like the foreign-registry case. A vendored node beside a foreign one keeps its redirect_vlt_entry_vendored remedy. The skip warning now names the plain name@version, not just vlt's encoded node ids, and the contract rows say when the warning stands in for redirect_vlt_entry_not_found. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ 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 16ba65b. Configure here.
|
Ready for review at Reviewer focus: the reworded skip hints for vlt packages from a non-default registry ( Slack announcement could not be sent in this run (no Slack send tool available); the next run should retry. Generated by Claude Code |
|
Ready for review at Reviewer focus: the reworded hosted-vlt skip hints for packages from a non-default registry, which no longer point to vendored mode or Generated by Claude Code |
Final review briefWhat it does. In a vlt project, a hosted scan that skips a package from a named or scoped registry (or from git or a tarball) used to say "use --mode vendored or agent mode". If those were the package's only nodes, it also said "run Risk: low. Only warning text and which warnings are emitted change. Edits, the refused set and the foreign set are unchanged, and nothing else keys on the Look here
Verified
Changes I made. None. Open questions. None blocking. The PR description notes a known leftover: a foreign-only dep whose grant has no sha512 also gets Auto-merge (squash) is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Fixes #1601
Summary
In a vlt project, a hosted scan that skipped a package from a named or scoped registry told users to "use --mode vendored or agent mode". Vendored mode refuses those same nodes with
vendor_lock_entry_unsupported, so a user (or a CI script) following the hint got a failed run and the package stayed unpatched. When those were the package's only nodes, the scan also warnedredirect_vlt_entry_not_found("runvlt installfirst"). That can never work: reinstalling can't move a scoped or aliased package onto the default registry.Root cause
rewrite_depinpatch/redirect/vlt.rsproduced the skip warning text, and thedefaults.is_empty()branch then producedentry_not_found. Neither one considered that vendored mode (vendor/vlt_lock.rs) refuses every non-default-registry instance, or that a skip warning had already been emitted.Fix
redirect_vlt_custom_registry_skippednow says "use agent mode", and it names the plainname@versionbeside vlt's encoded node ids.entry_not_foundfollows the skip warning. A vendored node still getsredirect_vlt_entry_vendored, which keeps its own remedy.CLI_CONTRACT.mdrows and the vlt coverage map are updated. The golden fixtureredirect/npm/vlt/custom-registry-skippeddrops the old duplicateentry_not_found.Tests (red → green)
~acme~left-pad@1.3.0)patch::redirect::vlt::tests::a_foreign_only_package_points_to_agent_mode_alonecustom_registry_skipped+entry_not_found)~http_c++…+~@sc+sp@1.3.0, from the follow-up comment)in_process_redirectvlt::scan_redirect_vlt_foreign_only_instance_points_to_agent_modevendor::vlt_lock::tests::target_analysis_refusalsLocal runs:
cargo fmt --all -- --checkandcargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-cli --all-features --lib: 930 ok.Core lib: 6680 ok and 4 failed. All core integration binaries pass, including
redirect_golden.in_process_redirect: 147 ok and 3 failed.mode_migration_vlt: 27 ok.python3 -m unittest scripts/tests/test_vlt_coverage.py: ok.Every failure (4 core, 3
in_process_redirect) is a permission-injection test that also fails onmainin this sandbox, because it runs as root:copy_treerelax_loop,vlt_healunremovable lock, and the poetry/requirements wire-write testsin_process_redirect: the two write-failure tests andvlt_healinvalidationNone of them touches this change.
I didn't run the real-vlt e2e (
e2e_redirect_vlt_build) locally. Its foreign-registry legs only assert that the warning code is present, which hasn't changed. It passed in CI.CI on 16ba65b: every check passed or was skipped, including
ci-ok,coverageand the vlt e2e. Bugbot reviewed 16ba65b and found no issues./code-review high
Fixed in 16ba65b:
vlt installhintentry_vendoredentry_not_foundrow didn't mention the exceptionNot changed:
redirect_vlt_missing_sha512("retry later"). Moving the skip ahead of that check would change which deps are marked refused (and so never confirmed by a sibling lock). That's a bigger semantic change than this fix needs, and a grant without a sha512 is rare.Generated by Claude Code