Repository navigation
fix(uninstall): keep repos installed into a tracked repo's legacy group - #900
Merged
Merged
Conversation
Uninstalling the _team checkout matched every tracked entry grouped as "team", so a repo installed with --into team (team/_b) lost its record and audit acceptances too. Since #880 keeps declarations that have no checkout on this machine, reconcile could no longer restore that record, and the next push removed it on every machine; only trash restore of _team brought it back. #880 already excluded _-prefixed repo directories from the legacy match for unlink and declaration-only removal. Move that guard into inLegacyRepoGroup so checkout uninstall and its trash copy follow the same rule. Fixes #898
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Closes #898
What changed
inLegacyRepoGroup(internal/install/metadata.go) no longer treats an entry whose directory is a tracked repo (_-prefixed basename, such asteam/_b) as a legacy member of_team. #880 applied this guard only inunlinkedWith. It now lives in the shared rule, so these all use the same definition:RemoveByNames);Extract);Why
With
_teamchecked out andteam/_bonly declared (for example, its clone failed on this machine),skillshare uninstall _team -galso removedteam/_b's record and audit acceptances. Since #880, reconcile keeps declarations without a checkout but cannot recreate a removed one, so the next push droppedteam/_bon every machine. Onlytrash restore _teambrought it back.Limitation
A legacy record (an old record that names its group but not its full path) of a skill whose own name starts with
_is now treated as an independent repo and kept. #880 already makes this trade-off for unlink and declaration-only removal, and lists it under Limitations.Verification
New
TestRemoveByNamescase "repo installed into the legacy group stays": failed against the old matcher (kept [], want [team/_b]) and passes with the fix.E2E in an ssenv with the real CLI and local git repos:
install file://…/a --track --name team -ginstall file://…/b --track --into team -gteam/_b's checkout away.uninstall _team -g --forceThe old code dropped
team/_bfrom.metadata.json; the fix keeps it.make checkin the devcontainer passed (exit 0). It ran on fix(reconcile): keep tracked repo declarations this machine has not cloned #880's head, whose tree is identical to themainthis branch starts from.go test ./internal/install ./internal/uninstall ./internal/serverpassed.Not run: Windows, website build (no docs change; no doc describes this rule).
Checklist
make check) — for code changes