GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first) · Issue #13458 · developing-today/code

impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first) #13458

New issue
Copy link
New issue
Copy link
Open
Open
impl(backups): mesh leg — D1 exports → Turso backup home (fleet-queue-backup D1 first)#13458
Copy link
Labels
epic/atlas-programReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestqueue/parkedQueue task is parked (waiting on CI, time, or an event)status:in-reviewtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 23, 2026
Issue body actions

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-backup D1 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.

Activity

  1. dezren39
    added
    kind/featureNew feature or capability request
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    epic/atlas-programReprioritization program epic (2026-11-12)
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    developing-todayBot
    on Nov 23, 2026 – with developing.today
    Contributor
    More actions

    CODE-4902

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    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.md present 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-backup pipeline — weekly scheduled D1 export → import into new Turso home d1-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.md row 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.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    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.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    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.)

  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 23, 2026
  7. dezren39
    added 3 commits that reference this issue on Nov 23, 2026

    fix(backups): the swap's live set must exclude the staging tables (#1…

    21b312f

    test(backups): drop the index before its table in the v2 fixture (#13458

    5c52feb

    fix(backups): swap rollback must not drop the retiring set it restores (

    fc40874
  8. developing-today
    added
    status:in-review
    on Nov 23, 2026
  9. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    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-backup D1 database — staged wholesale import into the new home d1-backup-fleet-queue-backup with 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 in infra/fleet-queue-backup/tests/ (7 new export tests + 3 new D1-home drill tests) plus test-export-arguments.sh all 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.py untouched.

    Remaining acceptance after the PR merges — the live leg (the #8584 pattern; needs provisioning, so it is not done from this seat):

    1. Provision the Turso database d1-backup-fleet-queue-backup and mint the vault secret turso.d1-backup-fleet-queue-backup-rw-token (steps in the infra README/RUNBOOK).
    2. Install the units on the laptop (systemd/install-units.sh) — until then the registry row reads declared-not-installed.
    3. First live run: post the import record (per-table counts) on this issue.
    4. Live restore verification from the home, recorded here.

    Follow-on, explicitly not in this packet: step 2, the account-wide D1 inventory (acceptance item 3).

  10. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    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.

  11. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 23, 2026
  12. dezren39
    added a commit that references this issue on Nov 23, 2026

    Merge pull request #13539 from developing-today/felix/13458-d1-turso-…

    192fd04
  13. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    Merged by Felix after review — PR #13539.

    The Class D code packet: staged D1 → Turso-home import for the fleet-queue-backup database, with the swap committed behind a marker whose import_id must match the import record, the pre-swap live set carried in the marker so an interrupted swap rolls back precisely, and a restore drill that rebuilds from the home alone. I spot-checked the commit-witness logic in export_to_turso.py before merging. The weekly timer's registry row landed in the same PR per the schedule rule.

    Evidence: full directory suite green on run 45230221803 (38 tests across 9 files + the argument checks). The two earlier red runs were the suite doing its job — they caught a staging-table swap defect and a rollback ordering defect, both fixed in-branch with a regression test.

    #13458 stays open for the live leg, named on the issue: provision the Turso home, mint the vault token, install the units on the laptop, first live import + restore verification; step 2 (account-wide D1 inventory) follows.

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    Lane xaltha — queue task 21385 (Class D step 1) was handed to this lane, but the step-1 code packet already landed and merged as PR #13539 (felix/13458-d1-turso-home, merged 2026-11-23T17:59:59Z): D1 → Turso-home pipeline, staged wholesale import, restore drill, weekly units + registry row. No duplicate implementation started; the queue task is being closed as already-delivered by merged #13539. What remains open on this issue is the live leg noted in the release comment (provision the Turso home, vault token, laptop install, first live import + import record) — that is follow-up work, not this step-1 packet.

  15. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    Triage pass (task 22316, lane oc-code-02, 2026-11-24)

    Fresh state: issue open. The code packet is merged as PR #13539 (D1 → Turso home pipeline, staged import, restore drill, weekly units, registry row). Queue task 21385 was already closed as delivered by #13539.

    Remaining, per the 2026-11-23 release comment: the live leg. That covers provisioning the Turso home, the vault token, the laptop install, and the first live import with its import record. These are hands-on steps and need a person's action on the vault and laptop.

    Verdict: keep #13458 open for the live leg. No code change is needed in this pass.

  16. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    Re-triage confirmation (queue task 22700, follow-on of task 22316, 2026-11-24): no change since the 08:11Z triage pass. PR #13539 is MERGED (2026-11-23T17:59:59Z); queue task 21385 already closed as delivered by it; no queued/blocked queue items remain for this issue. Verdict stands: keep open for the live leg (provision Turso home, vault token, laptop install, first live import + import record) and the step-2 D1 inventory follow-on — both are hands-on vault/laptop steps, not code a lane can run, so no new packet routed.

  17. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    Contributor
    More actions

    Evidence for this leg's remaining step, recorded during the #14302 fix (2026-11-25):

    • The weekly d1-home units are now installed from the dedicated service-owned checkout (~/.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.
    • The leg's token, turso.d1-backup-fleet-queue-backup-rw-token, is absent from the secrets store — verified by name via fleet 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.
    • So the d1-home service will fail at its first fire until the Turso home d1-backup-fleet-queue-backup is 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.
  18. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 26, 2026 – with developing.today fleet
    Contributor
    More actions

    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 list still does not contain turso.d1-backup-fleet-queue-backup-rw-token, so the live service cannot yet authenticate to the Turso home. Resume condition: provision d1-backup-fleet-queue-backup and 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.

  19. developing-today-fleet
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    and removed
    queue/queuedHas a queued queue task
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/atlas-programReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestqueue/parkedQueue task is parked (waiting on CI, time, or an event)status:in-reviewtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.