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 vendored rescans failing on unwired ledger entries (#541) by mikolalysenko · Pull Request #543 · SocketDev/socket-patch Conversation
|
| Issue scenario | Test | main | this PR |
|---|---|---|---|
bumped dep, vlt (real vlt): rescan exit 0 + warning, --prune reverts + exit 0, next run clean |
e2e_vendor_vlt_build::vlt_pinned_matrix_vendored_dependency_bumped_rescan |
FAIL (rescan: exit 1) |
PASS |
vlt uninstall, same assertions |
e2e_vendor_vlt_build::vlt_pinned_matrix_vendored_dependency_uninstalled_rescan |
FAIL (rescan: exit 1) |
PASS |
| npm package-lock uninstall: rescan exit 0 + warning | scan_vendor_e2e::scan_vendor_skips_ledger_entry_the_lock_no_longer_wires |
FAIL | PASS |
last dependency removed: rescan warns, --prune runs the vendored GC on an empty crawl, a drift-kept entry's repeat warning points at GC: kept |
scan_vendor_e2e::scan_vendor_prune_reconciles_unwired_entry_on_an_empty_crawl |
FAIL | PASS |
| supplement unit: bumped/uninstalled skipped; wired and lock-less entries kept | discovery::tests::ledger_supplement_skips_entries_the_lock_no_longer_wires, ..._keeps_wired_and_undecidable_entries |
FAIL with the filter disabled | PASS |
Test-harness notes:
vlt uninstall keeps a file: spec declared, and vlt install keeps the removed edge and node. socket-patch correctly keeps the entry there. I tested every supported release from 0.0.0-19 through rc.13, and those three are the only ones affected. The uninstall leg skips them under a new removed-dependency-stays-locked rule in docs/testing/vlt-compatibility.md, and the manifest is regenerated with check-vlt-legs.py --derive.cargo clippy --workspace --all-features -- -D warnings: clean.e2e_vendor_vlt_build through check-vlt-legs: clean on vlt 0.0.0-30, 0.0.0-32, rc.14 and 1.2.0 (34/34). The new legs also pass on 0.0.0-19 … 0.0.0-29, rc.1/5/9/13, rc.32 and 1.0.4.e2e_redirect_vlt_build 38/38, mode_migration_vlt 14/14, plus e2e_safety_vlt and e2e_vlt passing. scan_vendor_e2e passes 33/33.cargo test --workspace --all-features --no-fail-fast: 208 binaries pass. 12 tests in 4 binaries fail identically on origin/main, because the sandbox runs as root and their read-only-directory setups don't block writes. Those are covgap_commands_vendor (3), in_process_redirect (3), repair (2) and the socket-patch-core lib (4); this PR doesn't touch core.*_production vlt legs can't run in this sandbox (the CLI's TLS roots reject the proxy's CA), so CI covers them.cargo fmt --all -- --check reports drift in 127 files on origin/main itself, and CI doesn't run fmt. I left the repo's formatting as is.native (...) jobs fail one random cell per run against the live patch API, and the cell changes every time. This is the same flake PR Fix lock-only requirements.txt discovery (#412, #523) #530 cleared on a rerun; details are in the PR comments. I re-ran the failed jobs once.npm/, pypi/, gem/) changes are needed: they only dispatch to the binary.🤖 Generated with Claude Code
https://claude.ai/code/session_01VEgj84zEsgqYoVSqrt7CqJ
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 vendored scan re-added every vendor-ledger entry to discovery, even after the dependency was upgraded or uninstalled. The vendor step then tried to re-vendor a package the lockfile no longer has, so every rescan failed with exit 1, including the --prune run that reverts the stale entry (#541). Ledger entries are now filtered through the same lockfile in-use check the prune GC uses. Entries the lock no longer wires are skipped with a vendor_ledger_entry_unwired warning that points at --prune. When the crawl finds nothing, a --prune run still does the lock-based vendored half of GC, so the last removed dependency can be reverted. Assisted-by: Claude Code:claude-opus-5-5
Covers #541 with real vlt: after the vendored dependency is bumped or uninstalled, a plain vendored rescan exits 0 with a warning, --prune reverts the entry and exits 0, and the next run is clean. The harness's mock patch API now answers only for the purls a batch request asks about, as the production API does, so a bumped release is not offered the old release's patch. Assisted-by: Claude Code:claude-opus-5-5
Adds the npm package-lock regression test for #541 and documents the new vendor_ledger_entry_unwired warning and the empty-crawl vendored GC in CLI_CONTRACT.md. Assisted-by: Claude Code:claude-opus-5-5
On vlt 0.0.0-30 to 0.0.0-32 a dependency removed from package.json stays in the lock: vlt uninstall keeps its file: spec declared, and vlt install keeps the removed edge and node. socket-patch correctly keeps the vendored entry there, so the uninstall leg now skips those releases with a documented compatibility rule. The leg keeps a bystander dependency and re-locks by hand if vlt leaves the spec declared. A new mock npm test covers --prune reconciling an unwired entry when the crawl finds no packages. Assisted-by: Claude Code:claude-opus-5-5
|
[agent] On 27991ff, I ran every supported release from 0.0.0-19 through rc.13 locally, and only 0.0.0-30, 0.0.0-31 and 0.0.0-32 behave this way. 5d6bfb6 adds a Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] The PDM
Each failing job has exactly one FAIL out of 36–46 cells, and a different cell fails on every run. The 2.10.4 cell that failed on 27991ff passes on 5d6bfb6, and the two jobs that fail on 5d6bfb6 passed on 27991ff. Each failing cell ran 20–34s against the live patch API, while its sibling cells took about 5s. PR #530 hit the same pattern ( The code path rules this PR out as well. The new filter only drops entries that the lockfile in-use probe proves unwired, and that probe exists only for npm and cargo; it answers "keep" for every PyPI entry. Hosted runs have no vendor ledger at all. I'll re-run the failed jobs once when this run finishes. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
An npm entry whose lock entries were re-resolved since vendoring is drift-kept by scan --prune, so the vendor_ledger_entry_unwired warning came back on the next rescan while still suggesting only --prune. The warning now also names the way out of that case: restore the vendored dependency and run vendor --revert. 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.
There was an error while loading. Please reload this page.
The unwired-entry warning suggested restoring the dependency and running vendor --revert. That does not clear a drift-kept npm entry: reinstalling writes a fresh registry entry that still counts as drift, and vendor --revert reverts every ledger entry anyway. The warning now gives the remedy the drift-keep contract supports: restore the lockfile from before vendoring, run scan --prune again, then re-run the package manager's install. The purls move into parentheses so they no longer read as command arguments. The npm test follows those steps and checks that the warning is gone afterwards. 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.
There was an error while loading. Please reload this page.
The previous wording told users to restore the pre-vendor lockfile and prune again. That lock has no .socket/vendor paths, so the prune would revert every vendored entry, not just the stale ones. The warning now names only scan --prune. A prune that drift-keeps an entry already explains it on its own GC: kept line, so the warning points there instead of suggesting a lock edit whose reach it cannot bound. 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.
|
[agent] On 11934b9, 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 11934b9. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Reviewed No actionable correctness/security regressions found. Checked wired/unwired/unknown probe behavior, corrupt-ledger fallback, ecosystem filtering, and the empty-crawl GC lock/dry-run boundaries. Validation: |
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.
Vendored vlt scan exits 1 after the patched dependency is upgraded or uninstalled, and evenscan --prune exits 1 while it reverts the stale entry
There was an error while loading. Please reload this page.