Repository navigation
fix(cli): harden install lifecycle ownership - #491
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ducksss
marked this pull request as ready for review
August 17, 2026 18:13
This was referenced Aug 27, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diffandupdatecompare against the version and file set that was actually installedremoveownership-aware and fail closed for local edits, unknown legacy baselines, unrecorded leftovers, and unresolved shared ownership; keep destructive overrides explicit through--forceWhy
The previous lifecycle logic reconstructed the old side of a comparison from the current registry. That could hide source changes across releases and leave files removed by a newer manifest behind. Mutating commands could also race on the same project, while removal could delete files without proving that they were still registry-owned and unmodified.
A second review also found that a later component could adopt an edited shared file as its clean baseline, that an update could delete a retired file still owned by a sibling component, and that simultaneous stale-lock reclaimers could remove a newly acquired live lock. The catalog's URL synchronization could also lose an in-progress search when selection state was written first.
Together, those gaps risked lost local edits, stale installed source, corrupted install state, or non-shareable catalog state.
Impact
Existing v1/v2 state migrates in memory to v3. New successful installs snapshot normalized SHA-256 hashes for every shipped file. Known pre-v3 releases use packaged baselines; unknown or ambiguous ownership fails safely. Shared ownership remains consistent across installs and updates, concurrent mutations are rejected or serialized, and idempotent removal behavior is preserved.
Validation
pnpm test:releaseusing pinned pnpm 10.24.0 and Bun 1.3.14pnpm test:packgit diff --check