Skip to content

Delete the dead lock_inventory::wired_vendor_integrity reader (#782) - #1370

Merged
Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
arch-refactor/782-dead-wired-integrity
Oct 9, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
arch-refactor/782-dead-wired-integrity

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Refs #782 (the #801 slice; the tracking issue keeps the rest).

Summary

Delete vendor::lock_inventory::wired_vendor_integrity (lock_inventory/wired.rs). It read the integrity a rewired lock records for a vendored artifact, for package-lock/shrinkwrap, pnpm, yarn classic and berry, bun.lock, bun.lockb and the Python locks. Nothing in the workspace calls it outside its own tests, so it was a sixth lock reader that looked live and had to be kept in step with the real entry walks.

Why (leverage)

What changed

  • vendor/lock_inventory/wired.rs: deleted.
  • vendor/lock_inventory/mod.rs: mod wired, the pub use re-export and the module-doc line that said repair reads it are gone.
  • vendor/lock_inventory/tests.rs: the 5 tests that exercised only wired_vendor_integrity are deleted. fifo_lockfiles_fail_fast_instead_of_wedging and bun_dangling_text_lock_link_leaves_the_binary_lock_live keep all their other assertions and drop just the wired one.
  • vex/discover/bun.rs: module doc no longer names it as a second user of the bun lock gate.

Not in this slice, because open PRs change those files: PnpmLock::wired_integrity and its test (formats/pnpm/mod.rs, #1320), the doc line in utils/python_lock.rs (#1332), and the "wired_vendor_integrity(" needle in the vex/discover/mod.rs forbidden-reader guard (#1321, #1349). The needle is still harmless, since the guard forbids a name that no longer exists.

Deleted (git diff --numstat origin/main)

  • Production: +3 / −224 (wired.rs −220, mod.rs +1/−5, bun.rs +2/−2).
  • Tests: +4 / −256 (tests.rs +4/−216, wired.rs test module −40).

Behavior

None. No production code called the function; the CLI and node crates never referenced it.

Test evidence

  • cargo clippy --workspace --all-features -- -D warnings: clean, so nothing it used became dead code.
  • cargo test -p socket-patch-core --lib: 6096 passed, 4 failed. The 4 are the root-sandbox permission tests that fail on main too (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); CI runs unprivileged.
  • cargo test -p socket-patch-core --lib lock_inventory: 142 passed.
  • rustfmt --check on the touched files: clean (tests.rs was clean on main and is reformatted after the tuple shrank).

Risk

Low. It only deletes code; the compiler and clippy prove nothing else called it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XNXgguh8iNycd4sv7u5cPe


Note

Low Risk
Pure deletion of uncalled code; clippy and existing tests confirm no remaining callers.

Overview
Removes the unused wired_vendor_integrity lock reader (~220 lines in lock_inventory/wired.rs), which duplicated integrity lookups across npm-family, yarn, bun, and Python locks after repair stopped calling it.

lock_inventory/mod.rs drops the wired submodule, its re-export, and module docs that tied repair to that API. lock_inventory/tests.rs deletes five tests dedicated to wired_vendor_integrity and trims related assertions from FIFO and Bun #735 tests. vex/discover/bun.rs doc comment no longer lists it beside bun_workspace for the text-vs-binary lock gate.

No runtime behavior change: nothing outside those tests referenced the function.

Reviewed by Cursor Bugbot for commit 392bc1f. Configure here.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) added arch-refactor PR opened by the scheduled architecture refactor routine refactor Structural change: duplicated code or logic, missing abstraction, layering, dead code labels Oct 9, 2026
wired_vendor_integrity read the integrity a rewired npm-family or
Python lock records for a vendored artifact. Repair, its only
consumer, stopped calling it, and since then it survived only through
its own tests: a sixth reader of package-lock, pnpm, yarn, bun and the
Python locks that looked live and had to be kept in step with the real
entry walks.

Delete wired.rs, its module line and re-export, its module-doc and
bun discovery doc mentions, and the tests that exercised only it. The
FIFO and dangling bun.lock tests keep their other assertions. No
behavior changes: nothing outside the deleted tests called it.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 9, 2026 20:13
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for 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 392bc1f. Configure here.

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

[agent] ci-ok failed because every job in CI run 37985510178 was cancelled before any test body ran. No newer run replaced it, so this was not concurrency supersession and has nothing to do with the diff. I re-ran it once. Locally: workspace clippy is clean, and the core lib tests pass apart from the 4 root-sandbox permission tests that also fail on main.


Generated by Claude Code

@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 4c800ac Oct 9, 2026
53 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the arch-refactor/782-dead-wired-integrity branch October 9, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-refactor PR opened by the scheduled architecture refactor routine refactor Structural change: duplicated code or logic, missing abstraction, layering, dead code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants