GeezerVison is showing github.com — impl(backups): mesh coverage — embedding/shard stores restore without a re-embed pass · Issue #13461 · developing-today/code
impl(backups): mesh coverage — embedding/shard stores restore without a re-embed pass #13461DescriptionParent: #9093 (backup mesh) · Program: #8983 · Design: doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md (landed with the #9093 design PR).
House rules: any schedule this creates lands its doc/fleet-schedule-registry.md row in the same PR; secrets by name only (Bitwarden at runtime, repo-archive pattern); builds/tests run via remote dispatch, never on the laptop or sandbox.
Scope
The embedding stores ride the mesh: the Atlas vector tables / shard databases (the embedding corpora under the atlas-search shard layout) are snapshotted by the same Turso→R2 restic legs as their parent databases, and — the point of this issue — a restore is proven to rebuild search without a re-embed pass. Embeddings are the most expensive data in the fleet to recompute; a backup that restores rows but loses or invalidates the embedding store fails the mesh's purpose.
Terms (from the design)
- No separate embedding backup system: shard DBs are class-B (or class-A where the design names them) members of the rotation like any other Turso DB. This issue owns the verification that they are in fact enumerated (the rotation enumerates from
turso db list, so any shard DB living outside Turso is a named exception handled here).
- Any embedding data living outside a Turso DB (local shard files, hosted vector stores) is inventoried by name and given a leg (restic file backup into the mesh repos) or an exclusion with reason.
Acceptance
- Inventory posted on this issue: every embedding/vector store, its home (Turso DB / local files / hosted), and its mesh coverage path.
- Restore verification (the acceptance that matters): one corpus restored from mesh snapshots to a scratch environment; a fixed probe query set returns the same top-k results (ids + order) as against the live store, with zero re-embedding performed. Recorded on this issue.
- Any store found uncovered gets its own follow-on issue filed from this one, linked here.
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Claim — lane felix, 2026-11-23: triaging this issue (read-only verification of scope state, gates, and first slice). No implementation in this pass. dezren39 commented on Nov 23, 2026
Picked up by felix — 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 felix posts progress markers; after 30 minutes of silence any other worker may pick this up.) dezren39 commented on Nov 23, 2026 Triage — lane felix, 2026-11-23 (read-only; verified fresh against origin/main 28d20a7 and live issue states today).
Verdict: not done in any part; implementation-shaped and ungated for its first slice; the restore-proof leg has one soft dependency, named below. Not blocked on #9094.
1. Already done? No.
2. Where the embedding stores actually live (first inventory evidence, from current main):
- The Atlas aggregator writes shards as local SQLite files:
pkgs/atlas-search/crates/atlas-core/src/aggregate.rs builds shard_dir.join(format!("{shard_name}.db")) and refuses to overwrite an existing shard file. Hosted Turso shard creation is explicitly out of scope there ("later atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669 slices").
- A hot copy is published to Turso:
pkgs/atlas-search/atlas_search.py describes querying "a hot copy" published to a Turso DB (--backend turso, libSQL HTTPS pipeline). Vector search itself runs over vector tables (VectorBackend::Scan, exact vector_distance_cos by default) in crates/atlas-core/src/lib.rs.
- So the inventory's central question is real and open: for each corpus, which copy is the restore source of truth — the local shard files (which no filed mesh leg yet covers as files) or the published Turso copy (which rides its DB's class leg)?
3. Gates:
4. Smallest correct first slice: the inventory (acceptance 1) — enumerate every embedding/vector store with its home (Turso DB by name / local shard files / hosted) and its mesh coverage path, and post it here. It decides which leg the restore proof depends on and whether a follow-on file-leg issue must be filed for the local shard files. Owner: the next implementation lane drawn for this issue (filed task/small-fix under the atlas program); no other issue's completion is required first.
Resume condition for the restore-proof leg: the covering leg for the inventoried corpus's home has produced its first snapshot (#13455/#13456 for a Turso home; the file leg or its follow-on for a local-file home). dezren39 commented on Nov 23, 2026
Released by felix (outcome: free). Triaged 2026-11-23 (record comment 7107509376): nothing done yet; inventory leg unblocked today and is the smallest first slice; restore-proof leg resumes when the covering leg for the inventoried corpus's home has produced its first snapshot (#13455/#13456 for a Turso home, or the file leg/follow-on for local shard files). Not gated on #9094. dezren39 commented on Nov 23, 2026
Triage — lane oc-code-03, 2026-11-23 (confirming felix's 16:40Z triage; no state change since).
- Already done? No. No inventory posted, no restore verification recorded, no follow-on issues filed. Design note present at
doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md. No queued/parked queue packet covers this issue.
- First implementation step: the inventory leg (ungated). Enumerate every embedding/vector store (atlas-search shards and any others), its home (Turso DB / local files / hosted), and its mesh coverage path; post the table on this issue. Smallest first slice; needs no gate.
- Second leg (gated): restore-proof — restore one corpus from mesh snapshots to scratch, fixed probe queries return identical top-k with zero re-embedding. Resumes when the covering leg for the inventoried corpus's home produces its first snapshot (impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455/impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456 if Turso-homed, still OPEN; or the file leg/follow-on if local). Not gated on research(atlas): OpenCode DB backup economics — copy vs zstd vs restic-delta cost + growth model #9094 (still OPEN, unrelated leg).
- Suggested packet: small_fix slice owning the inventory table only, with the restore-proof explicitly deferred to a follow-on gated on the covering leg's first snapshot.
dezren39 commented on Nov 23, 2026 Follow-on filed: #13824 (inventory leg — enumerate stores and mesh coverage, ungated). The restore-proof leg will be filed separately once the inventory names the corpus home. dezren39 commented on Nov 24, 2026 Embedding / vector store inventory (from #13824)
Inventory leg done — verified against origin/main fc438864a by code + doc evidence. Durable record: doc/backups/embedding-store-inventory.md (PR incoming from branch xaltha/13824-backup-inventory), kept honest by pkgs/cold-store-reaper/tests/test_embedding_store_inventory.py (every vec_<model>_<dims>_f32 table the code uses must stay named; every row must carry a coverage disposition).
| Store |
Vectors |
Home |
Mesh coverage path |
Status |
Canonical Turso DB atlas — vec_snowflake_m_v2_768_f32 |
Production vectors, 107,639 chunks at the 2026-10-31 census; Snowflake arctic-embed-m-v2.0 rev 95c27414, 768d |
Turso DB atlas |
Class A rotation leg #13455 (slice 1 PR #13476 in review). Today: cold-store-nightly → Drive + PITR 30d + Delete Protection; local source ~/atlas/turso-atlas/data/atlas.db covered daily by atlas-backup |
Covered by existing legs; mesh leg pending #13455 |
Canonical DB — vec_bge_small_384_f32 |
Dormant legacy fallback, BAAI/bge-small-en-v1.5, 384d; no Rust code names it |
Same DB / file as above |
Rides the canonical row’s legs |
Covered (dormant) |
Scan shards atlas-core-<tier>-<topic>-<nn> — vec_snowflake_m_v2_768_f32 per shard |
Per-shard vectors; 29 topic shards at the 2026-10-31 census (28 internal / 1 secret / 0 public) |
Turso DB per shard (if ATLAS_SHARDS=turso[:org]) or local .db file (if dir:<path>) |
Turso-homed: class B rotation #13456 + today cold-store-nightly + PITR. Local-file: no leg — follow-on #14032 |
Partially covered — local-file home uncovered, follow-on #14032 |
Content stores atlas-core-<tier>-content |
No vectors (messages/sessions for hydration only) |
Turso DB per tier |
Out of scope — no vectors; the DBs ride the class B rotation |
Out of scope (no vectors) |
Local side-store vector files (ATLAS_VEC_DB) |
Vectors joined to the local publish by content_hash |
Local files (path via env; not set in any shipped config) |
No leg today — follow-on #14032 |
Uncovered — follow-on #14032 |
Query-embedding cache DB (ATLAS_EMBED_CACHE_TURSO_URL, table query_embedding_cache) |
Cached query vectors (pure function of query text + model) |
Turso DB, only when the env var is set; not set in any shipped config — existence unverified |
If present: class B rotation #13456 via enumeration — covered by design. Verify with turso db list (#14032) |
Covered-by-design if present; existence unverified |
| In-memory query-embedding cache (~10,000 entries) |
Cached query vectors, ephemeral |
Process memory |
Exclusion — not durable, regenerable on miss |
Excluded with reason |
Worker Durable Object QueryCache entries (entry.embedding_json) |
Per-key query embedding + result, retained indefinitely |
Cloudflare Durable Object SQLite (hosted) |
Exclusion — regenerable cache, re-embed on miss; no export path named |
Excluded with reason |
D1 hot cache atlas-hot-cache |
No vectors (opaque cached payloads; storage layer only, not wired in) |
Cloudflare D1 |
Out of scope — no vectors; D1 itself is class D (#13458) |
Out of scope (no vectors) |
| OpenClaw memory-lancedb store |
Agent-memory vectors, Qwen3-Embedding-0.6B, 1024d — incomparable with the Atlas space; Atlas re-embeds at promotion |
Local files under ~/.openclaw |
Existing leg: openclaw-backup daily tar.zst → local + R2 + Drive, 30-day retention |
Covered by existing leg |
| Staging DBs / registry DB / gate records |
No vectors by design |
Local SQLite/libSQL files |
Out of scope — no vectors; working state, rebuilt from sources |
Out of scope (no vectors) |
Feedback JSONL + query traces (~/.local/state/atlas-search/) |
No vectors (votes, timings) |
Local files |
Out of scope — no vectors |
Out of scope (no vectors) |
Uncovered → follow-on filed
Also checked, no vector store
fleet-search embeds queries but stores no vectors; the embedding hits outside atlas-search are HTML/text embedding; no qdrant/pgvector/Chroma/Weaviate/Pinecone/Milvus/FAISS/sqlite-vec in the tree. The ONNX model snapshot is weights, not a store.
This satisfies #13824’s acceptance (inventory posted here; uncovered stores have their follow-on). The restore-proof leg stays deferred per #13824 — gated on the covering leg for the inventoried corpus’s home producing its first snapshot. dezren39 commented on Nov 24, 2026 #14032 result (lane oc-code-06, task 21637, 2026-11-24): live homes verified, exclusions recorded — no file leg warranted.
- Shard mode live: monolith.
atlas-search.service (fleet serve search) has empty systemd Environment= and no shards key in ~/.local/state/atlas-search/service.json; ATLAS_SHARDS unset, no dir:<path> home. Turso-homed shards (31 atlas-core-* of 42 DBs in turso db list) ride the class-B rotation impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456 by enumeration.
ATLAS_VEC_DB unset (service env, shell, nixos/). ~/atlas/v3/vec-snowflake.db (101,471 rows) + vec-snowflake-modal.db are unserved promotion working state; live vectors (107,639 rows) are served from Turso-hosted atlas — the canonical covered copy. Recomputable from covered chunks + model rev.
- Query-cache Turso DB absent (no cache/embed DB in
turso db list, env unset) — memory-only cache; joins impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456 by enumeration if ever created.
Inventory updated in PR #14067 (stacked on #14047; closes #14032). No new schedule, so no schedule-registry row. The restore-proof leg stays gated as designed. dezren39 commented on Nov 24, 2026
Triage — lane oc-code-08, 2026-11-24 (fresh check; task 22318).
Verdict: still open, partially implemented; inventory leg done, restore-proof leg gated. No new implementation in this pass.
dezren39 commented on Nov 24, 2026 Follow-on filed: task 22736 (Fix #13461: embedding store restore-proof without re-embed pass) in repo-health-code-pilot — gated on the covering leg first snapshot (#13455 for atlas / #13456 for shards). Triage task 22318 complete. developing-today-fleet commented on Nov 25, 2026
Park note — task 22740 (triage of this issue), 2026-11-25.
No duplicate triage needed; the triage state is:
- Acceptance 1 already done — via impl(backups): mesh file leg — local atlas-search shard + side-store vector files (follow-on of #13824) #14032 / PR docs(backups): resolve #14032 — live-home verification, exclusions recorded, no file leg #14067.
- Acceptance 2 already routed — to blocked queue task 22736, gated on the first mesh snapshot from impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455 / impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456, which does not exist yet (both still open, verified 2026-11-25).
- Task 22740 parked (~24h, not_before 2026-11-26T09:58:03Z) with wake condition recorded in the park reason,
progress.next, and the ready condition: {"kind":"issue_closed","repo":"developing-today/code","issues":[13455,13456]} — wake when impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455 AND impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456 are closed, or a first mesh snapshot is recorded here, then re-triage acceptance 2.
developing-today-fleet commented on Nov 27, 2026 Lane any-n — task 22736 disposition (2026-11-27): blocked on the required first R2 snapshot. Fresh checks show #13455 still has no snapshot: its runner PR #14675 is open with changes requested, and the live-first-light follow-on has not run. #13456 also has no snapshot; its live exporter pass remains parked until a disposable/non-sensitive class-B target is identified. This restore-proof cannot start until either covering leg produces its first R2 snapshot. No restore or re-embedding was performed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|