Repository navigation
fix(store): prune a CLI row once its binary is uninstalled - #199
Merged
Merged
Conversation
A CLI row was never pruned: every CLI row carries install metadata after its first scan, and such rows were exempt from stale cleanup. The row now follows the rule other file-backed rows use: kept while its recorded binary is still on disk, pruned once it is gone. Co-Authored-By: Claude Fable 5.2 <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
After a CLI was uninstalled outside HarnessKit (for example with
npm uninstall -g), its row stayed in the list for good, and Overview kept showing it under recently installed.Every CLI row carries install metadata after its first scan, and CLI rows with install metadata were exempt from stale cleanup.
Change
The exemption is removed. A CLI row now follows the rule other file-backed rows already use: it is kept while its recorded binary is still on disk and pruned once the binary is gone.
A CLI that a scan misses while it is still installed (a desktop app's
PATHlacks the entries a shell profile adds) is kept, because its binary still exists.Testing
cargo test -p hk-core: the existing prune tests now assert the new behaviour.lark-clibinary in an isolated home: scan, delete the binary, scan again. Before this change the row stays; after it the row is gone.🤖 Generated with Claude Code