Repository navigation
Delete the dead hosted-vlt redirect-ledger helpers (#782) - #1141
Mikola Lysenko (mikolalysenko) merged 3 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The v5 consolidation stopped writing the hosted redirect ledger, so the vlt helpers that merged and healed from it lost every production caller: edit_dep_id, lock_node_ids, carried_pin_original, carried_pin_ids, carried_pin_lines, same_slots, recorded, claims_key and vlt_heal::ledger_targets. They read as if hosted vlt still heals from that ledger, which misleads work on hosted rollback. The rollback heal goes through lock_targets only. read_project_file is only called from tests; gate it with cfg(test) so it no longer ships in release builds. No behavior change. Refs #782. Assisted-by: Claude Code:claude-opus-5-5
With ledger_targets gone, lock_targets is the only source of vlt heal targets, and it had no unit test of its own. Cover peer contexts, the slot [0] flags, the purl filter and the absent record, which the deleted ledger_targets tests used to exercise. Refs #782. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
|
[agent] Generated by Claude Code |
|
bugbot run 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 948939c. Configure here.
|
Burn-down agent: labeled Ready for review at 948939c.
Generated by Claude Code |
Resolve conflicts with #1031 (scan --apply/--vendor, get --no-apply and download/gc alias removal): - docs/migrating-to-v5.md: keep both removal tables' rows (#1031's spellings plus --download-mode/SOCKET_DOWNLOAD_MODE) and the blobs-only archive note. - CLI_CONTRACT.md: keep the --download-mode removal paragraph, take main's --mode agent/vendored wording, drop diff-strategy text; repair events row renamed to `repair` with the file-only Downloaded details. - tests/cli_parse_repair.rs: keep the --download-mode rejection test, drop the gc alias tests main removed; header covers both removals. Fix merge fallout: drop the uuid argument from a new schema.rs test's apply_package_patch call (the PR removed that parameter), and remove an unused FileEdit import in vlt_heal.rs tests left by #1141. Co-Authored-By: Claude <noreply@anthropic.com>
LLM Description written by Claude Code:claude-opus-5-5
Refs #782 (slice 1; the issue stays open for the items whose files open PRs change).
Summary
Deletes the hosted-vlt helpers that merged and healed from the pre-v5 redirect ledger. #277 removed their last production callers (
rebase_vlt_editsand the ledger heal), and v5 never writes that ledger. Also gates the test-onlyjvm::apply::read_project_filebehind#[cfg(test)].Why
pubfunctions read as if hosted vlt still heals from the redirect ledger. That misleads anyone working on hosted rollback (E33/E45).arch-refactor/*oragent/fix-*PR changes.What changed
patch/redirect/vlt.rs: deletededit_dep_id,lock_node_ids,claims_key,carried_pin_original,carried_pin_ids,carried_pin_lines,same_slots,slot_valueandrecorded(the whole former "revert" section), along with their tests (claims_stop_at_the_version_boundary,a_superseding_edit_keeps_the_pristine_slots_of_a_carried_pin, the carried-brotli tail of the 1.3 brotli test and theclaims_keyloop) and thevlt_edittest helper.patch/redirect/vlt_heal.rs: deletedledger_targetsand its three tests.LedgerTarget's docs now describelock_targets, the only constructor left, and say thatrecordis alwaysNone. Removing that field means editingcommands/scan/hosted/vlt.rs, which open PRs change, so it is left for a follow-up.lock_targets_name_every_owned_instance_of_the_purls. It covers what the deletedledger_targetstests used to: peer contexts, slot [0] flags, the purl filter and the absent record.lock_targetshad no unit test of its own.vendor/jvm/apply.rs:read_project_fileis now#[cfg(test)] pub(crate). All of its callers are tests injvm/{mod,gradle,scala_cli}.rs.Deleted
git diff --stat origin/main: 3 files, +49 / −344.Behavior
None. Every deleted item had no production caller, which the build and clippy confirm. Wrappers (
npm/,pypi/,gem/) are unaffected.Test evidence
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-core --all-features --lib: 5772 passed, 4 failed. The failures are the known root-sandbox ones that also fail onmain(copy_tree::relax_loop_must_not_traverse_symlinked_root,vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry,pypi_poetry::wire_write_failure_maps_error_and_leaves_lock_untouched,pypi_requirements::wire_failure_rolls_back_already_written_files). They chmod files, so they pass in CI.cargo test -p socket-patch-cli --all-features --test mode_migration_vlt --test in_process_rollback_hosted --test e2e_vlt --test e2e_redirect_vlt_build: 26 + 28 + 27 + 27 passed, 0 failed (the ignored real-vlt e2e tests run in CI).main.948939c: 98 of 100 checks green. The two red ones arecoverage-docker (sbt), which failed with a transient Maven Central 404 while building its Docker image, before any test ran, and theci-okaggregate it fed. Those jobs have been re-run once.Risk
Low: only deletions and a
cfg(test)gate.Remaining in #782
VendorEntry::committed_artifact_intact(vendor/state.rs),go_sum_edit::remove_lines(#1103),UpstreamClient::seed_rubygems_sha256andcargo_tag::copy_manifest_tag, plus the folded #746, #800 and #801 items. Each is in a file that an open PR changes.🤖 Generated with Claude Code
Note
Low Risk
Deletion-only and a test-only visibility gate; no production callers of removed APIs.
Overview
Removes dead hosted-vlt redirect-ledger code left over after v5 stopped writing that ledger and #277 dropped its merge/heal callers. Hosted vlt rewrite/heal paths now rely on the lock itself (
lock_targets), not ledger edits.In
patch/redirect/vlt.rs, deletes ledger/revert helpers (edit_dep_id,lock_node_ids,claims_key,carried_pin_*,recorded, slot comparison helpers) and their unit tests; trims unusedvlt_lock_textimports. The hosted rewriter behavior is unchanged.In
patch/redirect/vlt_heal.rs, removesledger_targetsand three ledger-focused tests; documents thatLedgerTargetis only built vialock_targetswithrecordalwaysNone. Addslock_targets_name_every_owned_instance_of_the_purlsto cover peer contexts, flags, and purl filtering.In
vendor/jvm/apply.rs,read_project_fileis#[cfg(test)] pub(crate)because only JVM planner tests call it.Reviewed by Cursor Bugbot for commit 948939c. Configure here.
Generated by Claude Code