Repository navigation
Delete the vendored and hosted-vlt helpers left without a production caller by the v5 consolidation #782
Description
[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:
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_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, andclaims_keyif nothing else is left calling it), together with their tests. - Gate
seed_rubygems_sha256,copy_manifest_tagandread_project_filewith#[cfg(test)], or move them into the test modules that use them. - Correct the doc comments that still describe the deleted paths (
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.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_stateand the ledger's group-commit entry (audit-core's legacy-ledger rows);- the
#[cfg(test)]oracles inregistry_fetch.rsandreuse.rs(E35).
Acceptance criteria
- None of the deleted names appear under
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. - The
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.rs lightly, so whichever of this and #631 lands second drops remove_lines from its list.
Consolidated work — backlog review, 2026-10-08
The following standalone issues are now tracked here. Their closure consolidates scheduling; it does not mean their implementation is complete. Original reports and discussion remain linked below.
#746: Delete PatchSources::mem_blobs, the single-variant VendorSource predicates, the redirect-state group-commit capture and the group_commit switch-off oracle
- Track the remaining scope from Delete PatchSources::mem_blobs, the single-variant VendorSource predicates, the redirect-state group-commit capture and the group_commit switch-off oracle #746 in this issue. Combine this dead/scaffolding cleanup with the existing dead-helper cleanup instead of separate jobs.
Preserved scope and acceptance criteria from #746
Proposed change
Delete:
- the
mem_blobsfield, its branch inapply.rs, its ~25mem_blobs: Noneinitializers and the fixture read; VendorSource::{may_use_service, requires_service}and the always-true condition atvendor.rs:141. KeepVendorSource::parseand the--vendor-sourceflag, because acceptingservice/autoand rejectingbuildis contract (CLI_CONTRACT "Prebuilt vendor artifacts"). Removing the flag is out of scope (decision C35);- the
redirect-state.jsonentry fromgroup_commit::LEDGERS, along with its doc line and its test row (group_commit.rs:1071); - the
switched_off("group_commit")guard,failpoint::switched_offif it is then unused, and the oracle test (or turn it into a golden check of the group-commit output).
Size and scope
- Production: about −60 lines. Tests: about −350 lines.
- Files:
patch/apply.rs,vendor/{mod,npm_flavor}.rs,vendor/test_support/service_fixture.rs,utils/{group_commit,failpoint}.rs,commands/{vendor,repair,fetch_stage}.rs,commands/vendored_backend/mod.rs,tests/vendor_group_commit_e2e.rs. - Out of scope:
--vendor-sourceremoval, the update channels, the pre-v5 redirect ledger readers (migration).
Acceptance criteria
-
grep -rn mem_blobs cratesreturns nothing. -
VendorSourcehas no always-true predicate, and--vendor-source service|autostill parses whilebuildis still rejected (theargs.rstests stay green). -
group_commit::LEDGERSlists only.socket/vendor/state.json; the group-commit crash and replay tests stay green. - No
SOCKET_PATCH_SWITCH_OFFreference remains (or one documented user, if a maintainer wants to keep the mechanism). -
cargo test -p socket-patch-core --libandcargo test -p socket-patch-clistay green;cargo clippy --workspace --all-features -- -D warningsstays clean.
#800: Replace the single-variant vendor PackageSource with &Path and delete the scaffolding it props up
- Track the remaining scope from Replace the single-variant vendor PackageSource with &Path and delete the scaffolding it props up #800 in this issue. Combine single-variant PackageSource and associated dead scaffolding with the existing dead-helper cleanup.
Preserved scope and acceptance criteria from #800
Proposed change
Delete:
vendor/source.rsand thePackageSourcere-export. Everyimpl Into<PackageSource<'a>>parameter becomes&'a Path;.into()/.path()calls go away.vend_installed!. NuGet and Maven dispatch throughvend!, and the tautologicaldebug_assert!goes.StagedSource::as_sourcereturns&Path.- the
SERVICE_ECOSYSTEMSblock, thevendor_service_unsupported_ecosystemcode andservice_mode_gate_admits_maven. - the
_cfgparameter ofServicePolicy::newand the argument at its 10 call sites.
Size and scope
- Production: about 19 files with mechanical signature edits. Roughly −80 / +40 lines. Tests: about −45 lines, plus fixture call sites that wrap paths in
PackageSource. - Out of scope:
VendorSource::{may_use_service, requires_service},mem_blobsand the group-commit oracle, which Delete PatchSources::mem_blobs, the single-variant VendorSource predicates, the redirect-state group-commit capture and the group_commit switch-off oracle #746 owns;- the
--vendor-sourceflag (decision C35); - any behavior change.
Acceptance criteria
-
grep -rn "PackageSource\b" crates --include=*.rsreturns only NuGet-XML text (packageSource…), not the type. -
grep -rn "vend_installed\|SERVICE_ECOSYSTEMS\|vendor_service_unsupported_ecosystem" cratesreturns nothing. -
ServicePolicy::newtakes only the terminal. -
patch/redirect/golang_local.rsno longer imports fromcrate::vendorfor this type. -
cargo test -p socket-patch-core --lib,cargo test -p socket-patch-cliandcargo clippy --workspace --all-features -- -D warningsstay green. No golden or e2e output changes.
#801: Delete lock_inventory::wired_vendor_integrity and PnpmLock::wired_integrity, which have no production caller
- Track the remaining scope from Delete lock_inventory::wired_vendor_integrity and PnpmLock::wired_integrity, which have no production caller #801 in this issue. Combine the unused wired-integrity readers with the existing dead-helper cleanup.
Preserved scope and acceptance criteria from #801
Proposed change
Delete:
vendor/lock_inventory/wired.rs, itsmod, the re-export and the module-doc line atlock_inventory/mod.rs:15;- the
wired_vendor_integritytests inlock_inventory/tests.rs; PnpmLock::wired_integrityand its testwired_integrity_reads_the_vendored_entry_pin_only;- the
"wired_vendor_integrity("needle in the forbidden-reader guard atvex/discover/mod.rs#L3563, plus the doc mentions inutils/python_lock.rs:36andvex/discover/bun.rs:11.
Afterwards, delete any helper that wired.rs was the last production user of. Check with cargo clippy -D dead_code; for example, the pub(crate) lock-model accessors it imports from super::{bun,npm,yarn}.
Size and scope
- Production: about −235 lines (
wired.rs−221, plus thePnpmLockmethod and doc lines). Tests: about −90 lines. - Files:
vendor/lock_inventory/{wired,mod,tests}.rs,formats/pnpm/mod.rs,vex/discover/{mod,bun}.rs,utils/python_lock.rs. - Out of scope:
vex/discover/deno.rs, which is a deliberate, documented empty extractor;- the pre-v5 redirect-ledger readers, which are live migration code (
list,rollbackretire_legacy_redirect_ledger); - the other orphans in Delete the vendored and hosted-vlt helpers left without a production caller by the v5 consolidation #782.
Acceptance criteria
-
grep -rn "wired_vendor_integrity\|fn wired_integrity" cratesreturns nothing. -
vendor/lock_inventory/no longer imports fromcrate::vex. -
cargo test -p socket-patch-core --lib,cargo test -p socket-patch-cliandcargo clippy --workspace --all-features -- -D warningsstay green. -
repaire2e tests stay green unchanged, which shows that no runtime path used it.
Activity
audit-ecosystems: E19 filed (#780, #781); new E58 (#782), E59 (#779)
mikolalysenko commentedon Oct 4, 2026
[agent] Triaged as
priority:p3(cross-cutting dead-code cleanup). No duplicate or open PR found.Generated by Claude Code
mikolalysenko commentedon Oct 8, 2026
[agent] Claiming this issue for the architecture refactor routine (highest leverage: the only backlog item whose files no open fix/refactor PR changes now that #1039 merged; it deletes the dead hosted-vlt redirect-ledger helpers that mislead hosted-rollback work). Branch: arch-refactor/782-dead-vlt-ledger-helpers. Claim-ID: 2026-10-08T14:56:29Z-92661b
Slice 1 covers the free files only:
patch/redirect/vlt.rs(edit_dep_id,lock_node_ids,carried_pin_original,carried_pin_ids,carried_pin_lines,same_slots,claims_key),patch/redirect/vlt_heal.rs(ledger_targets) andvendor/jvm/apply.rs(read_project_filegated to tests).committed_artifact_intact(vendor/state.rs),go_sum_edit::remove_lines(#1103),seed_rubygems_sha256,copy_manifest_tagand the folded #746/#800/#801 items stay for later slices, because open PRs change their files.Generated by Claude Code
mikolalysenko commentedon Oct 8, 2026
[agent] Draft PR: #1141.
Generated by Claude Code
Delete dead hosted-vlt redirect-ledger helpers
Pin lock_targets as the rollback heal's target set
refactor: run 2026-10-08T15:16Z, #1141 for #782
mikolalysenko commentedon Oct 9, 2026
[agent] Claiming this issue for the architecture refactor routine (highest leverage: the top free candidate now that #1274 freed
lock_inventory/tests.rs; it deleteslock_inventory/wired.rs, a ~220-line sixth reader of every npm-family and Python lock that no production code calls). Branch: arch-refactor/782-dead-wired-integrity. Claim-ID: 2026-10-09T19:56:02Z-4b7e1aSlice: the #801 scope inside the free files:
vendor/lock_inventory/{wired,mod,tests}.rsand thevex/discover/bun.rsdoc line.PnpmLock::wired_integrity(formats/pnpm/mod.rs, open #1320), theutils/python_lock.rsdoc line (#1332) and thevex/discover/mod.rsguard needle (#1321, #1349) remain for later, along with the #746 and #800 items.Generated by Claude Code
mikolalysenko commentedon Oct 9, 2026
[agent] PR for the #801 slice: #1370. It deletes
lock_inventory/wired.rsand its tests. Still open:PnpmLock::wired_integrity, theutils/python_lock.rsdoc line and thevex/discover/mod.rsguard needle (their files are in open PRs), plus the #746 and #800 items.Generated by Claude Code
mikolalysenko commentedon Oct 12, 2026
[agent] Janitor: releasing the stale claim
Claim-ID: 2026-10-09T19:56:02Z-4b7e1a. slices merged, last #1370 on 2026-10-09 23:08Z; no open PR for the rest of this issue, and the claimer has been silent since 2026-10-09T20:13:19Z (more than 48h). Removingagent:claimedso another fixer can pick up what remains.Generated by Claude Code