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: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) · Issue #9941 · developing-today/code

atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941

New issue
Copy link
New issue
Copy link
Closed
Closed
atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1)#9941
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 1 of #5668, filed by the task 15204 fresh triage (2026-11-14, lane any-c). Design: PR #5667 §3 (merged). Parent: #5668.

Work — query-embedding cache (independent; lands first)

Per design §3 and #5668's acceptance:

  • Cache key: sha256(model_id || model_rev || normalized_text); no TTL.
  • Two tiers: service-memory LRU (~10k entries) + shared Turso cache DB in the internal tier.
  • Cache writes are async/best-effort and never in the request path; a cache outage must not fail a search.
  • Wire it into the query-embedding call site in pkgs/atlas-search (atlas-embed / atlas-core) so both CLI and serve mode benefit; the service protocol is unchanged in this slice.

Acceptance

  • A repeated identical query embedding is served from cache (memory tier first, Turso tier second) with identical vectors — proven by tests that count embedding-provider calls (oracle: provider call count stays 1 across repeats).
  • PBT over cache-key construction: normalization sensitivity (case/whitespace per the design's normalization), model_id/model_rev sensitivity (any change re-keys), per the testing doctrine — every test names its oracle.
  • Golden-311 parity unchanged with the cache cold and warm.
  • No behavior change when the Turso cache DB is unreachable (search proceeds, cache write dropped).

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-3441

  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 — MID-SHIFT FALLBACK: backend failed at checkpoint (task 16725, lane any-c, 2026-11-14)

    • state: claimed (broker claim at 2026-11-14T15:07:54Z, lease to 15:52:54Z) · task: 16725 · issue: atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941
    • The queue backend (Turso queue store) failed at the checkpoint verb: "turso queue store unreachable: Temporary failure in name resolution"; the lane verb failed the same way. Per the mid-shift fallback protocol (runbook §0b), this task switches to GitHub-fallback coordination: a fallback claim by worker repo-worker-any-c replaces the broker claim for coordination (never both), with fallback heartbeats at each checkpoint and a fallback release as the terminal record.
    • Next: revalidate this issue fresh, read the design (PR docs: Scaler-era Atlas/Turso data architecture revision #5667 section 3), implement the query-embedding cache in pkgs/atlas-search.
  5. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Picked up by repo-worker-any-c — 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-any-c posts progress markers; after 30 minutes of silence any other worker may pick this up.)

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

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: claimed: fallback coordination live; revalidating issue and reading design PR #5667 section 3

  8. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: verified: design 3.1 + embed.rs mapped; implementing embed_cache in atlas-core (LRU + Turso tier, async writes), wiring at main.rs embedder construction

  9. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: building: embed_cache.rs + wiring written in worktree queue/16725-9941-embed-cache; running cargo test -p atlas-core

  10. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: atlas-core green incl. new cache tests; running fmt check + atlas-search tests (golden cli_parity)

  11. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: atlas-core + atlas-search tests green, golden parity green; committed 1b05350; pushing and opening PR

  12. developing-today
    added
    status:in-review
    on Nov 14, 2026
  13. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: PR #10086 open; atlas-search CI is push-to-main by repo policy, local suites green; merging

  14. dezren39
    added a commit that references this issue on Nov 14, 2026

    Merge pull request #10086 from developing-today/queue/16725-9941-embe…

    6bc2bf5
  15. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 14, 2026
  16. developing-today
    closed this as completedon Nov 14, 2026
  17. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Progress from repo-worker-any-c: PR #10086 merged (6bc2bf5); watching main atlas-search CI run 43611013263

  18. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Agent note — DONE: query-embedding cache implemented and merged (task 16725, lane any-c, fallback coordination)

    • state: done · PR: feat(atlas-search): query-embedding cache — memory LRU + shared Turso tier (#9941) #10086 · merge commit: 6bc2bf54134589eb2dd675661d7f554a86918c5e
    • Coordination: this task ran in GitHub-fallback mode after the queue backend failed mid-shift (see the MID-SHIFT FALLBACK note above); the fallback release is its terminal record. The broker-side lease on task 16725 expired during the outage — this note + the merged PR are the state any reclaimer should revalidate against.

    What landed (design PR #5667 §3.1): atlas_core::embed_cache — key sha256(model_id ‖ model_rev ‖ normalized_text) (identity fields length-prefixed; no TTL — a model change re-keys); normalization = trim + whitespace collapse, case preserved (the embedder is case-sensitive); memory LRU (10k) always on; shared Turso tier via ATLAS_EMBED_CACHE_TURSO_URL / ATLAS_EMBED_CACHE_TURSO_TOKEN over the libsql HTTPS pipeline — reads on memory miss (2s timeout, failure = miss), writes async/best-effort off the request path; an unreachable tier never fails a search. The cached value is the raw full-dimension vector; finish_query_vector runs after retrieval on hit and miss alike. Wired at CliEmbedder, so CLI one-shot and serve mode share the cache; the FixedEmbedder test-hook path is untouched.

    Verification: all four suites the repo's atlas-search CI runs are green locally on the branch — atlas-core (55 unit incl. the provider-call-count oracle staying at 1 across repeats and whitespace variants, the shared-tier cross-cache test, the tier-down resilience test, LRU order, and the proptest PBT over key construction), atlas-search (incl. the golden CLI parity suite — parity unchanged), atlas-proto, atlas-embed. The push-to-main CI run for the merge commit (run 43611013263) was still in the GitHub runner queue at closeout; it runs exactly these suites.

    Follow-up (ops, not code): provision the shared cache DB + rw token and set the two env vars on the serve host to light up the shared tier; until then the cache runs memory-only, the designed degradation. Remaining #5668 slices are their own issues.

  19. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 14, 2026
  20. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Released by repo-worker-any-c (outcome: done). Implemented #9941 (atlas-search query-embedding cache, design PR #5667 s3.1): PR #10086 merged as 6bc2bf5. atlas-core embed_cache: sha256 key over length-prefixed model_id/model_rev + normalized text (no TTL), memory LRU 10k + env-configured shared Turso tier (async best-effort writes, tier failure = miss, never fails a search), wired at CliEmbedder for CLI + serve. All four CI suites green locally (atlas-core incl. provider-count oracle + key PBT, atlas-search incl. golden parity, atlas-proto, atlas-embed); push-to-main CI run 43611013263 still runner-queued at closeout. Closeout: #9941 (comment). Ran in fallback mode after the queue backend failed mid-shift (broker lease on task 16725 expired during the outage).

  21. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Agent note — task 16725 completed as already_done (lane code-d)

    • state: done (already_done)
    • task: 16725
    • issue: atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941 — CLOSED (verified fresh 2026-11-14)
    • evidence: PR feat(atlas-search): query-embedding cache — memory LRU + shared Turso tier (#9941) #10086 MERGED at 2026-11-14T15:35:34Z, merge commit 6bc2bf5 — atlas_core::embed_cache (sha256 key over length-prefixed model_id/model_rev + normalized text, no TTL, memory LRU 10k + shared Turso tier with async best-effort writes, wired at CliEmbedder), built by lane any-c in fallback mode (release marker 2026-11-14T15:46:52Z; done note 6880025247: atlas-core/atlas-search/atlas-proto/atlas-embed suites green locally). This lane revalidated against fresh GitHub state and closes the broker task as already_done with no duplicate work.
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.