You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uninstall of a tracked repo also removes independent nested declarations such as team/_b #898
#880 keeps tracked repository declarations that this machine has no checkout for, and fixed declaration-only removal so that forgetting _team no longer deletes an independent team/_b declaration (ForgetTrackedRepo now matches with unlinkedWith). Uninstalling a checkout still matches with removedWith, which keeps the broad legacy-group check, so the same loss can happen there.
Steps
Machine A: skillshare install org/a --track --name team -g, then skillshare install org/b --track --into team -g. Metadata records team/_b as {Tracked: true, Group: "team"}. Push.
Machine B: pull. _team gets a checkout; team/_b stays a declaration without a checkout (for example its clone failed).
On B: skillshare uninstall _team -g.
Result
team/_b's declaration and its audit acceptances are removed together with _team:
moveOut saves them into _team's trash entry (Extract uses removedWith).
Run then prunes them through RemoveByNames → removedWith → inLegacyRepoGroup, which matches every tracked entry with Group == "team" (internal/install/metadata.go).
Reconcile cannot restore the record because there is no checkout. Only skillshare trash restore _team -g brings it back; if B pushes first, A loses it too.
This is not a regression from before #880, where reconcile pruned the declaration anyway, but it defeats what #880 preserves.
Expected
Uninstalling _team removes _team, its namespace and its genuine legacy members, and keeps independently installed prefixed repositories such as team/_b, the same way ForgetTrackedRepo and unlink now do.
Suggested fix
Apply the guard unlinkedWith already uses (!utils.IsTrackedRepoDir(path.Base(full))) to the legacy-group clause of removedWith, ideally by moving it into one shared legacy-group rule, so Extract, RemoveByNames, ForgetTrackedRepo and unlink share one definition. Add the case above to the RemoveByNames / Extract tests and check the existing legacy-group tests still pass.
Activity
fix(uninstall): keep repos installed into a tracked repo's legacy gro…