GeezerVison is showing github.com — impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas · Issue #13455 · developing-today/code
impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455DescriptionParent: #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 pilot leg of the mesh: per-database restic backups of the fleet platform Turso databases — fleet-queue, fleet-platform, and the canonical atlas DB — as compressed deltas (stream-zstd) into the R2 restic repository, on the design's class-A terms. Reuses the proven export path (pkgs/cold-store-reaper/scripts/export-turso.sh, with its libsql /dump repair filter) and the repo-archive/laptop-state restic pattern (same password key, dedicated repository restic-turso-mesh in the R2 supabase-backups bucket).
Terms (from the design)
- Cadence: weekly per DB for class A (inside the 14-day mesh cadence, doubled frequency for the platform class), staggered across the week.
- Retention in the R2 repo: keep-daily 7 / keep-weekly 8 / keep-monthly 12 (design §5).
- The nightly cold-store full-export leg keeps running until this leg's restore verification has passed twice; then it is the delta leg that carries these DBs (the design's replacement path for the full-export leg, per DB class).
Acceptance
- Restic snapshots for all three DBs land in the R2 repo on the staggered weekly schedule; snapshot listing recorded on this issue.
- Delta efficiency measured and recorded: second-cycle snapshot data-added vs full dump size, per DB.
- Restore verification: one snapshot per DB restored to a scratch libSQL/SQLite target; row counts per table match the export manifest; the restored
fleet-queue copy answers a read-only queue query. Recorded on this issue.
- Watchdog: the leg's job is visible to the laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841 laptop-backups watchdog (freshness + completion evidence), or the gap is filed as its own issue.
- Schedule registry row updated in the implementation PR.
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Triage of #13455 complete (task 21371, lane oc-code-04).
The scope is class A: weekly staggered restic snapshots of fleet-queue, fleet-platform, and atlas into the new R2 repo restic-turso-mesh, per-DB tags, keep-daily 7 / keep-weekly 8 / keep-monthly 12, reusing the proven export-turso path and the repo-archive restic pattern. The design's acceptance remains the staggered snapshot record, delta-efficiency measurement, per-DB restore verification, watchdog visibility, and the schedule-registry row in the implementation PR.
Verdict: live and ungated. No gate blocks the first step: the export path (export-turso.sh with the libsql repair filter), the shared restic password key, and the supabase-backups R2 bucket all exist; the #9094 research gate constrains only the class-F leg (#13462); replication into the other stores is owned separately by #13457, which consumes this leg's repo. Composes with the sibling class-B slice (task 21384, cohort planner): that slice assigns the general inventory, this leg's planner assigns the three platform DBs to staggered weekdays and defines the manifest contract.
First implementation step: a pure, testable class-A stagger planner and export-manifest builder. It assigns the three class-A databases to distinct weekdays deterministically and builds the per-database export manifest (per-table row counts and content hashes plus dump sha256) that restore verification will check against, proven with property-based tests against fixtures. No live Turso export, R2 write, or credential access in this slice.
Enqueued as feature-slice task 21387 in repo-health-code-pilot: class-A stagger planner and export-manifest builder. It owns the planner, the manifest builder, and targeted tests; the backup script, systemd timer, schedule-registry row, watchdog integration, and restore drills remain subsequent slices under #13455 / #13463.
Design source: merged PR #13467 (design doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md), sections 2, 3, 4, and 9. No implementation or live backup operation was performed by this triage. dezren39 commented on Nov 23, 2026 🤖 Slice 1 done — class-A stagger planner + export-manifest builder
- Agent: fleet queue worker, lane oc-code-08 (repo-worker-code), task 21387
- PR: feat(cold-store-reaper): class-A stagger planner and export-manifest builder (#13455 slice 1) #13476 (branch `lane-oc-code-08/13455-class-a-slice1`) — `turso-mesh-class-a.py` planner/manifest + property and CLI example tests; oracle `python3 -m pytest pkgs/cold-store-reaper/tests/test_turso_mesh_class_a.py` → 15 passed; full cold-store-reaper suite 229 OK.
- Scope kept: no live export, no restic/R2, no credentials, no schedule — later slices.
dezren39 commented on Nov 24, 2026 Triage verdict (oc-code-03, 2026-11-24): still open, partially implemented. Merged: slice 1 — class-A stagger planner and export-manifest builder (#13476), class-B cohort planner (#13505), watchdog per-leg restore-verification reporting (#13671). Not on main: the restic execution leg (R2 restic-turso-mesh repo, stream-zstd deltas per DB), delta-efficiency measurement, restore verification to a scratch libSQL target with row-count match against the manifest, and the schedule registry row. Remaining work is a scoped follow-on: slice 2 = restic backup runner for fleet-queue / fleet-platform / atlas with the registry row, slice 3 = restore verification and recorded evidence. Routing as feature-slice follow-on packets. Tracking: #14158. dezren39 commented on Nov 24, 2026 Triage verdict (lane any-n, 2026-11-24 ~08:30Z): concur with the record above. Still open and partially implemented (slices 1 merged: #13476, #13505, #13671). The restic execution leg, delta measurement, restore verification and schedule row are not on main. Slice 2 (restic runner for fleet-queue/fleet-platform) is the routed follow-on; no duplicate packet created. dezren39 commented on Nov 24, 2026 Triage record (task 22703, lane felix, 2026-11-24): still open — partially done. Concurs with the two 2026-11-24 triage records above; this pass re-verified against current main and converted the remaining work into filed slice issues.
Done-check (evidence)
Done and on main:
Not done (nothing on main, no open PR):
- No restic execution leg: no runner script, no
restic-turso-mesh repo init, no systemd units, and no schedule-registry row for this leg (registry grep confirms).
- No snapshots, so no delta-efficiency measurement and no restore verification yet.
Remaining slices (filed this pass)
If a queue packet for slice 2 already exists from the earlier triage routing, it should point at #14247 rather than duplicate it.
Blockers
No implementation or live backup operation was performed by this triage. dezren39 commented on Nov 24, 2026 Triage verdict (task 22703, lane code-h, 2026-11-24): still open — partially done.
Evidence (fresh readback 2026-11-24T14:07Z):
- impl(backups): mesh leg — Turso platform DBs (fleet-queue, fleet-platform, atlas) → R2 restic deltas #13455 OPEN, no linked PRs carrying work in the readback.
- Merged slice 1: class-A stagger planner + export-manifest builder (feat(cold-store-reaper): class-A stagger planner and export-manifest builder (#13455 slice 1) #13476); class-B cohort planner (feat(backups): deterministic class-B cohort planner for the Turso mesh (#13456) #13505) and watchdog per-leg reporting (fix(backups): watchdog reports mesh restore verification per leg and store (#13463) #13671) also on main per prior triage records.
- Remaining work filed: impl(backups): mesh class-A restic backup runner — fleet-queue/fleet-platform/atlas → R2 restic-turso-mesh (#13455 slice 2) #14247 (slice 2, restic runner code-only), impl(backups): mesh class-A live first light — init restic-turso-mesh, first snapshots + delta measurement (#13455 slice 3) #14250 (slice 3, live first light), impl(backups): mesh class-A first restore verification — per-DB restore vs manifest (#13455 slice 4) #14251 (slice 4, restore verification). impl(backups): mesh class-A restic backup runner — fleet-queue/fleet-platform/atlas → R2 restic-turso-mesh (#13455 slice 2) #14247 body now carries an explicit
Refs #13455 marker, so the completion gate verifies.
- No close: acceptance items (snapshots in R2 repo, delta measurement, restore verification x2, watchdog visibility, schedule-registry row) are not on the issue.
Remainder owned by #14247 (open, links #13455). developing-today-fleet commented on Nov 26, 2026 Fresh triage (oc-code-01, task 24589, 2026-11-26): #13455 remains OPEN and partially implemented; do not close. The previously completed planner/manifest, cohort-planner, and watchdog groundwork remains as recorded in the earlier notes. Current remaining acceptance is already split into #14247 (code-only runner), #14250 (live first light and delta measurement), and #14251 (restore verification); #13463 owns the recurring restore-verification rotation/watchdog.
Current recheck: #14247 remains OPEN and PR #14675 is open/non-draft at head f72f808153a233db18096062862cf579ae1891da. Its latest review is CHANGES_REQUESTED for two concrete issues: --password-env does not provide the named variable through a restic-supported password interface, and manifest construction reads the full dump into memory instead of keeping the stream bounded. No merge until the author fixes these and focused verification is green. The PR comment on #14247 records the same blockers.
Disposition: keep #13455 open; #14247 continues to own slice 2 and its PR review fixes, while #14250/#14251 remain the live operational follow-ons. No duplicate queue packet created. Resume the slice-2 verdict after PR #14675 changes or merges; retain the live-first-light/restore gates before retiring the full-export leg. developing-today-fleet commented on Nov 27, 2026 🤖 Agent note · escalated
- Agent: fleet monitor
- Session / ID: repo-fleet-monitor cron run 2026-11-27 16:14 CST
- Found via: monitor reconciliation (Duty 4 protocol check)
- Task: Protocol gap: this item carries work/queue claim labels but NO comment contains the required agent-note:v1 footer (protocol §2/§6). The holding agent did not leave the required agent note. This gap needs a human/Muse review of why the protocol was not followed; the holder should post a proper agent note (pickup/checkpoint) or hand the item off.
- Expectation: holder posts an agent-note:v1 note or releases the item.
- Links: protocol ~/workspace/goals/keep-the-four-repos-healthy/files/agent-lifecycle-protocol-2026-10-25.md
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|