[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: refactor. Source: new finding, register E58. The vlt part is the review's "delete the dead vlt ledger helpers" (Part 3.6 and Part 3 recommendation 7, register E34).
Problem
A sweep of every pub/pub(crate) item in formats/, patch/redirect/, hosted/, vendor/, crawlers/ and vex/ for references outside #[cfg(test)] code, across the whole workspace including socket-patch-node, found these on 045d7ec. Most lost their last caller when #277 (the v5 consolidation) deleted the redirect-ledger merge and the deferred-download path.
No reference anywhere, not even a test:
Used only by their own unit tests:
Test helpers compiled into production builds (their only callers are inside #[cfg(test)] modules):
Symptoms and impact
No user-visible bug. The cost is ~150–180 production lines that look live, are pub, and are kept compiling and tested. carried_pin_original and ledger_targets in particular read as if hosted vlt still merges and heals from the redirect ledger, which misleads anyone working on hosted rollback (E33/E45).
Proposed change
- Delete
committed_artifact_intact, go_sum_edit::remove_lines, vlt::edit_dep_id, vlt::lock_node_ids, vlt::carried_pin_original, vlt_heal::ledger_targets, and the helpers that become unused (carried_pin_ids, carried_pin_lines, same_slots, and claims_key if nothing else is left calling it), together with their tests.
- Gate
seed_rubygems_sha256, copy_manifest_tag and read_project_file with #[cfg(test)], or move them into the test modules that use them.
- Correct the doc comments that still describe the deleted paths (
vlt_heal module doc, LedgerTarget::record).
Size and scope
About −170 production and −150 test lines in vendor/state.rs, vendor/go_sum_edit.rs, patch/redirect/vlt.rs, patch/redirect/vlt_heal.rs, patch/redirect/upstream/client.rs, vendor/cargo_tag.rs and vendor/jvm/apply.rs. It's mechanical, with no behavior change. Out of scope:
- the legacy redirect-ledger readers (
redirect_record_live, hosted_wiring_in_files; E41);
save_redirect_state and the ledger's group-commit entry (audit-core's legacy-ledger rows);
- the
#[cfg(test)] oracles in registry_fetch.rs and reuse.rs (E35).
Acceptance criteria
Dependencies
None; it can start now. It touches go_sum_edit.rs lightly, so whichever of this and #631 lands second drops remove_lines from its list.
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: refactor. Source: new finding, register E58. The vlt part is the review's "delete the dead vlt ledger helpers" (Part 3.6 and Part 3 recommendation 7, register E34).
Problem
A sweep of every
pub/pub(crate)item informats/,patch/redirect/,hosted/,vendor/,crawlers/andvex/for references outside#[cfg(test)]code, across the whole workspace includingsocket-patch-node, found these on045d7ec. Most lost their last caller when #277 (the v5 consolidation) deleted the redirect-ledger merge and the deferred-download path.No reference anywhere, not even a test:
VendorEntry::committed_artifact_intact(20 lines). Its only caller was the CLI'sledger_covers, deleted by v5 prerelease: scan → vex → vendor workflow, hosted by default #277.go_sum_edit::remove_lines(16 lines). Delete go_sum_edit's oracle-only free functions and move the go.sum codec to formats #631 lists it among the functions to move toformats/golang/sum.rs; it should be deleted instead.redirect::vlt::edit_dep_idandlock_node_ids.`` Their only caller wasscan/hosted.rs's `rebase_vlt_edits`, which v5 prerelease: scan → vex → vendor workflow, hosted by default #277 deleted along with the ledger merge (v5 never writes the redirect ledger; `save_redirect_state` has no production caller either).Used only by their own unit tests:
redirect::vlt::carried_pin_originaland its testa_superseding_edit_keeps_the_pristine_slots_of_a_carried_pin. Same history as above.redirect::vlt_heal::ledger_targetsand its four tests. Its callers inrollback.rsandvendor.rswere replaced bylock_targetsin v5 prerelease: scan → vex → vendor workflow, hosted by default #277. Once it goes,vlt::carried_pin_ids/carried_pin_lines(onlyledger_targetscalls them) andsame_slotsbecome dead as well.Test helpers compiled into production builds (their only callers are inside
#[cfg(test)]modules):UpstreamClient::seed_rubygems_sha256`` (caller:upstream/gem.rstests);cargo_tag::copy_manifest_tag(caller:vendor/cargo.rstests);jvm::apply::read_project_file(caller: ajvm/gradle.rstest).Symptoms and impact
No user-visible bug. The cost is ~150–180 production lines that look live, are
pub, and are kept compiling and tested.carried_pin_originalandledger_targetsin particular read as if hosted vlt still merges and heals from the redirect ledger, which misleads anyone working on hosted rollback (E33/E45).Proposed change
committed_artifact_intact,go_sum_edit::remove_lines,vlt::edit_dep_id,vlt::lock_node_ids,vlt::carried_pin_original,vlt_heal::ledger_targets, and the helpers that become unused (carried_pin_ids,carried_pin_lines,same_slots, andclaims_keyif nothing else is left calling it), together with their tests.seed_rubygems_sha256,copy_manifest_tagandread_project_filewith#[cfg(test)], or move them into the test modules that use them.vlt_healmodule doc,LedgerTarget::record).Size and scope
About −170 production and −150 test lines in
vendor/state.rs,vendor/go_sum_edit.rs,patch/redirect/vlt.rs,patch/redirect/vlt_heal.rs,patch/redirect/upstream/client.rs,vendor/cargo_tag.rsandvendor/jvm/apply.rs. It's mechanical, with no behavior change. Out of scope:redirect_record_live,hosted_wiring_in_files; E41);save_redirect_stateand the ledger's group-commit entry (audit-core's legacy-ledger rows);#[cfg(test)]oracles inregistry_fetch.rsandreuse.rs(E35).Acceptance criteria
crates/.cargo build -p socket-patch-cli --releasehas no newdead_codewarnings.cargo test -p socket-patch-core, the vlt suites (e2e_redirect_vlt_build,e2e_vlt,mode_migration_vlt,in_process_rollback_hosted) andcargo clippy --all-targetsstay green.vlt_healtests that exercisedledger_targetsare deleted or retargeted atlock_targets, with no loss oflock_targetscoverage.Dependencies
None; it can start now. It touches
go_sum_edit.rslightly, so whichever of this and #631 lands second dropsremove_linesfrom its list.