GeezerVison is showing github.com — impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso · Issue #9093 · developing-today/code
impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso #9093DescriptionWorkstream B — Backup mesh (Turso / R2 / laptop / Google Drive)
Parent program: #8983 · Proto design: doc/2026-11-12T23-59-00Z_design_atlas_v1_proto/note.md §B · Starter: the Atlas v1 design-mill starter issue (sibling).
Current state (verified 2026-11-12)
- 40 Turso databases (~9.4 GB summed; plan meter 11 GB), Scaler plan, overages OFF (24 GB storage is a hard wall). Turso PITR: any point within 30 days on Scaler — but Delete Protection is OFF on every database checked (
atlas, fleet-queue, fleet-platform), and PITR cannot resurrect a deleted DB beyond the 5-day deleted-DB window.
- Existing pieces:
atlas-backup daily (local canonical atlas DB → laptop + R2 supabase-backups + Drive, atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515); repo-archive-backup daily restic to three repos (local, R2, Drive) with check + retention; supabase-backup twice-daily; cold-store-nightly exports every Turso DB → Drive — its 2026-11-12 run FAILED (30-min start timeout, killed; which step timed out is unconfirmed), so the Turso→Drive leg is currently at risk. Coverage audit gaps: audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516. A local restic repo ~/backups/restic/laptop-state/ exists with no identified writer (unconfirmed).
- The OpenCode DB has no scheduled or off-laptop backup (economics: sibling research issue).
Scope — the mesh
Cadence: every Turso database backed up on a 10–15 day cycle (~14 days); Turso's own 30-day PITR covers the window until a backup ages past 30 days, after which the restic chain is the protection.
- Turso → R2: per-DB restic backup as compressed deltas (stream-zstd) into R2 — replacing/augmenting today's full-export leg with delta efficiency; restore-tested.
- R2 → laptop and R2 → Google Drive: the mesh is R2↔laptop↔Drive↔R2 plus Turso into all three stores; every store can rebuild any other. Retention per leg specified.
- D1 + laptop DBs → Turso where appropriate (D1 exports and laptop-local DBs land in the Turso side of the mesh as their backup home), with the appropriateness line drawn explicitly.
- Embeds backup: the embedding stores (vector tables / shard DBs) are inside the same mesh — a restore must be able to rebuild search without a re-embed pass.
- Hardening findings folded in: enable Turso Delete Protection fleet-wide (or record why not, per DB); fix or replace the failing cold-store-nightly Turso export leg; identify or retire the orphan
laptop-state restic repo; keep the freshness watchdog (laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841) as the verification surface, with every mesh leg restore-verified on a schedule, not just backup-verified.
- Sequencing with pm stack: multi-board hierarchy + full task genealogy #9060/epic: hosted editions — PM service, ID service, and fleet tool as workable Cloudflare Workers equivalents (multi-tenant Turso/R2 architecture) #9078 hosting work: the mesh must not depend on the hosted editions existing; it protects today's laptop+Turso shape and extends to per-user Turso DBs (design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083) when they arrive.
Acceptance
- Design doc merged under
doc/: mesh topology diagram/table (source → leg → store → retention), the 14-day cadence mechanics per DB class, and the PITR-vs-restic protection argument per age band (0–30d, >30d). PR design(backups): backup mesh — topology, cadence per DB class, PITR-vs-restic bands (#9093) #13467 is merged.
- Delete Protection disposition recorded per database. The per-database 42/42 disposition is recorded in the 2026-11-17 issue comment.
- cold-store-nightly failure root-caused or the leg replaced by the mesh design; the interim risk is named on audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516. The interim risk is named on audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516 (comment 7107336806).
- Granular implementation issues filed (per leg + per DB class), each with a restore-verification acceptance step. The legs are tracked by impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455–impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463.
Activitydeveloping-today commented on Nov 12, 2026 dezren39 commented on Nov 17, 2026
🤖 Agent note · triaged — task 18841 (lane code-b)
- Work kind: task/small-fix (step-scoped implementation) · Priority: priority/high (brief line 1 adjacency: the fleet's own queue/platform DBs sit in the unprotected set — Delete Protection OFF everywhere checked and the only every-DB export leg failing; not critical, PITR still covers recent state) · Effort: effort/l (the full mesh; the routed step is m-sized)
- Fresh evidence: issue impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso #9093 OPEN, labels kind/feature + epic/atlas-program only, no comments beyond the Kaneo link; parent epic epic: Atlas program — unified search and memory index over every corpus #8983 OPEN, storage epic epic: storage program — backups, cold store, and disk headroom #8988 OPEN; queue scan found no existing packet for impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso #9093.
- First concrete step: harden before building — diagnose/fix the failed cold-store-nightly leg, settle Delete Protection per DB, identify or retire the orphan laptop-state restic repo (issue scope item 5). The mesh legs (items 1-4) follow as their own step packets; building new legs on an untrusted foundation is the failure this ordering avoids.
- Routing: step-1 hardening packet enqueued as task 20293 (priority 20), acceptance = a completed cold-store-nightly run recorded, per-DB Delete Protection state recorded, orphan repo resolved, watchdog laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841 reporting the leg fresh.
dezren39 commented on Nov 17, 2026
🤖 Agent note · step-1 hardening done, PR awaiting CI — task 20293 (lane code-a)
All four step-1 acceptance items are settled with fresh evidence from 2026-11-17:
- Delete Protection: ON for all 42 fleet Turso databases. Inventoried via
turso db list (42 DBs), enabled per DB with turso db config delete-protection enable, and verified per DB with show — 42/42 report Delete Protection on, no exceptions and no why-nots outstanding (fleet-queue and fleet-platform included).
- cold-store-nightly failing step identified:
export-turso. The 2026-11-12 run was killed by the service's 30-minute start timeout mid-export (manifest transfer ledger: only 2 backup-uploads filed that night vs 42 expected). Root causes were the timeout itself and ~30 GB of accumulated export scratch in anonymous /tmp dirs. Both were fixed 2026-11-11 — TimeoutStartSec 30m → 120m (d3fa454, nixos/home/laptop-backups.nix) and per-database scratch bounding with a named work dir (b4278bc, export-turso.sh) — but the fix reached the running system only after 2026-11-12 (partial nights 11-13: 8 filed, 11-14: 2 filed). Successful full runs are now on record: 2026-11-15 and 2026-11-16 each filed 42/42 databases (~665 MB each, ledger backup-upload rows), and cold-store-nightly.service last Result=success, ExecMainStatus=0.
- Orphan restic repo resolved — it is not orphaned.
~/backups/restic/laptop-state/ is written by laptop-state-backup.timer/.service ("Daily small-state restic backup - local + R2 + Drive", code#1849), last run 2026-11-16 05:52 CST producing snapshot 8df67bae… plus a fresh .laptop-state-last-success-epoch stamp; next run scheduled 2026-11-17 05:48 CST. The issue's "no identified writer" was stale — no retirement needed.
- Freshness watchdog now covers the repaired leg. PR fix(laptop-backups): watchdog covers cold-store-nightly with completion evidence (#9093 step 1) #10988 adds a
cold-store job to the laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841 watchdog (laptop-backups-watchdog.sh check (e) + nix wiring): timer-trigger freshness plus completion evidence — last service Result must be success and the manifest ledger must hold a fresh backup-upload row, so a fired-but-killed run can never read as fresh again. Test suite passes incl. 6 new cold-store scenarios; a live run of the patched watchdog on the laptop reports OK jobs [dashboard,repo-archive,cold-store] fresh within 26h (exit 0). Deployment rides the normal nixos-rebuild from the module, same as every laptop-backups change.
Parked on: PR #10988 CI + merge. Remaining #9093 scope (mesh legs 1–4) stays for later step packets per the step-1 packet's exclusions. dezren39 commented on Nov 23, 2026 Claim — lane felix, 2026-11-23: running the done check on #9093 against current origin/main (design doc under doc/, Delete Protection disposition, cold-store risk note on #1516, granular follow-on issues). Will post the verification record here; landing only the missing bounded slice if any. dezren39 commented on Nov 23, 2026 Done check + landed slice — lane felix, 2026-11-23 (against origin/main 2a96e87).
Acceptance, item by item:
- Design doc merged under doc/ — landed as PR design(backups): backup mesh — topology, cadence per DB class, PITR-vs-restic bands (#9093) #13467 (awaiting Felix's merge):
doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md — topology table (source → leg → store → retention), 14-day cadence mechanics per DB class (A platform weekly; B general in 14 daily cohorts; C per-user by enumeration when design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083's DBs arrive; D D1 weekly → Turso home; E laptop-local weekly → Turso home; F OpenCode per research(atlas): OpenCode DB backup economics — copy vs zstd vs restic-delta cost + growth model #9094), retention per leg, and the PITR-vs-restic argument per age band (0–30d PITR primary, mesh as deletion/account-loss insurance; >30d restic chain only, thinning accepted deliberately).
- Delete Protection disposition recorded per database — ALREADY DONE in fact: enabled on all 42 fleet Turso databases, verified per DB with
show on 2026-11-17 (step-1 record on this issue; PR fix(laptop-backups): watchdog covers cold-store-nightly with completion evidence (#9093 step 1) #10988 merged). No exceptions, no why-nots outstanding.
- cold-store-nightly failure root-caused; interim risk named on audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516 — root cause ALREADY DONE in fact: the
export-turso step killed by the 30-minute start timeout + ~30 GB unbounded /tmp scratch; fixed 2026-11-11 (TimeoutStartSec 120m d3fa454; bounded scratch b4278bc); full 42/42 successful runs on record 2026-11-15 and 2026-11-16. The interim-risk half was missing and is now posted on audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516 (comment 7107336806). The design (§8) also records the replacement path: the full-export leg retires per class only after that class's delta leg passes restore verification twice.
- Granular implementation issues filed, each with a restore-verification acceptance step — filed in this pass, and each enqueued with a triage packet in the same pass per the filing rules in
doc/agents/one-queue-claiming-work.md:
Scope items 5's remaining pieces were already settled by step-1 (orphan laptop-state repo identified as #1849's, not orphaned; watchdog covers the cold-store leg). Scope item 6's sequencing holds in the design: no dependence on the hosted editions; per-user DBs join by turso db list enumeration.
What remains: PR #13467's merge, then the eight legs above on their own packets. No live backup run, credential use, or laptop state was touched by this lane — the live legs are exactly what the filed issues own. #9093 stays open as the mesh tracker until the legs land. dezren39 commented on Nov 23, 2026 Merged — Felix, 2026-11-23. The backup-mesh design is on main: per-class cadence (platform weekly; general DBs in 14 daily cohorts; per-user by enumeration; D1 and laptop-local weekly into Turso homes), retention applied in R2 only so the three stores cannot drift, PITR-vs-restic decided per age band, and the cold-store leg retires per class only after two passed restore verifications. The two already-landed acceptance items were re-verified in fact (Delete Protection on all 42 fleet DBs; the nightly root cause fixed 2026-11-11), and the interim-risk note is posted on #1516. The eight implementation legs are filed as #13455-#13463, each carrying a restore-verification acceptance step. #9093 stays open as the mesh tracker until the legs land. dezren39 commented on Nov 24, 2026 Lane oc-code-01 (OpenChamber scheduled Fleet run), 2026-11-24: claimed via `fleet agent next`, verified state, parked without a PR.
- Acceptance items 1-4 of the original scope are already met on main (design design(backups): backup mesh — topology, cadence per DB class, PITR-vs-restic bands (#9093) #13467, Delete Protection, cold-store root cause, granular legs filed as impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455-impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463).
- Landed slices since: impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455 class-A planner (feat(cold-store-reaper): class-A stagger planner and export-manifest builder (#13455 slice 1) #13476), impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456 cohort planner (feat(backups): deterministic class-B cohort planner for the Turso mesh (#13456) #13505), impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first) #13458 D1 home (impl(backups): mesh class D — fleet-queue-backup D1 export to Turso home (#13458) #13539), impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463 watchdog mesh surface (fix(backups): watchdog reports mesh restore verification per leg and store (#13463) #13671), all merged 2026-11-23/24.
- Remaining mesh work is live-credential legs (R2 restic writes, Drive replication, Turso home provisioning) plus impl(backups): mesh leg — OpenCode session DB backup (gated on research #9094) #13462 gated on research(atlas): OpenCode DB backup economics — copy vs zstd vs restic-delta cost + growth model #9094. impl(backups): mesh replication — R2 → laptop and R2 → Google Drive restic copies #13457 carries an execution-risk hold note from lane xaltha awaiting Drew's go-ahead, so this lane did not start it.
- No code was changed and no PR was opened in this run. Fleet build dispatch is blocked by fleet: repo-queue dispatch fails with TLS UnknownIssuer behind the egress proxy (Rust TLS ignores SSL_CERT_FILE) #13185 (TLS), so no laptop-verified slice was possible here.
Next slice when picked up: #13457 once Drew clears the hold, or a fresh-run check of #13455 live leg. Keeping #9093 open as the mesh tracker. dezren39 commented on Nov 24, 2026 🤖 Agent note · second-pass verify (pass 2, coverage reconciliation)
- Agent: queue worker (repo-worker-code), lane any-n
- Session / ID: task 21952
- Found via: queue claim (second_pass packet, tracking Queue reprioritization programme 2026-11-24: full census, reorder, unblock #14158)
- Task: Verify-and-route for impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso #9093 — fresh state checked 2026-11-24: issue OPEN (mesh tracker, priority/high). Acceptance items 1–4 landed (design design(backups): backup mesh — topology, cadence per DB class, PITR-vs-restic bands (#9093) #13467 merged; Delete Protection on all 42 DBs; cold-store root cause fixed; 8 legs filed impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455–impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463); landed slices feat(cold-store-reaper): class-A stagger planner and export-manifest builder (#13455 slice 1) #13476, feat(backups): deterministic class-B cohort planner for the Turso mesh (#13456) #13505, impl(backups): mesh class D — fleet-queue-backup D1 export to Turso home (#13458) #13539, fix(backups): watchdog reports mesh restore verification per leg and store (#13463) #13671 merged.
- Verdict: No new packet routed — every leg already holds a live task: queued triage 22314 (impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455), 22315 (impl(backups): mesh leg — general Turso DBs → R2 restic deltas on the 14-day rotation #13456), 22316 (impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first) #13458), 22317 (impl(backups): mesh leg — laptop-local DBs → Turso backup homes (inventory + appropriateness line) #13459), 22318 (impl(backups): mesh coverage — embedding/shard stores restore without a re-embed pass #13461), 22319 (impl(backups): mesh leg — OpenCode session DB backup (gated on research #9094) #13462); parked 21378 (impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463); blocked 21373 (impl(backups): mesh replication — R2 → laptop and R2 → Google Drive restic copies #13457, execution-risk hold awaiting Drew); gate research(atlas): OpenCode DB backup economics — copy vs zstd vs restic-delta cost + growth model #9094 covered by parked 20300. Known non-routables: live-credential legs (need laptop/R2/Drive credentials), fleet: repo-queue dispatch fails with TLS UnknownIssuer behind the egress proxy (Rust TLS ignores SSL_CERT_FILE) #13185 TLS blocking build dispatch, laptop unreachable from this seat. Tracker stays open by design.
- Links: task 21952 · issue impl(atlas/fleet): backup mesh — all-Turso 14d restic-zstd to R2, R2/laptop/Drive mesh, D1+laptop DBs into Turso #9093 · tracking Queue reprioritization programme 2026-11-24: full census, reorder, unblock #14158
dezren39 commented on Nov 24, 2026
Second-pass verdict (openchamber lane oc-code-03, queue task 22803, 2026-11-24)
Fresh state: #9093 OPEN (epic/atlas-program). The 08:05Z verification above still holds. Each open leg has a live queued task, so no new packet is routed and no implementation is started here. dezren39 commented on Nov 24, 2026 Lane oc-code-04 (OpenChamber scheduled Fleet run), 2026-11-24: claimed via fleet agent next (shortlist rung), verified state, no PR opened.
No code changed, no PR opened. #9093 stays open as the mesh tracker. Next slice when picked up: whichever leg task the queue serves once #13457's hold clears. dezren39 commented on Nov 24, 2026 Lane oc-code-06 — shortlist task disposition: COMPLETE (verification; no tracker PR required). Verified against main fdc36c9 on 2026-11-24.
All four original acceptance criteria are satisfied: design #13467 is merged (doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md:62–77 topology/retention, :95–124 cadence, :164–182 protection bands); the recorded Delete Protection disposition covers all 42 DBs (:17–20, operational record comment 6939083421); cold-store diagnosis/replacement is recorded (:21–28, :184–197) and interim risk is on #1516 comment 7107336806; eight implementation issues with explicit restore acceptance are listed at :210–224. This verifies recorded disposition, not a fresh live backup or configuration audit.
Corrections to prior tracker notes: #13462 is now CLOSED, with #14539 and #14583 merged; its remaining Drive/throughput follow-up is #14515. #13457 has no human-hold labels: the old await-owner comment is not a hold. Queued coverage is not ownership; this pass does not assert live broker claims on the children.
Aggregate mesh delivery remains incomplete, so #9093 stays OPEN as the expressly retained tracker. Remaining implementation and restore evidence belongs to the child issues (#13455/#14247/#14250/#14251, #13456/#14211, #13457, #13458, #13459/#13474, #13461, #13463), not a duplicate tracker slice. No repository or live backup state changed; returning to fleet agent next. dezren39 commented on Nov 25, 2026 Lane agent-next-23-local — 2026-11-25: PR #14687 adds the first code slice for mesh replication child #13457: a read-only verifier that compares full snapshot-ID sets across R2, laptop, and Drive, with exact missing/extra IDs. Focused Fleet test dispatch passed: developing-today-forks/fleet#45519357229 (https://github.com/developing-today-forks/fleet/actions/runs/45519357229). This PR does not copy snapshots or perform restore verification.
#9093 remains open as the aggregate tracker; the original four tracker acceptance items are already satisfied, and implementation/restore evidence remains in the child issues.
Next slice: after this PR, turso-mesh-replicate copies the R2 mesh snapshot set to laptop and Drive and verifies both destinations match R2 before a schedule is enabled. dezren39 commented on Nov 25, 2026
Decided: Mark the four original #9093 tracker acceptance items complete, remove the parent priority/high label, and keep #9093 open as the aggregate tracker while implementation continues in child issues.
Why: Design PR #13467 is merged; the 42-database Delete Protection disposition is recorded in the #9093 November 17 comments; the cold-store root cause and interim risk are recorded in #1516 comment 7107336806; and the restore-verified implementation legs were filed as #13455–#13463. Current mesh implementation work belongs to those child issues, including #13457.
Undo: Reopen an acceptance box and reapply priority/high if a new parent-level acceptance gap appears. No child issue or open implementation work is closed by this decision.
By: agent-next-23-local developing-today-fleet commented on Nov 26, 2026 🤖 Agent note · triage (queue task 24755, lane oc-code-02)
developing-today commented on Nov 27, 2026 🤖 Agent note (lane code-j, 2026-11-26, triage task 25230): concur with the 23:38Z oc-code-02 verdict — aggregate tracker stays open, no packet.
developing-today commented on Nov 27, 2026 Triage recheck — code-f, 2026-11-27 (queue task 25632)
Keep OPEN as aggregate backup-mesh tracker; no duplicate implementation packet. Fresh readback:
Follow-up work remains owned by child issue #13457 (replication), with its upstream readiness gate #14250; aggregate tracker stays open until implementation and restore evidence land.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|