Repository navigation
Fix vendor plan granting vlt-refused packages (#1909) - #1947
Mikola Lysenko (mikolalysenko) merged 4 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
`vendor` fetches service downloads ahead of its main loop, and decided which packages to fetch with its own copy of the loop's candidate checks. That copy never saw the vlt preflight's refusals, so in a vlt project a package the loop refuses (a store copy with bundleDependencies or build steps, a gitignored vendor dir, a route refusal) was still granted a download, which can start a server-side build and counts against quota. Both now judge each candidate through one CandidateGates::judge (skip, ambiguous variant, Bun/vlt/linked-dir refusal, or vendor), and the candidate walk over release-variant groups is shared too. The `.socket/vendor/.uninstalled` stand-in path is one constant. Fixes #1909 Assisted-by: Claude Code:claude-opus-5-5
The variant plan test builds its gates through the same helper as the other plan tests, and the helper takes the refused set instead of leaking an empty one. Assisted-by: Claude Code:claude-opus-5-5
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 539f228. Configure here.
|
[burn-down agent] Ready for review at
Generated by Claude Code |
Final review briefWhat it does: Fixes #1909. Risk: low. This is an extraction inside one file. The checks run in the same order with the same error codes and details. The only behavior change is the intended one: the plan now leaves out vlt-refused candidates. Ambiguous candidates are now added to Look here:
Verified:
Changes I made: None. Open questions: None.
Auto-merge is armed: approving sends this straight to the merge queue. Generated by Claude Code |
Wenxin Jiang (Wenxin-Jiang)
left a comment
There was a problem hiding this comment.
[agent] Reviewed 539f228141aa937e428b9504eb6bbaea36131bf6. Checked shared candidate gates through vendor execution and service planning, variant ambiguity and vlt refusal ordering. No major correctness issues found. Validation: source and regression-test review plus the available exact-head CI checks; no local test pass is claimed.
LLM Description written by Claude Code:claude-opus-5-5
Fixes #1909
Summary
vendorfetches service downloads ahead of its main loop (plan_service_downloads), and decided which packages to plan with a hand-written copy of the loop's candidate checks. That copy drifted. It never saw the vlt preflight's refusals, so in a vlt project a package the loop refuses still got a download grant. A grant can start a server-side build and counts against quota. Refused cases include a store copy withbundleDependenciesor build steps, a gitignored vendor dir, a member stray lock, or a route refusal.Root cause
The candidate walk (fanning release-variant base purls out to their qualified records, once per base) and the per-candidate gates (ledger-entry-missing refusal, installed-variant probe, superseded-install stand-in, ambiguous variants, Bun refusal, vlt refusal, linked vendor dir) were written twice. They were written once in the loop and once in the plan, and only the loop's copy got the vlt refusal and the
vendor_variant_ambiguousoutcome.Change (
vendor.rsonly)candidate_groupsis the one candidate walk, used by both the plan and the loop.CandidateGates::judgereturns oneCandidateVerdictper candidate:Skip,Ambiguous,Refuse { code, detail }orVendor { record, superseded }. The loop rendersAmbiguous/Refuseexactly as before (same codes, details andmatched/fetch_failedbookkeeping). The plan keeps onlyVendorverdicts.UNINSTALLED_RELreplaces four spellings of.socket/vendor/.uninstalled.fetch_failedafter the loop. Nothing readsfetch_failedin between, so the end result is the same.Test evidence
Regression test
plan_gate_tests::the_plan_leaves_out_a_package_the_vlt_preflight_refuses: a vlt project (vlt-lock.json+ store copy) whose storepackage.jsongainsbundleDependencies.vlt_vendor_preflight_pairsrefuses it withvendor_bundled_deps_unsupportedand the plan must not include it.the vlt-refused package is never planned(the plan returned the uuid).Local runs on 539f228:
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test -p socket-patch-cli --lib commands::vendor: 75 passedcargo test --workspace --all-features --no-fail-fast: 236 targets OK. 13 failures in 4 targets, all environmental and outside this diff. 11 are permission-failure tests that cannot fail as root (the sandbox runs as uid 0): corecopy_tree/vlt_heal/pypi_poetry/pypi_requirements,in_process_redirect,repair. 2 aree2e_bun_lockbtests that reach the live patch API (no network here; see Fix bun.lockb nightly e2e reaching the live blob API #1905).--include-ignorede2e:e2e_vendor_npm_build43/43,e2e_vendor_pypi_build57/57,e2e_vendor_bun_build40/40,e2e_vendor_vlt_build66/66 (vlt binary absent, so the real-vlt legs self-skip),e2e_vendor_gem_build46/46.Per-issue checklist
the_plan_leaves_out_a_package_the_vlt_preflight_refuses); ambiguous variants handled by the same verdict (the_plan_follows_the_ledger_pick_of_an_uninstalled_variant_group,variant_probetests unchanged and green);const UNINSTALLED_RELadded./code-review high findings not fixed here
takeover_dry_refusal) is passedpkg_source, not the superseded stand-in. This is pre-existing on main (unchanged line) and a separate behaviour question, so it's left for a follow-up.judgestill hashes a representative file in both the plan and the loop. Main already did this, so this PR doesn't add the cost.Related, not in scope: #1839 (one Bun + vlt refusal map across every vendored caller).
https://claude.ai/code/session_011f9aeS19dxVdN1MB6299Hy
Generated by Claude Code