Repository navigation
fix(store): prune rows of agents the scan did not visit - #161
Merged
Merged
Conversation
scan_all skips agents that fail detection, so once an agent is uninstalled its rows are never produced again. Rows pointing at files in shared directories such as ~/.agents/skills kept the install_meta exemption forever, because the file is still there, and the Overview went on counting them for an agent that is not installed. scan_all now reports which agents it visited and the scan-and-sync callers go through Store::sync_scan, which prunes stale rows of unvisited agents regardless of install_meta. Store-held disabled state (disabled_config) is still kept, as detection can fail transiently and that snapshot is the only copy. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Problem
scan_allskips agents whosedetect()fails, so once an agent is uninstalled its rows are never produced again. Rows that point at files in a shared directory such as~/.agents/skillskept the "install_meta and the file still exists" exemption forever, because the file is still there for the other agents. The Overview then kept counting those rows for an agent that is not installed: on my machine Devin Desktop showed 22 extensions with no~/.codeium/windsurfon disk.Fix
scanner::scan_allreturnsScanResult { extensions, scanned_agents }, the latter being the adapters that passeddetect().Store::sync_scan(&ScanResult); the CLI, web and desktop scan-and-sync callers all use it. The oldsync_extensionsstays for partial syncs and is now test-only.disabled_config): an MCP entry HarnessKit disabled only exists there, and detection can fail transiently, so that copy must survive.Behaviour changes worth knowing
GROK_HOME,PI_CODING_AGENT_DIR,PENGUIN_HOME,DSH_HOME,OPENCLAW_*) are not detected by the desktop app when the default directory is absent, since it does not load the login-shell environment. Their rows are now pruned by a desktop scan and recreated by the next CLI scan. Narrow, and the root cause is the environment handling, not this change.Verification
cargo test --workspacegreen; new tests: an end-to-end scan-then-sync with Codex and Devin Desktop adapters on a temp home (uninstall Devin, shared skill row pruned, Codex row kept, disabled MCP row kept), plus unit cases for the decision function.🤖 Generated with Claude Code