Skip to content

feat(cli): path query syncs its scope before reading#135

Open
benbaarber wants to merge 12 commits into
ben/sync-2-cache-syncfrom
ben/sync-3-query-autosync
Open

feat(cli): path query syncs its scope before reading#135
benbaarber wants to merge 12 commits into
ben/sync-2-cache-syncfrom
ben/sync-3-query-autosync

Conversation

@benbaarber

@benbaarber benbaarber commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Third in the stack (on top of the p cache sync PR). path query now 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 runs path query with no setup and gets their sessions.

Scoping follows the query's own flags: --source claude syncs only claude, --id prefixes 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-sync opts 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 warnings clean; 471 tests pass at this point in the stack.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with 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.

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.
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

🔍 Preview deployed: https://9d719ea3.toolpath.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants