Repository navigation
fix: registry self-heal — serve unregisters vanished repo paths - #363
Merged
Merged
Conversation
…ls the registry A worktree deleted while the hub keeps running ghosted status kind=projects forever: boot warmup prunes once, reconcile_all_paths only relocated and logged 'run index prune'. Unrelocatable missing paths now unregister (prune_stale), evict in-memory state (reload_if_changed eviction shape) and persist; compute_status_snapshot runs the reconcile first, so the 2s background pass is the periodic heal. Test pins the removal: fails against the old keep-and-log behavior (verified by stash-run). Review-fixes: - [Important] the pinning test never executed the eviction branch -> test now seeds a RepoState::Write entry (real SharedStores + CancellationToken) for the vanished alias and asserts the map entry is gone and the token is cancelled
…ranch bookkeeping README prune section: serve unregisters unrelocatable paths itself (startup + status refresh); index prune stays as manual trigger. CHANGELOG [1.7.3] Fixed entry + AGENTS.develop.md highlight.
reconcile's aliases() can trigger a config reload (override-less state + existing repos.json loads the real registry); the statuses must measure the config as-was, the order the read endpoints implicitly rely on — the empty-fleet test pinned exactly that ordering. Heal still runs every pass; a healed alias leaves the list one 2s pass later, harmless.
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.
Why
A deleted repo/worktree used to linger forever in
status kind=projectsas atotal_chunks 0 / not indexedghost:reconcile_all_pathsdeliberately kept unrelocatable entries and only logged 'runcodesearch index prune'. Worktree deletion fires no git hook andrm -rfbypasses every observer, so nothing could clean the registry event-side.What
reconcile_all_pathscompletes with prune semantics:prune_stale()(relocate-first via git-remote identity) unregisters what cannot be relocated, evicts in-memory state (same shape asreload_if_changed), persists viapersist_config.reconcile_all_paths_unregisters_vanished_repos(config removal + live-repo survival + in-memory eviction + token cancelled; fails without the fix).codesearch index prunestays as the manual trigger.