GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) · Issue #9943 · developing-today/code

atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943

New issue
Copy link
New issue
Copy link
Closed
#10123
Closed
atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3)#9943
#10123
Copy link
Labels
effort/mMedium: expected under 1 day of workepic/atlas-programReprioritization program epic (2026-11-12)kind/enhancementpriority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 14, 2026
Issue body actions

Slice 3 of #5668, filed by the task 15204 fresh triage (2026-11-14, lane any-c). Design: PR #5667 §3 (merged). Parent: #5668.

Work — snapshot-bound result cache (lands last)

  • Cache key: sha256(query || snapshot_id || ceiling || flags) using the shared key constructor from slice 2 (flags end-to-end). All flags are part of the key.
  • The snapshot id is the request's shard-set snapshot id — ShardSet::snapshot_id() already exists in atlas-core (crates/atlas-core/src/shards/mod.rs, noted there as "the material for the result-cache snapshot id (atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668)"). Per the 2026-11-11 contract on atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668, each request binds its current shard snapshot id atomically to its cache key; when atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669's aggregator promotion lands, promotion bumps move that id and the service observes them without restart — this slice does not wait for atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669.
  • Storage: in-service memory only, 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. 24h TTL as a GC bound only (correctness comes from the snapshot id, not the clock).
  • A snapshot bump invalidates all result entries at once (id change = key change; stale-id entries are unreachable and GC'd).

Gates

  • Slice 2 (flags + shared key constructor) must land first — its queue task is this slice's gate; dep-block on it at claim time if unlanded (runbook §5b). Slice 1 (embedding cache) is independent and may land before or after.

Acceptance

  • A repeated identical query against an unchanged snapshot is served from cache with no Turso round-trip for the ranking (oracle: backend call count in tests).
  • MBT for snapshot-rotation invalidation: model the shard-set rotation, prove no pre-rotation entry is ever served post-rotation (testing doctrine — the test names its oracle).
  • Golden-311 parity unchanged with caches cold and warm; eval runs use --no-cache.
  • --no-cache bypasses result-cache reads and refreshes writes.

Activity

  1. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    kind/enhancement
    epic/atlas-programReprioritization program epic (2026-11-12)
    on Nov 14, 2026
  2. developing-today commented on Nov 14, 2026

    @developing-today
    developing-todayBot
    on Nov 14, 2026 – with developing.today
    Contributor
    More actions

    CODE-3443

  3. dezren39
    added
    queue/queuedHas a queued queue task
    on Nov 14, 2026
  4. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: picked_up
    task: 16728
    lane: any-b
    issue: #9943

    Claimed task 16728 by lane any-b (direct assignment). Revalidated fresh: issue #9943 is OPEN with no held / user/owned / do-not-merge / do-not-auto-edit labels. Gate verified landed: slice 2 issue #9942 is CLOSED and its PR #10090 is MERGED (merge commit 5ed55ee), so the shared cache-key constructor + flags are on main and no dep-block applies. Proceeding to implement the snapshot-bound result cache in pkgs/atlas-search.

  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 14, 2026
  6. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Picked up by repo-worker-code-b — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-b posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  7. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-code-b: claimed: gate revalidated - slice 2 (#9942) is CLOSED/merged; scoping the snapshot-bound result cache in the atlas service

  8. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    agent-note:v1 — gate clear, archaeology complete, implementation map recorded (lane code-b, FALLBACK MODE backend down, 2026-11-14)

    Claimed and mapped. Gate revalidation: slice 2 (#9942) is CLOSED/merged (lane code-a revalidation, 2026-11-14T16:10Z), so this slice is unblocked. Nothing built: the remaining work is a full design-and-build slice in the search server's concurrency core, and this claim's deliverable is the verified current-state map below so the build starts from facts, not rediscovery.

    What already exists (verified in the laptop checkout at a521d86):

    • The shared key constructor is live: SearchParameters::result_cache_key(query, snapshot_id, ceiling, expand, group, with_message) in atlas-proto (sha256 over atlas-result-cache/v1|query=…|snapshot=…|ceiling=…|<canonical flag material>), with flag-sensitivity tests. The canonical material includes no_cache/wait/hydrate/raw and the planner parameters — but NOT k, pool, mode, filters, or model (see the key-shape question below).
    • The server (crates/atlas-search/src/server.rs, JobManager) already has a dedupe/coalescing cache: CacheKey (the verbatim effective request, parameters via the same canonical constructor) → shared Computations; an identical submit queued/running/done-within-TTL coalesces with NO second branch execution — the acceptance's "no Turso round-trip for the ranking" behavior already exists inside the job TTL (RuntimeLimits.job_ttl, default 600s).
    • --no-cache IS honored at submit: the read is skipped and a fresh computation runs. One inaccuracy to fix in the build: the fresh computation lands in the cache under the no_cache-flavored key (the canonical material carries no_cache=true), so it does NOT refresh the normal key's entry, despite the submit comment claiming it does. Slice 3's "bypasses reads and refreshes writes" needs the write keyed by the no_cache=false form.
    • Slice 1's embedding cache (atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941 family) is independent, as the issue says.

    What is missing (the actual slice):

    1. Snapshot binding exists nowhere in the server. ShardSet::snapshot_id() exists in atlas-core, and ShardedBackend is only constructed in the CLI path (main.rs); the server's CoreSearchEngine<B,E> is generic over SearchBackend and neither SearchEngine nor SearchBackend exposes a current snapshot id. Within the job TTL today, a shard rotation can still serve a pre-rotation ranking from the dedupe cache — the correctness hole this slice closes. Seam for the build: a defaulted snapshot_id() on the engine/backend trait (None for non-sharded), bound into the key at submit.
    2. No 24h result store. The only retention is the dedupe cache at job_ttl. The spec's result cache (24h as GC bound only, correctness from the snapshot id) is a separate store keyed by result_cache_key; on a hit it must materialize an already-done computation/handle without branch execution (test oracle: backend call count), and rotation makes old entries unreachable (key change), GC'd by the 24h bound.
    3. Key-shape question the build must settle first: result_cache_key does not cover k/pool/mode/filters/model, but the stored computation result is a k-shaped, filtered ranking envelope. Either the result store keys on the dedupe CacheKey PLUS snapshot id (and result_cache_key remains the cross-cache flag-material constructor), or the stored value must be the unshaped ranking pool from which per-k envelopes are re-derived. Serving one request's envelope for a different k/filters from the proto key as-is would be a correctness bug; the design (PR docs: Scaler-era Atlas/Turso data architecture revision #5667 §3) should be amended or interpreted explicitly in the build PR.
    4. MBT for rotation per the acceptance: model the shard-set rotation against the cache and prove no pre-rotation entry is served post-rotation; the dedupe-cache tests around JobManager::submit with the stub backend are the natural harness (a snapshot-id provider that flips mid-test is the rotation model).

    Released free with the gate clear and this map; the build is a single focused session in crates/atlas-search/src/server.rs + the trait seam in atlas-core, with items 1–4 in that order.

  9. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Released by repo-worker-code-b (outcome: free). Gate clear (slice 2 #9942 merged) but not built: full archaeology + implementation map posted on #9943 - dedupe cache and result_cache_key already exist, --no-cache read-bypass exists (write-refresh keyed wrong), snapshot binding and the 24h result store are the real work, plus a key-shape question (k/filters not in the proto key) the build must settle first.

  10. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 14, 2026
  11. developing-today
    added
    status:in-review
    on Nov 14, 2026
  12. dezren39
    added a commit that references this issue on Nov 14, 2026

    Merge pull request #10123 from developing-today/queue/16728-9943-snap…

    068350d
  13. dezren39
    closed this as completedin #10123on Nov 14, 2026
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 14, 2026
  15. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: done
    task: 16728
    lane: any-b
    issue: #9943
    pr: #10123

    Done — fixed_merged. PR #10123 merged (merge commit 068350d); issue #9943 closed by the merge.

    Implemented the snapshot-bound result cache (#5668 slice 3): the service cache key now carries the corpus snapshot plus the shared sha256 result_cache_key from slice 2; ShardedBackend reports its ShardSet snapshot_id (monolith = one stable partition); a submit observing a new snapshot drops all result-cache entries at once; entries live 24h as a GC bound only, in service memory only; repeats on an unchanged snapshot serve past the job TTL with no branch execution; --no-cache bypasses reads and refreshes its variant entry. Mirrored to fleet-search (parity guard OK).

    Tests: atlas-core + atlas-search all suites pass (143, incl. call-count oracle, GC bound, no-cache, rotation MBT, golden-311 parity); fleet-search --all-features 53 pass. Codex review was unavailable on the PR (usage limits, no findings produced) — recorded on PR #10123.

  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mMedium: expected under 1 day of workepic/atlas-programReprioritization program epic (2026-11-12)kind/enhancementpriority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.