Skip to content

impl(backups): mesh restore-verification rotation + watchdog surface (#1841) #13463

Open

Description

@dezren39

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

Backup-verified is not restore-verified. This issue owns the mesh's standing restore-verification rotation and its watchdog surface: every mesh leg is restore-verified on a schedule, and the #1841 laptop-backups watchdog reports mesh health (per-leg freshness + last restore verification per store) alongside the existing jobs. The per-leg issues (#13455, #13456, #13457, #13458, #13459, #13461, #13462) each carry their own first restore verification; this issue owns the recurring rotation after first light.

Terms (from the design)

  • Rotation: one leg's restore verification per week, cycling through all legs and all three stores (R2, laptop, Drive), so every store's copy of every leg is restore-proven at least quarterly.
  • A failed verification is a watchdog failure that names the leg and the store — and files/updates an issue, never just a log line.
  • Drill shape follows the Full stack restore never drilled #10300 cold-restore drill and the Fleet unification slice 6: backups — Turso into D1, repos to Cloudflare plus mirror plus R2 #8584 D1 restore drill: restore to an isolated scratch target only, production stores are never written by a drill, credentials by name only.
  • The existing monthly cold-store drill (cold-store-drill.timer) is the model and stays; the mesh rotation is additive.

Acceptance

  • The watchdog reports mesh legs (freshness + completion evidence, same standard as the cold-store check added in PR fix(laptop-backups): watchdog covers cold-store-nightly with completion evidence (#9093 step 1) #10988) and a stale or failed leg reads as a watchdog failure naming it — demonstrated with one deliberately stalled test leg.
  • The first full rotation cycle completes: every leg × every store restore-verified once, results recorded on this issue.
  • A deliberately corrupted scratch snapshot is caught by the verification (integrity/row-count mismatch named), proving the check is not a rubber stamp.
  • Schedule registry rows updated in the implementation PR.

Activity

  1. added
    kind/feature
    task/small-fix
    epic/atlas-program
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — lane felix, 2026-11-23: triaging this issue (read-only verification of scope state, gates, and the smallest first slice). No implementation in this pass.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

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

  5. added
    queue/claimed
    work/assigned
    on Nov 23, 2026
  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Triage — lane felix, 2026-11-23. Verdict: the surfaces this issue builds on already exist; the mesh scope itself is unstarted, and its full acceptance is gated on the leg issues' first snapshots. Nothing implemented in this pass; the issue stays open.

    1. Already done in fact — the foundations, yes; the mesh scope, no

    2. Gates — named, with current states

    3. Smallest correct first slice

    Extend laptop-backups-watchdog.sh with a mesh section that reads per-leg run/verification records — freshness + last restore verification per store, to the PR #10988 completion-evidence standard — and fails naming a stale or failed leg. Prove it hermetically with the deliberately stalled test leg (acceptance item 1's demonstration) using the existing test suite's stubbing pattern (record path + PATH-resolved tools), and land the rotation schedule's registry rows in the same PR. This slice needs no live snapshot — fixtures stand in for leg records — and it builds the rotation mechanics. The first full cycle (acceptance item 2) can only complete after the leg issues produce their first snapshots and first verifications; that completion is owned by the leg issues + elapsed time, not by this issue alone. Owner of the first slice: the next implementation lane drawn for #13463.

    Resume condition for the cycle-completion leg: at least one leg (class A #13455 is the natural first) has a snapshot in each store it targets and its first restore verification recorded on its own issue.

  7. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Triage complete (record comment 7107575453): watchdog + drill foundations already exist (#1841 closed; PR #10988 standard; #10300/#8584 drills); mesh scope unstarted. First slice (watchdog mesh section + stalled-leg proof + registry rows) is unblocked and fixture-based; full-cycle acceptance resumes when at least one leg (class A #13455 first) has snapshots in its target stores and its first restore verification recorded on its own issue. #13462 slot separately waits on #9094.

  8. added
    queue/queued
    and removed
    queue/claimed
    work/assigned
    on Nov 23, 2026
  9. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Progress note (slice 1, lane oc-code-03): the watchdog mesh surface is implemented and in review as PR #13671 — a mesh job in laptop-backups-watchdog.sh that reads one JSON restore-verification record per leg × store (~/backups/mesh/restore-verification/<leg>.<store>.json, legs class-a/class-b/replicate/class-d/class-e/embeds × stores r2/laptop/drive) and fails naming the leg and store for missing, unreadable, failed, future or >quarter-old (2200h) records. services.laptop-backups.watchdog.meshEnable (default false) and meshMaxAgeHours wire it into the module; no timer/schedule is created in this slice, so doc/fleet-schedule-registry.md is unchanged by it. Evidence: the suite's 18-pair fresh fixture passes, and a deliberately stalled class-a/laptop leg (verified 100 days ago while the rest are 10 days old) is named as leg=class-a store=laptop, alongside failure and missing-record cases.

    Remaining on this issue, in order and each blocked by the leg issues' first verifications: the rotation runner (self-gating weekly script + timer + registry row) that writes these records, the first full-cycle results, and the corrupted-scratch-snapshot check.

  10. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Triage — lane oc-code-02 (queue task 21378), 2026-11-23. Fresh verification this pass; nothing implemented here, triage only.

    State: PR #13671 (watchdog mesh surface — the mesh job in laptop-backups-watchdog.sh reading per-leg×store JSON records) is OPEN, updated 20:17Z — the first implementation step is implemented and awaiting review/merge. No new packet needed for it. All seven leg issues (#13455, #13456, #13457, #13458, #13459, #13461, #13462) are still OPEN; no leg has snapshots in its target stores or a first restore verification recorded yet. Class A (#13455) leads: slice 1 (stagger planner + export-manifest builder) done via PR #13476; live snapshots pending. #13462 separately waits on the #9094 research gate.

    First step + packet: merge PR #13671 (review side — pr-shepherd/review, not a new implementation packet).

    Gate for the remainder (rotation runner + timer + registry row; first full rotation cycle with results on this issue; corrupted-scratch-snapshot check): at least one leg with snapshots in its target stores and its first restore verification recorded on its own issue. Next packet once that gate clears: the rotation runner that writes the JSON records #13671 reads.

    Verdict: triaged. First step = merge #13671; everything after is gated on leg first-verifications, with class A first in line.

  11. added a commit that references this issue on Nov 24, 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-programkind/featurequeue/queuedstatus:in-reviewtask/small-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions