Skip to content

Report an unchecked vlt copy in the direction of the run after rollback or a takeover - #2265

Draft
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
mainfrom
arch-refactor/2254-vlt-heal-unchecked-direction
Draft

Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
mainfrom
arch-refactor/2254-vlt-heal-unchecked-direction

Conversation

@mikolalysenko

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code

Fixes #2254.

Problem

After rollback or remove restores the registry pins of a vlt project, a copy the heal could not check (node_modules is a link, or node_modules/.vlt-lock.json is missing or unreadable) is reported with the hosted flow's text: "vlt-lock.json pins Socket-patched packages … run vlt ci to be sure the patched packages are installed". The run has just taken the pin out, and the copy that may still be installed is the patched one. A hosted → vendored takeover prints the same text.

Evidence on main (cfc870f)

Three tests fail on main's production code. Through the built binary (cargo test -p socket-patch-cli --test rollback -- vlt_hosted_rollback):

test rollback_render::vlt_hosted_rollback_reports_an_unchecked_copy_as_a_rollback ... FAILED
the advisory speaks of the rollback, not of a pin:
Warning: vlt-lock.json pins Socket-patched packages, but socket-patch could not check 1 installed copies (node_modules is a link, or node_modules/.vlt-lock.json is missing or unreadable); run `vlt ci` to be sure the patched packages are installed.

Plan

Give the unchecked arm of rollback_detail and takeover_detail the direction every other arm of those functions has. One production file (commands/vlt_heal.rs); the warning code, the exit codes and the JSON shape stay.


Generated by Claude Code

Opens the branch for #2254: the vlt heal reports a copy it could not
check with the hosted flow's text after a rollback or a takeover.

Refs #2254.

Assisted-by: Claude Code
@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 Nov 26, 2026
The vlt heal runs after a hosted rewrite, after rollback or remove
restore the registry pins, and after a hosted to vendored takeover.
A copy it could not check (node_modules is a link, or vlt's hidden
lock is missing or unreadable) was reported with one text for all
three: "vlt-lock.json pins Socket-patched packages ... run vlt ci to
be sure the patched packages are installed".

After a rollback that is false twice over: the run has just taken the
pin out, and the copy that may still be installed is the patched one.
The rollback now says the registry pins were restored and that vlt ci
makes sure the registry packages are installed. The takeover says the
packages were vendored. The hosted rewrite's text is unchanged, as are
the warning code, the command to run and the exit codes.

Fixes #2254.

Assisted-by: Claude Code
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.

After rollback, remove or a vendored takeover, an unchecked vlt install is reported as "vlt-lock.json pins Socket-patched packages"

2 participants