Repository navigation
Description
Parent: #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 reverse-direction leg for Cloudflare D1: scheduled D1 exports land in a dedicated Turso database as their backup home, per the design's appropriateness line (§6) — D1 is SQL-shaped, small, and its native export is a SQL file, so a Turso home gives it PITR + the mesh's restic coverage for free. First tenant: the fleet-queue-backup D1 database created under #8584. The #8584 export timer (fleet-queue Turso → D1) is the opposite direction and is untouched by this leg; this leg protects the D1 side itself.
Terms (from the design)
- Cadence: weekly export of each in-scope D1 database, imported into its own Turso home DB (
d1-backup-<name>), replacing the prior import wholesale (the Turso home is a backup target, never a live read path). - An export whose import fails leaves the previous import intact and is named in the run record.
- Out of scope by the appropriateness line: D1 databases that are themselves pure replicas of a Turso source (their source's mesh coverage is their backup) — each exclusion is recorded by name on this issue when the leg is implemented.
Acceptance
-
fleet-queue-backupD1 exported and imported into its Turso home on the weekly schedule; import record (row counts per table) posted on this issue. - Restore verification: the D1 database is rebuilt from its Turso home into a scratch D1 (or local SQLite equivalent) and table row counts match the export. Recorded on this issue.
- The appropriateness line is applied explicitly: every D1 database in the account is listed on this issue as in-scope or excluded-with-reason.
- Schedule registry row updated in the implementation PR.
Acceptance criteria
- Delivered: Impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first) — the outcome named in the title is demonstrably in place.
- The implementation matches the scope, design record, and constraints stated in this issue body; no stated scope is silently dropped.
- Verification evidence is recorded on this issue (tests run, commands executed, or measurement output), naming what was checked.
- Any follow-on gaps found during the work are filed as their own issues and linked from this issue.
Activity
developing-today commentedon Nov 23, 2026
CODE-4902
dezren39 commentedon Nov 23, 2026
Triage record — lane oc-code-07 (queue task 21374)
Verdict: live and ungated — route the first implementation step.
Scope check (fresh 2026-11-23): issue OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels. Design
doc/2026-11-23T16-34-18Z_design_backup_mesh/note.mdpresent on main; Class D (§4, §6, §10) fully specifies this leg. Parent #9093 priority/high. No gate: Class D is independent of the restic mesh legs (#13455–13457) and of #9094/#13462; #13463 (verification rotation) consumes this leg's output, it does not precede it. The #8584 Turso→D1 timer is explicitly untouched.First step packet (route this): build the
fleet-queue-backuppipeline — weekly scheduled D1 export → import into new Turso homed1-backup-fleet-queue-backup(wholesale replace; home is backup target, never live read path) → import record with per-table row counts posted here → first restore verification to a scratch target (row counts match export, never a production write, per §9) →doc/fleet-schedule-registry.mdrow in the same PR. House rules apply: secrets by name only, remote dispatch for builds/tests, schedule row in the same PR.Second step (follow-on, not in the first packet): account-wide D1 inventory — list every D1 database, apply the §6 appropriateness line, record in-scope vs excluded-with-reason by name on this issue (covers acceptance item 3, including the pure-replica-of-Turso exclusion).
Acceptance carried from the issue: pipeline on weekly schedule with import record; restore verification recorded; full D1 list classified; registry row landed.
dezren39 commentedon Nov 23, 2026
Claim — lane felix, 2026-11-23: starting the first-step packet routed by the triage of record (task 21374). Done check against origin/main: criteria for this leg are NOT landed — infra/fleet-queue-backup/ holds only the Turso -> D1 direction (#8584). Building the class-D pipeline here: weekly D1 export -> staged wholesale import into the Turso home d1-backup-fleet-queue-backup (a failed import leaves the previous import intact), import record in the home, restore-verification drill (home -> local SQLite, counts vs the import record), systemd weekly units + schedule-registry row in the same PR. The live provisioning + first live run/record/verification and the account-wide D1 inventory (step 2 of the triage packet) will be dispositioned exactly on this issue when the code lands.
dezren39 commentedon 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 whilefelixposts progress markers; after 30 minutes of silence any other worker may pick this up.)fix(backups): the swap's live set must exclude the staging tables (#1…
test(backups): drop the index before its table in the v2 fixture (#13458
fix(backups): swap rollback must not drop the retiring set it restores (
dezren39 commentedon Nov 23, 2026
Lane felix — class D first packet landed in PR #13539 (not merged; Felix reviews/merges).
Landed: the D1 → Turso-home pipeline for the
fleet-queue-backupD1 database — staged wholesale import into the new homed1-backup-fleet-queue-backupwith emitted-count verification cross-checked against the source (a mid-run source move fails the run and leaves the previous import intact), a marker-witnessed swap with interrupted-swap recovery, an import record with per-table counts, a restore drill that rebuilds the database from the home alone into a local SQLite file and verifies counts against the record, the weekly systemd service/timer (Sun 03:40) with its registry row, and 9 hermetic tests. Suite evidence: fleet-command run 45230221803, conclusion success — 38 tests across the 9 files ininfra/fleet-queue-backup/tests/(7 new export tests + 3 new D1-home drill tests) plustest-export-arguments.shall passing. Two earlier runs against the branch caught real defects in the new swap/recovery code; both are fixed in-branch with regression tests.. No new dependencies;fq_common.py/restore_drill.pyuntouched.Remaining acceptance after the PR merges — the live leg (the #8584 pattern; needs provisioning, so it is not done from this seat):
d1-backup-fleet-queue-backupand mint the vault secretturso.d1-backup-fleet-queue-backup-rw-token(steps in the infra README/RUNBOOK).systemd/install-units.sh) — until then the registry row reads declared-not-installed.Follow-on, explicitly not in this packet: step 2, the account-wide D1 inventory (acceptance item 3).
dezren39 commentedon Nov 23, 2026
Released by
felix(outcome: free). Class D first packet landed in PR #13539 (unmerged, Felix reviews): D1-to-Turso-home pipeline, restore drill, weekly units + registry row, 38-test suite green (run 45230221803). Issue stays open for the live leg (provision home + vault token, laptop install, first live import record, live restore verification) and the step-2 D1 inventory follow-on. Disposition: issue comment 7109425269.8 remaining items
developing-today-fleet commentedon Nov 25, 2026
Evidence for this leg's remaining step, recorded during the #14302 fix (2026-11-25):
~/.local/share/fleet-queue-backup/repo, following main per PR fix(backups): backup units update their service-owned checkout to main before running #15025) and the timer is enabled: next fire Sun 2026-11-29 03:43 CST.turso.d1-backup-fleet-queue-backup-rw-token, is absent from the secrets store — verified by name viafleet secrets list(257 entries) on 2026-11-25. The export leg's tokens (turso.fleet-queue-rw-token,cloudflare.api-token-account-wide) are present.d1-backup-fleet-queue-backupis provisioned and that token is minted — the provisioning step this issue still owns. The failure will be visible through the unit-failure notification, not silent.developing-today-fleet commentedon Nov 26, 2026
Triage recheck (2026-11-26, task 24336): #13458 remains OPEN. Code acceptance for the first leg is already in merged PR #13539 (weekly D1→Turso-home pipeline, restore drill, and registry row); the timer was subsequently installed and enabled from the service-owned checkout (evidence in the 2026-11-25 comment; next fire Sun 2026-11-29 03:43 CST). Fresh
fleet secrets liststill does not containturso.d1-backup-fleet-queue-backup-rw-token, so the live service cannot yet authenticate to the Turso home. Resume condition: provisiond1-backup-fleet-queue-backupand mint/store its write token under that exact secret name; then run the service, record the per-table import counts, and perform the restore drill. Account-wide D1 inventory/classification remains afterward. This is a hands-on provisioning/credential step, not a code gap; no new code packet was filed.dezren39 commentedon Nov 29, 2026
Census note — CEN-C13, 2026-11-29
Full body + comments re-read firsthand for the 2026-11-29 census. (Re-delivered: the original posting pass was lost to GitHub's addComment secondary rate limit; labels below were applied live by the census.)
Verdict: blocked — code complete; a provisioning/credential step remains.
Blocker: the Turso home
d1-backup-fleet-queue-backupis not provisioned and the secretturso.d1-backup-fleet-queue-backup-rw-tokenis absent from the secrets store. The installed weekly timer (Sun 03:40, first fire 2026-11-29 03:43 CST) fails at fire until both exist. This is a hands-on provisioning step, not a code gap. After it: first live import record, live restore verification, and the step-2 account-wide D1 inventory.Gaps: no priority label; stale
status:in-review(code merged 2026-11-23 via PR #13539, nothing in review); the live blocker was spread across three triage passes.Strengths: exemplary body (scope, design terms, 4 checkable acceptance items); merged PR #13539 evidence is complete (38-test suite, run 45230221803); the missing-token finding was verified by name against
fleet secrets listtwice (2026-11-25, 2026-11-26).Labels (applied by the census): added
priority/high(parent #9093 is high; live timer failing at fire), addedstatus/parked, removed stalestatus:in-review.developing-today-fleet commentedon Nov 29, 2026
Priority validation 2026-11-29 (Felix): priority/high → priority/normal — this is one mesh leg of the same class as its sibling legs #13455/#13456/#13457, which sit at normal; its code is complete (PR #13539) and the remainder is a provisioning step (Turso home + token), and being blocked does not raise a band.
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Audited live on 2026-11-29 against the house label taxonomy: details, labels, blockers, priority.
Gaps found: no ## Acceptance criteria section in the body
Strengths found: detailed body with scope and context a picker-up can start from; links a parent issue and/or design record; active discussion: 14 recent comment(s) skimmed
Comment skim: comments mention blocking (14 comments in the latest page).
Actions taken by the census: appended ## Acceptance criteria section to the body (original text unchanged).
Priority checked: the current priority label matches the census priority bands; no reprioritization made.
developing-today-fleet commentedon Nov 30, 2026
Link from lane 0900-FT (xaltha), 2026-11-30: the #17628 pilot slice (first database of this leg) lands its runbook/design record as PR #17641 —
doc/2026-11-30_pilot_fleet-queue-backup-d1-turso-home.md— covering export mechanics, thed1-backup-<name>home convention + staged import/integrity record, restore verification viarestore_drill_d1_home.py, the appropriateness reason test for the next D1 database, and cadence/retention + watchdog failure surfacing. The live first export + drill is filed as follow-on #17640 (only gate: provision the home + mint theturso.d1-backup-fleet-queue-backup-rw-tokenvault entry).developing-today-fleet commentedon Nov 30, 2026
Mesh slice landed for review — lane 0900-FN (xaltha), 2026-11-30. #17628 (the fleet-queue-backup pilot slice of this leg) is carried by PR #17645: runbook/design record at
doc/2026-11-30_runbook_fleet-queue-backup-turso-home/main.mdcovering export mechanics, thed1-backup-<name>home + staged import + import-record integrity, restore verification, the §6 appropriateness line applied to this DB, and cadence/retention/failure surfacing. The live first export is filed as follow-on #17643 (home provisioning + token mint + first verified import + drill), since the homed1-backup-fleet-queue-backupis not yet provisioned.developing-today-fleet commentedon Nov 30, 2026
Correction to my note above (lane 0900-FN): the #17628 runbook slice was landed by lane 0900-FT as PR #17641 (MERGED, merge commit 744cf8d) — my PR #17645 was a three-second claim-race duplicate and is closed unmerged. The live-leg follow-on of record is #17640 (FT's), not my #17643 (closed as duplicate).