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 — laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) · Issue #1841 · developing-today/code

laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841

New issue
Copy link
New issue
Copy link
Closed
Closed
laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3)#1841
Copy link
Assignees
dezren39
Labels
area/infraInfrastructure, deployment, and operationsarea/nixNix expressions, flakes, and packagingeffort/mMedium: expected under 1 day of workkind/enhancementpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Relocated from dezren39/darwin-nix#1026 on 2026-10-28 (placement audit): laptop-backups run-record/watchdog — the implementation is the code-side port (backup modules relocated to code via code PR #1740 / nix PR #1043; implementation branch queue/1914-1026-run-record-watchdog). Original body below; issue references inside it are historical (dezren39/nix numbering).

Problem

The two jobs declared in modules/laptop-backups.nix — pm-dashboard-backup (daily 04:30) and repo-archive-backup (daily 05:15) — leave no durable, machine-readable record of their runs. A run's only traces are its journal lines and pm-dashboard-backup's .last-run-epoch, which records the journal window, not run health. #976 verified on 2026-10-27 that neither timer had ever fired, and its acceptance asks for "a freshness check exists so a stopped backup gets named" — there is still no artefact such a check could read, so a backup that stops (timer broken, script failing nightly, laptop job silently exiting 0 per #1021/#1023's class) is discovered at restore time.

Part of design #1024 ("a backup that can prove itself"), phase 3. Parent coverage issue: #976.

Scope

  • modules/pm-dashboard-backup.sh: on every exit path (complete and failed), write one JSON run record at a fixed path beside .last-run-epoch (e.g. $ROOT/.last-run.json — at the backup root, never inside a dated day dir, so no retention prune can remove it; local prune iterates only 20??-??-?? dirs). Fields: job name, date argument, start/finish timestamps, result (complete / failed), the failing step(s) when failed, archive sha256 when built, and per-destination (local / R2 / Drive) results.
  • modules/laptop-backups.nix: a laptop-backups-watchdog systemd user service + timer (runs a few times a day) that checks (a) the dashboard run record — last result is complete and its finish time is within the threshold — and (b) both backup timers' last-trigger times against the same threshold. On any violation it exits non-zero with a line naming the job and the age/result. The threshold is a module option (services.laptop-backups.watchdog.maxAgeHours or similar), default a little over one daily period (26h). The watchdog changes nothing and attempts no repair.
  • The repo-archive job is covered via its timer's last-trigger time only: its script (~/tools/repo-archive-backup.sh) and restic credentials live outside this repo, so no run record is required of it in this issue — that limitation is stated in the module comment.

Acceptance criteria

  • A complete pm-dashboard-backup run leaves .last-run.json (or the chosen fixed path) with result: complete, the archive sha256, and all three destination results.
  • A failed run (e.g. stubbed rclone upload failure in the harness) leaves a record with result: failed and the failing step named — the record is written on the failure path too.
  • With a stale or failed dashboard record, the watchdog exits non-zero naming pm-dashboard-backup and the age; with a fresh complete record and recently-fired timers, it exits 0.
  • With a backup timer whose last trigger exceeds the threshold, the watchdog exits non-zero naming that timer/job.
  • Test coverage in the repo's established style: a watchdog test suite (stubbed record files + timestamps) wired as a flake check, plus a pm-dashboard-backup suite scenario asserting the record's contents on success and on failure.
  • Existing behaviour unchanged: schedule, retention, destinations, cursor semantics; the watchdog is additive and read-only.

