feat(cli): path query syncs its scope before reading#135
Open
benbaarber wants to merge 12 commits into
Open
Conversation
path query now freshens the slice of the cache it will read before reading it: --source narrows the sync to one type, --id prefixes narrow likewise, a bare cache-wide query syncs every type, and --input-only queries never touch the cache. Quiet unless something was ingested; a sync failure degrades to querying the cache as-is; --no-sync opts out. Importing an artifact the implicit sync already cached is a friendly no-op instead of an exists-error.
This was referenced Jul 17, 2026
|
🔍 Preview deployed: https://9d719ea3.toolpath.pages.dev |
# Conflicts: # CLAUDE.md
# Conflicts: # CLAUDE.md
# Conflicts: # CHANGELOG.md
# Conflicts: # CLAUDE.md
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.
Third in the stack (on top of the
p cache syncPR).path querynow freshens the slice of the cache it will read, before reading it — this is the piece that makes the cache an implementation detail: a new user runspath querywith no setup and gets their sessions.Scoping follows the query's own flags:
--source claudesyncs only claude,--idprefixes narrow to their types, a bare cache-wide query syncs every type, and--input-only queries never touch the cache. Output stays quiet unless something was actually ingested (synced claude: 3 new, 1 updated); a sync failure degrades to querying the cache as-is;--no-syncopts out.The import no-op check from the previous PR now covers the implicit path too: importing an artifact the query-sync already cached reports "already up to date" instead of an exists-error.
Tests:
cargo clippy -D warningsclean; 471 tests pass at this point in the stack.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Stack (review bottom-up): #133 types/imports → #134 cache sync → #135 query auto-sync → #136 parent-dir. Supersedes #131.