GeezerVison is showing github.com — atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags · Issue #5668 · developing-today/code
atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668DescriptionImplementation of §3 of the Scaler-era data architecture revision (design doc PR #5667, doc/2026-11-04T21-27-34Z_design_atlas_scaler_revision/). Builds on the search service from epic #5350 (esp. #5354 serve mode).
Scope:
- Query-embedding cache: key
sha256(model_id || model_rev || normalized_text), no TTL; service-memory LRU (~10k entries) + shared Turso cache DB in the internal tier; cache writes async/best-effort, never in the request path.
- Result cache: key
sha256(query || snapshot_id || ceiling || flags); reused while the snapshot id (publish manifest hash) is current; 24 h TTL as GC bound only; in-service memory per the Atlas step 4: serve mode — job protocol, worker pool, in-memory temp store #5354 privacy rule (no cross-client result sharing by default).
- Flags end-to-end (CLI + service protocol):
--no-cache (bypass reads, refresh writes), --wait (block for full fused result vs job handle + first page), --expand N (hydrate top N to full chunk/file text from the content store), --raw / --raw=branches (ungrouped rows, pre-fusion option). All flags are part of the cache key.
- Snapshot id plumbing: aggregator promotion batches bump the snapshot id; the service must observe bumps without restart.
Acceptance: golden-311 parity unchanged with caches cold and warm (eval runs use --no-cache); a repeated identical query against an unchanged snapshot is served from cache with no Turso round-trip for the ranking; a snapshot bump invalidates all result entries at once; PBT over cache-key construction (flag sensitivity, ceiling sensitivity) + MBT for the snapshot-rotation invalidation, per the testing doctrine (every test names its oracle).
Design: #5667 §3. Parent context: hatch-personal#21.
Acceptance criteria
- Query-embedding cache: key
sha256(model_id || model_rev || normalized_text), no TTL, service-memory LRU (~10k) plus shared Turso cache DB; writes async/best-effort, never in the request path.
- Result cache: key
sha256(query || snapshot_id || ceiling || flags); hits only while the snapshot id is current; 24h TTL as GC bound only; per-service memory per the Atlas step 4: serve mode — job protocol, worker pool, in-memory temp store #5354 privacy rule (no cross-client result sharing by default).
- Flags work end-to-end (CLI + service protocol) and are part of the cache key:
--no-cache, --wait, --expand N, --raw / --raw=branches.
- Snapshot id from aggregator promotion batches (issue atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669) invalidates stale result-cache entries.
- Behaviour matches design PR docs: Scaler-era Atlas/Turso data architecture revision #5667 section 3; deviations are recorded on this issue.
Activitydezren39 commented on Nov 4, 2026 Intake review
Intake by fleet monitor (repo-fleet-monitor), 2026-11-04 run. dezren39 commented on Nov 4, 2026 Drew approval recorded (2026-11-04 ~17:10 CST): the shared INTERNAL-tier embedding-cache DB (revision §3.1) is CONFIRMED — "yes, all of these things."
First instance already created under the TursoDB pilot approval: pilot-tursodb-embedcache (Turso-type DB, group great-star-lord, empty, labeled pilot). The cache/flags work in this issue can target it for the embedding-cache store; the query/result cache design (§3) is unchanged. dezren39 commented on Nov 5, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 14, 2026 Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15204 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet. dezren39 commented on Nov 14, 2026 🤖 Agent note · picked up
- Agent: repo queue worker, lane any-c (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-any-c run 2026-11-14; task 15204
- Found via: claimed task 15204 this shift (unfiltered one-queue claim); execution-lane assignment returned
direct — this lane triages it itself.
- Task: task 15204 for issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 (triage): atlas-search query-embedding + snapshot result caching and the §3 flags. Fresh check: issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 is OPEN, no hard-stop labels; design PR docs: Scaler-era Atlas/Turso data architecture revision #5667 is MERGED; Atlas step 4: serve mode — job protocol, worker pool, in-memory temp store #5354 (serve mode) is CLOSED. The packet_defect that blocked task 10102 (the
--expand compatibility question) was decided 2026-11-11: --expand keeps its shipped neighbor meaning, hydration ships as --hydrate N, embedding caching proceeds independently, result caching binds the request's shard snapshot id. This triage turns that contract into scoped implementation packets.
- Expectation: triage note on issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 with the slice split and dependency order; slice issues filed and their packets enqueued; task 15204 completed as
triaged.
- Links: task 15204 · issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 · design PR docs: Scaler-era Atlas/Turso data architecture revision #5667 · issue atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669
dezren39 commented on Nov 14, 2026 🤖 Agent note · triaged
State verified fresh (2026-11-14): design PR #5667 MERGED; #5354 serve mode CLOSED; no caching exists in pkgs/atlas-search yet (no embedding cache, no result cache, no --hydrate/--no-cache flags); --expand is the shipped neighbor-chunks flag (atlas-search main.rs). ShardSet::snapshot_id() already exists in atlas-core (shards/mod.rs) — noted there as the material for this issue's result-cache id. #5669 (staging tier / promotion) is still OPEN, but per the 2026-11-11 contract the result cache binds the request's live shard snapshot id, so it does not wait for #5669: promotion bumps will move the same id when they land.
The decided contract (2026-11-11, stands): --expand N keeps neighbor semantics; §3.3 hydration ships as --hydrate N; embedding cache proceeds independently; result cache binds the shard snapshot id atomically per request, per-service memory only (#5354 privacy rule).
Split (dependency order A → B → C):
| Slice |
Issue |
Queue task |
| 1 — query-embedding cache (LRU + shared Turso tier, async writes) |
#9941 |
task 16725 |
2 — flags end-to-end (--no-cache/--wait/--raw/--hydrate N, shared cache-key constructor, fleet-search mirror) |
#9942 |
task 16722 |
| 3 — snapshot-bound result cache (gated on task 16722 for the key constructor + flags) |
#9943 |
task 16728 |
Slice 3's packet names task 16722 as its gate and instructs the claimer to dep-block on it (§5b) if unlanded. Slice 1 is independent and can land any time. First concrete step: task 16725 or 16722 (both ungated).
Task 15204 completes as triaged with these follow-ons; issue #5668 stays open as the parent until the slices land and its acceptance boxes are checked.
dezren39 commented on Nov 14, 2026 🤖 Agent note · duplicate packet — #5668 already triaged this shift (task 15204)
- Agent: repo queue worker, lane any-c (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-any-c run 2026-11-14; task 16732
Task 16732 duplicates task 15204 (same lane, earlier this shift, completed 2026-11-14T11:36:11Z): #5668 was triaged with the standing contract recorded (--expand keeps neighbor meaning; hydration ships as --hydrate N) and sliced into #9941/task 16725 (embedding cache), #9942/task 16722 (flags), #9943/task 16728 (result cache, gated on 16722) — see the triage note on this issue (comment 6876644764). Task 16732 completes as already_done; no work is duplicated.
dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged — all three slices landed and verified on main; closing as resolved
- Agent: repo-worker-code (Muse lane any-l)
- Session / ID: queue task 18327 (bulk-intake triage; this issue was fully triaged by task 15204 on 2026-11-14, which split it into three slices — this note verifies their landing)
Fresh verification (this run, origin/main fd6693d1dd): every slice from the 15204 split is implemented, merged, and its issue closed:
- Slice 1 — query-embedding cache (atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941, task 16725): PR feat(atlas-search): query-embedding cache — memory LRU + shared Turso tier (#9941) #10086 merged 2026-11-14;
pkgs/atlas-search/crates/atlas-core/src/embed_cache.rs is on main, wired through atlas-proto and the service.
- Slice 2 — flags end-to-end (atlas-search: flags end-to-end — --no-cache/--wait/--raw + --hydrate N per the 2026-11-11 --expand contract (#5668 slice 2) #9942, task 16722): verified already-implemented-and-merged on revalidation;
main.rs carries --hydrate N with the contract comment ("NOT --expand: that keeps its neighbor-chunks meaning"), alongside --no-cache/--wait/--raw in the shared cache-key path.
- Slice 3 — snapshot-bound result cache (atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943, task 16728): PR atlas-search: snapshot-bound result cache (#9943, #5668 slice 3) #10123 merged (merge commit
068350d7877069e2af646471e986dba9e13301d5); the result cache binds the live shard snapshot id per request, per-service memory only (Atlas step 4: serve mode — job protocol, worker pool, in-memory temp store #5354 privacy rule).
Acceptance boxes: embedding cache ✓, result cache ✓, flags end-to-end ✓ (with the one recorded deviation: §3.3 hydration ships as --hydrate N per the 2026-11-11 contract decided on this issue), snapshot-id invalidation ✓ as a mechanism — the cache keys on ShardSet::snapshot_id(), so promotion bumps invalidate wholesale when they occur. The snapshot-id producer (aggregator promotion batches, #5669) is still open, but per the same 2026-11-11 contract and the 15204 triage it was explicitly decoupled from this issue: the binding is live, and #5669's landing needs no change here.
Closing #5668 as resolved on this evidence. If the golden-311 parity sign-off is meant to be tracked separately from the slices' own test gates, reopen with that scope named and it will route as its own packet. dezren39 commented on Nov 17, 2026
Agent note — state: done (already resolved) · task 19862, lane any-g
- Picked up: task 19862, the triage follow-on task 18327 emitted for issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668. Fresh check this claim: issue atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 is CLOSED (2026-11-17T02:56:29Z) — closed by task 18327 itself after verifying all three slices of the task 15204 split landed on main (atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941 embedding cache via PR feat(atlas-search): query-embedding cache — memory LRU + shared Turso tier (#9941) #10086, atlas-search: flags end-to-end — --no-cache/--wait/--raw + --hydrate N per the 2026-11-11 --expand contract (#5668 slice 2) #9942 flags, atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943 result cache).
- Independent re-verification this run: pkgs/atlas-search is on current main and its server carries the landed behavior (the --no-cache result-cache bypass is implemented and acceptance-tested in crates/atlas-search/src/server.rs, citing atlas-search: flags end-to-end — --no-cache/--wait/--raw + --hydrate N per the 2026-11-11 --expand contract (#5668 slice 2) #9942/atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943).
- Outcome for task 19862: completed as already_done; no follow-on needed — the follow-on was this task, and the work it pointed at is verified landed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|