Repository navigation
Description
Consumer wiring for the restored atlas core tier (restore record: #5669, 2026-11-04). The core now exists as 29 TursoDB scan shards + 2 TursoDB content stores; nothing reads them yet — production search still runs against the monolith atlas (libSQL). This issue wires the consumer side. (Serve-role home for the service itself: #5604. Cache + flags: #5668 — coordinate, don’t duplicate.)
Shard layout (authoritative map on #5669): atlas-core-<tier>-<topic>-<nn> scan stores (chunks + vec F32_BLOB(768) + atlas_manifest), tier ∈ {internal (28 shards, 107,001 chunks), secret (1 shard, 638 chunks)}; content stores atlas-core-internal-content / atlas-core-secret-content (messages + sessions for --expand hydration). Public tier: no corpora yet.
Scope:
- Shard discovery: consumer resolves the shard set from a registry (each shard’s
atlas_manifestis the self-description; decide the registry of record — candidates: the atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669 registry DB, or manifest fan-out at startup). New shards must join without code changes. - Query path: fan out an exact-cosine scan (
vector_distance_cos(vec, ?), top-k per shard) across the caller’s shards in parallel, merge by distance. Scoped queries (one topic) touch only that topic’s shards. Metric is cosine for this corpus; TursoDB also offers dot product, L2, and Jaccard for future corpora. - Tier ceiling is physical: a client fans out only to tiers its credentials open. Secret is never in a default fan-out; it requires a secret-capable token, explicitly.
--expandhydration from the caller’s tier content store (message/session rows by chunk message_id).- Result-cache snapshot id (§3.2 of docs: Scaler-era Atlas/Turso data architecture revision #5667) must incorporate the shard set + per-shard counts so a re-shard invalidates correctly (with atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668).
Known gaps / data:
- FTS: TursoDB rejects virtual tables in MVCC mode — the shards have no
chunks_fts. Keyword search needs an answer (keep serving FTS from the libSQL monolith until cutover, or a dedicated FTS store). Decide here or spin out. - Latency (measured at restore, sandbox → us-east-1 HTTPS, network-inclusive): per-shard top-10 scan 1.1–1.9 s at 3.5–4.5k rows — above the §5.2 250 ms server-side budget assumption for libSQL. Re-measure from the laptop consumer path; §5.5 embedded replicas for internal/public stores are the standing lever (secret is never replicated).
- Cutover criteria: fan-out parity vs monolith exact scan is proven at restore time (7/7 held-out queries, exact top-10). Re-run the parity harness against the wired consumer before any default switch; monolith stays untouched until then.
Related: #8229 (cold catalog implementation merged in PR #14604; the consumer follow-up may use this catalog for cold-tier addressing).}
Acceptance criteria
- The fleet atlas-search consumer path fans out over the TursoDB shard core (29 scan shards + 2 content stores per the atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669 map) instead of the monolith, with tier ceilings applied per shard.
- Merge behaviour and --expand hydration work over the sharded results, coordinated with atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 (cache + flags) and fleet search serve role: rehome the atlas service into fleet serve search + re-point the atlas user unit #5604 (serve role) rather than duplicating them.
- Search results from the sharded path are compared against the monolith path on a recorded query set before the consumer path becomes the production default.
Activity
developing-today commentedon Nov 5, 2026
CODE-1442
dezren39 commentedon Nov 5, 2026
🤖 Agent note · done (triage)
Triage findings (verified fresh 2026-11-05):
chunks_ftsin MVCC shards) must be decided or spun out, not dropped; latency must be re-measured from the laptop consumer path (the 1.1–1.9 s figures are sandbox→us-east-1 network-inclusive).Disposition: follow-up small_fix task 10489 enqueued (queue repo-health-code-pilot), flag-gated wiring with physical tier ceilings and
--expandhydration per the acceptance list. Issue #5755 stays open for task 10489.dezren39 commentedon Nov 5, 2026
🤖 Agent note · state: handed off
126 remaining items
developing-today-fleet commentedon Nov 26, 2026
🤖 Triage — 2026-11-26 (task 24852, lane any-o)
#5755 closes only after #11213's remaining stages satisfy their acceptance.
developing-today-fleet commentedon Nov 27, 2026
Triage re-verify — lane 1837-M, queue task 25448 (2026-11-26)
Verdict: substantially landed; sole remainder already routed — keep #5755 open as parent tracker.
Fresh verification (1837-M, 2026-11-27T00:5xZ):
--shards;--expandsemantics preserved.queued, unclaimed — no new packet from this lane, no duplication.Disposition for task 25448: triage complete. #5755 closes only after #11213's remaining stages satisfy their acceptance.
🤖 Agent note · triage · lane 1837-M · task 25448 · outcome: follow_up_already_routed (#11213 via queued task 25392; slice 1 merged #6661)
dezren39 commentedon Nov 29, 2026
🤖 Census note — 2026-11-29 (lane CEN-C04, full-census pass)
Verdict: blocked on its sole remainder. Rechecked firsthand. Landed: slice 1 fan-out/merge/ShardedBackend (PR #6661); follow-ups #6662, #6664, #6665, #5668 CLOSED; #6666 serve/snapshot wiring merged via PR #11216 except slice 3. Sole remaining scope / blocker: #11213 (persistent embedded replicas) — integration shape decided (PR #12868: engine-matched Turso pull-only path, single sync owner, secret-tier refusal pre-network) and staged spike → transport → discovery → live verification; #11213 itself currently carries status/blocked. This parent closes when #11213 lands.
Census actions: added labels
priority/normal,kind/feature.developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix):
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found: no standard status/* label (only the legacy status:to-do marker), no effort/, no app//area/* label, and no acceptance criteria section.
Strengths: the wiring task is grounded in the restore record — the core exists as 29 TursoDB scan shards + 2 content stores (#5669 holds the authoritative map) and nothing reads them yet; coordination boundaries with #5668 and #5604 are stated up front.
Actions: added labels status/triaged, effort/m, area/infra; appended a
## Acceptance criteriasection derived from the body's own ask (original text untouched). Priority unchanged (normal).