🤖 Agent note · state: filed

  • Agent: repo-design-architect job
  • Session / ID: repo-design-architect cron run 2026-10-28 08:33 CDT (split rotation: opencode / openchamber / nix; nix's first pass)
  • Found via: design pass for fix(id-web): preserve HTML blocks on save via code_block provenance attr (#982) #1024 — fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver #976's freshness-check acceptance has no artefact to read; neither job writes a run record
  • Task: Phase 3 of design fix(id-web): preserve HTML blocks on save via code_block provenance attr (#982) #1024 (sub-issue of it); enqueued to repo-health-nix-pilot as a triage packet
  • Expectation: effort/m; independent of phase 2 (the expected-set issue) — either may land first

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-769

  2. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    History carried over from dezren39/darwin-nix#1026 (verbatim, oldest first):


    @dezren39 · 2026-10-28T14:50:55Z

    🤖 Agent note · triage confirmed

    • Agent: repo-worker-nix (lane A)
    • Session / ID: task 1889, repo-queue-worker-shift-nix run 2026-10-28 09:47 CDT
    • Verdict: CONFIRMED on current main 2aebfa908c8ecde88b5f17bec9446156693aedb2 — neither job writes a run record, no watchdog exists, exactly as filed.
    • Evidence: modules/laptop-backups.nix verified directly on current main this run: exactly two services+timers (pm-dashboard-backup 04:30, repo-archive-backup 05:15), no watchdog unit/timer, no OnFailure, no threshold option. modules/pm-dashboard-backup.sh (268 lines): the only durable outputs are the archive, its manifest, and .last-run-epoch (MARKER at :33, written at :266 as the journal-window cursor only after all legs succeed) — no .last-run.json or equivalent anywhere in the script.
    • Design pins for the fix: (1) the record hook already exists — the single EXIT trap on_exit (:47-52) sees every exit path; extend it rather than adding a second trap (bash traps replace, not stack — the opencode: pool effort remap — wired rungs, capability order, meta refresh #1010 lesson documented at :40-45). (2) $ROOT/.last-run.json is prune-safe, verified: local prune iterates only $ROOT/20??-??-?? (:227-232) and prune_remote purges only dated dirs matching ^20[0-9]{2}- (:240-250). (3) Test style exists to extend: pm-dashboard-backup.test.sh / -prune / -date suites are wired as flake checks in flake.nix. (4) fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver #976's 2026-10-28 update says both timers have now fired for the first time with Result=success, so the watchdog's timer check has real LastTrigger data to read.
    • Routing: follow-up fix enqueued as task 1914 (repo-health:v1:fix:dezren39/nix:issue:1026, kind small_fix) — run record on every exit path, watchdog service+timer with services.laptop-backups.watchdog.maxAgeHours (default 26), watchdog suite + record scenario wired as flake checks. Sequencing: PR OpenClaw: connect chat channels (Slack, Telegram, WhatsApp) #1029 (opencode: pool pass 2 — contributor seats, variant remaps, speed pool #1023), PR id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 (fix(id-web): degrade unsupported table-cell content instead of panicking on save (#1017) #1021), and the feat(home): install OpenClaw gateway via nix-openclaw #1025 fix (task 1895) all touch pm-dashboard-backup.sh and land first — semantically phase 3 is independent of phase 2 per this issue, the sequencing is only to avoid same-file conflicts.
    • Links: design design(backups): a backup that can prove itself — an expected-set completion contract for the laptop backup jobs (#976) dezren39/darwin-nix#1024 · issue laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) dezren39/darwin-nix#1026 · parent laptop non-git data has no routine backup — restic covers only ~/repo-archive and its timer has never fired dezren39/darwin-nix#976

    @dezren39 · 2026-10-28T14:52:16Z

    🤖 Agent note · parked on sequencing

    • Agent: repo-worker-nix (lane A)
    • Session / ID: task 1914, repo-queue-worker-shift-nix run 2026-10-28 09:47 CDT
    • State: PARKED 1h — sequencing gate not met. PR OpenClaw: connect chat channels (Slack, Telegram, WhatsApp) #1029 (opencode: pool pass 2 — contributor seats, variant remaps, speed pool #1023) and PR id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 (fix(id-web): degrade unsupported table-cell content instead of panicking on save (#1017) #1021) are both still OPEN (fresh check this run), and the feat(home): install OpenClaw gateway via nix-openclaw #1025 fix (task 1895) is itself parked behind opencode: pool pass 2 — contributor seats, variant remaps, speed pool #1023. All three touch modules/pm-dashboard-backup.sh; this fix starts from a main that includes them.
    • Resume: when PR OpenClaw: connect chat channels (Slack, Telegram, WhatsApp) #1029 and PR id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 have merged and task 1895 (feat(home): install OpenClaw gateway via nix-openclaw #1025) has landed, claim task 1914 and implement per its packet: run record at $ROOT/.last-run.json via the existing EXIT trap, laptop-backups-watchdog service+timer with maxAgeHours default 26, suites wired as flake checks, validation on the laptop.
    • Triage: task 1889 CONFIRMED this issue on main 2aebfa9 — see the triage verdict comment above.

    @dezren39 · 2026-10-28T16:40:44Z

    🤖 Agent note · state: parked (CI pending)

    • Agent: repo-queue-worker-shift-nix lane A
    • Task: task 1914
    • Did: Sequencing gate cleared this shift (PR OpenClaw: connect chat channels (Slack, Telegram, WhatsApp) #1029, PR id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032, PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041's predecessor PR 🎨 Palette: Enhance accessibility and keyboard navigation in image browser dialog #1039 all merged — 🎨 Palette: Enhance accessibility and keyboard navigation in image browser dialog #1039 at 2026-10-28T16:25:17Z, CI green). Implemented phase 3 on laptop branch queue/1914-1026-run-record-watchdog: .last-run.json run record via the existing EXIT trap (suppressed until DATE validation passes, per Fix /today 500: tolerate string-shaped progressedSinceLastRun #989; SKIP leaves no record), the laptop-backups-watchdog script + service/timer with services.laptop-backups.watchdog.maxAgeHours (default 26), and record + watchdog test suites wired as flake checks. All pre-existing pm suites pass and all 7 related flake checks pass on the laptop; module evaluated via a scratch home-manager config.
    • Outcome: PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041 opened — feat(laptop-backups): pm-dashboard-backup run record (.last-run.json) + freshness watchdog (#1026) dezren39/darwin-nix#1041 (CI nix build queued at park time)
    • Resume: when PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041's CI is green, merge it, verify this issue closes, then complete task 1914.

    @dezren39 · 2026-10-28T17:37:15Z

    🤖 Agent note · blocked — target moved out of this repo

    • Agent: repo-queue-worker-shift-nix lane A
    • Task: task 1914 — terminal state: blocked (reason class packet_defect: the packet's target files no longer exist in this repo)
    • What changed since the park: PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041's CI (nix build) is green and the sequencing gate cleared (PR 🎨 Palette: Enhance accessibility and keyboard navigation in image browser dialog #1039 merged 2026-10-28T16:25:17Z) — but PR id(web): prosemirror_to_markdown panics on misplaced nodes — json_to_ast never validates block/inline placement #1043 then merged (2026-10-28T17:12:06Z) removing the laptop modules from this repo under Drew's 2026-10-28 rule (dezren39/nix is the Darwin flake; all laptop services are made by the developing-today/code flake). The modules were relocated to nixos/home/ in developing-today/code by amd: laptop services live in this flake — relocate modules from dezren39/nix, add repo-keeper + autocommit (code#1723) #1740 (merged 2026-10-28T17:11:59Z).
    • Evidence: modules/laptop-backups.nix and modules/pm-dashboard-backup.sh return 404 on current nix main (d443337); PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041 is now CONFLICTING / DIRTY. Merging it would resurrect the deleted modules, so it is being closed unmerged; the implementation is preserved on branch queue/1914-1026-run-record-watchdog @ 55c636f (all suites + 7 flake checks passed on the laptop, CI green, before the move).
    • Still owed (SET-REMAINDER): developing-today/code — port the run record + watchdog from PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041 into nixos/home/ (pm-dashboard-backup.sh, laptop-backups.nix, plus the watchdog script and record/watchdog suites). Verified on code main this shift: the relocated files are present, but there is no .last-run.json record and no laptop-backups-watchdog — the phase-3 work has not landed there. Per the cross-repo rule this origin issue tracks the set; no new per-repo issue was filed.
    • Links: PR fix(id-web): carry tight on task_list so loose task items stop fusing on save (#1036) #1041 feat(laptop-backups): pm-dashboard-backup run record (.last-run.json) + freshness watchdog (#1026) dezren39/darwin-nix#1041 · PR id(web): prosemirror_to_markdown panics on misplaced nodes — json_to_ast never validates block/inline placement #1043 Remove laptop modules (moved to the code flake, code#1723) dezren39/darwin-nix#1043 · code PR amd: laptop services live in this flake — relocate modules from dezren39/nix, add repo-keeper + autocommit (code#1723) #1740 · design design(backups): a backup that can prove itself — an expected-set completion contract for the laptop backup jobs (#976) dezren39/darwin-nix#1024
  3. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    area/nixNix expressions, flakes, and packaging
    area/infraInfrastructure, deployment, and operations
    effort/mMedium: expected under 1 day of work
    kind/enhancement
    source/design-architectFiled by the repo design architect job
    queue/queuedHas a queued queue task
    status/needs-triageNot yet triaged; needs a first look
    on Oct 28, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 29, 2026
  6. 64 remaining items

  7. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  8. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: queue task 3057, lane B shift 2026-10-31 06:44 CDT
    • Found via: queue claim (resume from park)
    • Task: Resuming parked task: PR 2989 was parked on CI pending; revalidating CI/Codex state fresh and merging if green.
    • Expectation: done = PR 2989 merged, laptop-backups: durable run record for pm-dashboard-backup + a freshness watchdog that names a stopped backup (design #1024, phase 3) #1841 closed, task completed fixed_merged
    • Links: PR nixos/home: laptop-backups run record + freshness watchdog (#1841) #2989 branch queue/3057-1841-laptop-backups-watchdog
  9. dezren39
    added a commit that references this issue on Oct 31, 2026

    Merge pull request #2989 from developing-today/queue/3057-1841-laptop…

    661582d
  10. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: queue task 3057, lane B shift 2026-10-31 06:44 CDT
    • Found via: queue claim (resume from park)
    • Task: PR 2989 merged — laptop-backups run record (.last-run.json on every exit path) + freshness watchdog (service/timer, maxAgeHours default 26), ported from dezren39/nix branch queue/1914-1026-run-record-watchdog @ 55c636f, superseding nix task 1914.
    • Expectation: met — CI green (mcpx-docs build pass on head 0fd4f55), Codex clean on current head with 0 unresolved threads (all prior Codex/CodeRabbit findings dispositioned in-thread), merge commit 661582d.
    • Links: PR nixos/home: laptop-backups run record + freshness watchdog (#1841) #2989 (merged)
  11. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
  12. dezren39
    closed this as completedon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

area/infraInfrastructure, deployment, and operationsarea/nixNix expressions, flakes, and packagingeffort/mMedium: expected under 1 day of workkind/enhancementpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/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.