GeezerVison is showing github.com — audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive · Issue #1516 · developing-today/code
audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516DescriptionBackup coverage audit — 2026-10-27 (verified firsthand, laptop + sandbox + cron history)
Question from Drew: is the pm-aggregator state backed up routinely — and is ALL our data?
Headline answers
- pm-aggregator state: backup machinery exists (built under ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459: laptop
dashboard-backup.sh + dashboard-backup.timer daily 04:30; sandbox cron dashboard-backup-daily 05:15 for the Drive+R2 leg) but neither scheduled leg had ever run at audit time. Only copy: a manual tarball on the laptop's own disk (2026-10-27 13:48). No offsite copy, no restore ever performed. End-to-end proof (run both legs, verify offsite copies, restore test, freshness alarm at >26h) is being executed 2026-10-27.
- Directive (Drew, 2026-10-27 14:56): the durable home for this is a backup service in the NixOS flake (dezren39/nix), running daily, copying to three destinations: the laptop backup dir, Cloudflare R2, and Google Drive. Tracked for implementation under this issue; the dezren39/nix side is linked from nix#976.
Coverage summary (store → verdict)
- Covered: Supabase muse-dev (2×/day → R2 + Drive) · hatch-personal + sandbox workspace (git, verified committing) · Turso general DBs + D1 cold-store-manifest (nightly → Drive) · avatar (Drive daily, the only store that routinely verifies itself against its copies) · laptop git clones (GitHub remotes)
- Gaps, each with its own issue:
- Cross-cutting: restore testing is absent almost everywhere (cold-store restore drill exists but has never run; quarterly cadence, next Jan 2027). A backup that has never been restored is a hypothesis — every store in this program gets a restore test or a named drill date.
Acceptance
- Aggregator backup proven end-to-end once via the ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 legs (offsite copies verified by sha256, restore test with record counts)
- NixOS backup service live via
nixos switch: daily, three destinations (laptop backup dir, R2, Drive), state set = the dashboard-backup set
- Freshness alarm: newest archive / offsite filing >26h old gets named by an existing watchdog
- pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514, atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515, nix#976 each closed by a running routine + one restore test
Activitydeveloping-today commented on Oct 27, 2026 dezren39 commented on Oct 27, 2026 Aggregator leg of this audit: PROVEN end-to-end 2026-10-27
The dashboard/aggregator backup machinery (#1459) was exercised deliberately today and restore-tested from offsite copies. Full evidence is on #1459 (comment 6452278224); summary:
- Final archive 2026-10-27: sha256
0f67e5d8b597d448c1101b08cca56e3624c1e5ac5e54788649214377a7939187, 176,069 bytes, 16 manifest entries — identical bytes on the laptop (~/backups/dashboard/2026-10-27/), in Google Drive ("Muse Backups", file 10L6w6NbGqpqj-oKQEIDXnsxxf_rgXwsf, size+md5 verified), and in R2 (supabase-backups key dashboard/2026-10-27/dashboard-2026-10-27.tar.zst, HEAD+meta-sha verified by the helper and byte-verified by an independent GET).
- Restore test from offsite copies: manifests 16/16 OK; restored actions 13 / comments 3 = source = live laptop counts.
- Freshness guard added: step 0 of the
dashboard-backup-daily cron checks the newest laptop archive and the newest all-ok filing daily and reports loudly to the main chat if either is >26h stale; evaluated on today's fresh state correctly (no alert).
- Schedules armed: laptop timer Wed 2026-10-28 04:30 CDT; sandbox cron Wed 2026-10-28 05:15 CDT.
- These figures are the acceptance baseline for the NixOS-flake backup service that is this issue's durable-home directive. The ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 legs remain the bridge until the switch lands. Kaneo/atlas gaps (pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514/atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515) are untouched by this work, per scope.
dezren39 commented on Oct 27, 2026 Audit gap disposition update (2026-10-27, Drew's 15:00 CDT orders)
- Gap test #1 (pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514, Kaneo/Grist/Pad — zero backup): HANDLED TODAY. Manual run completed and verified end-to-end: bundle
pm-stack-2026-10-27.tar.zst (3,340,257 bytes, sha256 a1ad3034…50e037) filed to Drive ("Muse Backups") and R2 (supabase-backups bucket, key pm-stack/2026-10-27/…), restore-sanity passed from the R2 copy (all sqlite stores integrity-ok; Kaneo dump fully restored into a scratch DB, 9,439 rows). Full evidence: pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 comment 6452598268. The recurring leg is the idempotent script ~/tools/pm-stack-backup.sh on the laptop, ready for the flake backup service (laptop non-git data has no routine backup — restic covers only ~/repo-archive and its timer has never fired dezren39/darwin-nix#976) to schedule — no snowflake timer was created.
- Gap Bump checkmarx/ast-github-action from 2.0.11 to 2.0.18 #2 (atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515, atlas backups): QUEUED for immediate high-priority pickup. Fleet queue task 1565 in
repo-health-code-pilot, status queued, priority 20 (scale: lower runs first; 20 = broken priority automation with reproduction, raised per Drew's order under the design's curator-raise rule), kind triage, dedupe_key repo-health:v1:triage:developing-today/code:issue:1515. Packet: queue-packets/packet-1515-triage.json in the keep-the-four-repos-healthy goal workspace. Issue labeled queue/queued + priority/high.
dezren39 commented on Oct 27, 2026 NixOS backup service: built, proven end-to-end, staged for the switch — 2026-10-27
Drew's directive (14:56 + 15:00): a backup service in the flake, daily, laptop → local dir + R2 + Drive, and the flake sets up all the laptop's backups.
What was built
- feat(backups): laptop-backups home-manager module — dashboard (local+R2+Drive) + repo-archive units dezren39/darwin-nix#977 (MERGED): new
homeModules.laptop-backups (modules/laptop-backups.nix + vendored modules/pm-dashboard-backup.sh):
pm-dashboard-backup service + daily timer (04:30, persistent): the ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 dashboard state set → dated tar.zst + sha256 manifest → local ~/backups/dashboard/<date>/, R2 supabase-backups (dashboard/<date>/), Drive Cloud/cold-store/db-backups/pm-aggregator/<date>/; every copy sha256-verified; 30-day retention on all three; credentials from Bitwarden by name at runtime (repo-archive pattern), nothing secret in the store.
repo-archive-backup service + timer (05:15): the existing restic job's unit is now declared in the flake too (its script stays at ~/tools/repo-archive-backup.sh, the path its author maintains) — so the laptop's backup schedules live in one declared place.
- DB-dump hook for pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514: the dashboard script runs
~/tools/pm-stack-db-backup.sh first when it exists and its dumps (to ~/backups/db-dumps/<date>/) ride the same archive to all three destinations. The pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 script had not been published yet at build time (checked the laptop + pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 at 15:05 CDT), so the hook is currently inert and logs that plainly on every run.
- Pruning discipline: each job prunes only dated dirs it created; the sandbox backup job's tree under
~/backups is never rotated by these units.
- feat(pm-stack): deploy aggregator + projector as NixOS services; projector comment-path fix; laptop backups via dezren39/nix module (#1199, #1516) #1526:
dezren39-nix added as a flake input (pinned to the merged rev 4fce8acb); the amd host imports homeModules.laptop-backups and enables it, alongside the new pm-stack services. Full toplevel closure evaluates and builds. (Lock note: the input's transitive inputs are recorded in flake.lock as usual; only homeModules is consumed.)
Verification (firsthand, today)
Ran the module's exact script on the laptop (the NixOS unit runs the identical store-built script after the switch):
- Local OK:
~/backups/dashboard/2026-10-27/dashboard-2026-10-27.tar.zst, 131,097 bytes, sha256 e7f3f0ee59a0d99bd3160e1b5c8e9e07b204415b82fb83d08b4454053fcc681a, manifest covers 13 files.
- R2 OK and Drive OK — both copies sha256-verified against the local archive in the same run (13 seconds total).
- Restore test from the R2 copy (independent download): byte-identical sha256, manifest 13/13 OK, restored actions 13 / comments 3 = live laptop counts (and = the ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 baseline).
- This is a newer same-day archive than the ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 baseline recorded earlier (sha
0f67e5d8…): the script rebuilds the day's archive atomically on each run, as designed.
What remains
- The switch itself needs Drew's sudo moment (
~/run-switch.sh); agents cannot sudo. Until it lands, the ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 hand timer + sandbox cron stay armed — not retired early, so no day is left without a scheduled backup. After the switch: hand dashboard-backup.timer and repo-archive-backup.timer disable (files kept), and the sandbox cron's Drive leg retires since the service covers Drive itself.
- The >26h freshness alarm acceptance item is already carried by the
dashboard-backup-daily cron guard added earlier today; it watches the same archive locations this service writes.
- nix#976's wider set (~/atlas canonical, ~/.local/state beyond the dashboard set) is not yet in this module — the module is the declared home for it, and the gap is stated there rather than papered over.
dezren39 commented on Oct 28, 2026 Intake review
Related: #1514 (this audit's own finding 1 in issue form — the pm-stack database backups) and PR #1526 (merged: "deploy aggregator + projector as NixOS services; laptop backups via dezren39/nix module (#1199, #1516)"). Liveness check: PR #1526 references this issue and appears to address the laptop-backup portion, but the audit's headline gaps — an aggregator offsite copy that has never been restore-proven and the Kaneo/atlas coverage questions — are not shown resolved by that PR, so this issue stays OPEN; a worker or sweep should confirm per-finding against the audit before closing anything.
Notes: A coverage audit with per-item state (aggregator, Kaneo, atlas), each with a last-verified date — exactly the shape that lets the next pass re-verify instead of rediscover. Its "Done looks like" bullets (regular offsite copies, a drill that restores each, gaps named with owners) are complete acceptance criteria in substance; no separate section appended.
Risks: A backup that has never been restored is a hope, not a backup — the aggregator's unproven offsite copy is the highest-risk line in the audit. Priority is high for that reason, not because anything is currently down.
Suggested approach: Work the findings in order: (1) restore-drill the aggregator offsite copy and record the result here; (2) confirm or close the Kaneo/atlas gaps; (3) whatever PR #1526 already delivered, mark it against the findings explicitly so the audit and the implementation stop drifting apart.
Labels normalized by the fleet monitor (intake enrichment): kind/infrastructure, priority/high, effort/m, status/needs-triage, source/human, meta/enriched. dezren39 commented on Oct 28, 2026 Update: code#1526 has merged
The code-side PR referenced above merged as 2753aa80 after full-green CI (run, test, treefmt, Nix flake evaluation), and the primary checkout is fast-forwarded to it. The final closure was built and diffed against the running system (generation 510): additions only — the pm-* units, the pm-dashboard-backup + repo-archive-backup units/timers, the backup script package, and the id package bump from main; no removals or unrelated changes. The backup service's remaining step is unchanged: Drew's switch (~/run-switch.sh), with the #1459 legs still armed until it lands. dezren39 commented on Oct 28, 2026 Sandbox side of the backup audit — verified store by store, residual routine built, init wiring proven by simulated recycle (Drew's 2026-10-27 15:00 CDT directive: sandbox → laptop, R2 and Drive; init job sets up all sandbox backups)
Per-store verdicts (all checked firsthand 2026-10-27)
~/hatch-personal + ~/workspace (goal workspaces are symlinks into it): git-covered — remote set, autocommitted every minute by the hatch-autocommit systemd timer, pushes landing. Two incidents found + fixed during this pass — see below.
- Home repo (
dezren39/hatch, public): committed content is covered (origin pushed, 0 unpushed), but its working tree has no autocommit — edits to tools/, TOOLS.d/, docs/ ride on manual commits + the 4h git-hygiene-sweep cron. It carried uncommitted changes at audit time (incl. that day's tools/bws-env.sh fix). Open question for Drew (below).
- Runtime backup crons all exist and persist via the runtime (survival proven by run history across today's real recycles — e.g. supabase-muse-dev-backup fired before and after the 12:14 CDT recycle): cold-store-nightly-backup (03:12), dashboard-backup-daily (05:15), supabase-muse-dev-backup (12h), avatar-backup-daily (04:12), cold-store-restore-drill (monthly), cold-store-eviction-scan (weekly). Plus the new atlas-local-backup-daily (04:47) from the atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515 leg.
- Local atlas DB set (
hatch-personal/workspace/turso-atlas/data/, ~7.9 GB): the canonical atlas.db (1,490,194,432 bytes) is gitignored (.gitignore:48) — this was the only genuinely uncovered sandbox store. Its routine is the atlas backups: canonical local atlas.db has no routine backup (gitignored, ad-hoc copies only); nightly Turso atlas dump times out #1515 sandbox leg (comment there has the script, cron id, and per-destination sha/md5 verification of the first archive). The other DBs in that dir are delta/staging intermediates, regenerable from atlas.db + sources.
~/git/pm-feed untracked: only fleet-feed.json — regenerated by the collectors. Sandbox clones of code/nix/opencode/openchamber all have GitHub remotes (one WIP-modified file in devtoday-nix, another lane's, left alone).
- Excluded with reason:
~/.config + credentials (Bitwarden / 1Password are the record), ~/agents (2.5 GB of runtime subagent records — platform state), ~/Library (verified: only Caches 213 MB + Logs), workspace/email/ (Gmail is the source of truth), agent/queue state (cloud Supabase, covered by its own backups).
Incidents found + fixed during the audit (both were silently breaking the git backup)
- hatch-autocommit was dead for ~10h. A stale
~/hatch-personal/.git/index.lock (left at 15:02 UTC, presumably by a git op killed in the churn) made every minute's run exit 0 silently — by design it skips when the lock exists, so nothing alerted. Removed the stale lock; the next run committed the 575-file backlog and pushed. Verified healthy again after the init simulation (fresh auto-commit 00:56 UTC).
- Backup staging swept into git history. The atlas staging tree (
data/.backup-staging/…, two levels deep) wasn't matched by the single-level data/*.gz ignore patterns, so autocommit committed a 492 MB + a 325 MB staging blob into local-only history and every push then stalled. Fixed .gitignore (data/**/*.gz + data/.backup-staging/), collapsed the unpushed snapshots into one repair commit (a8b7b437), pushed clean — origin never received the blobs. Local .git still holds ~818 MB of orphaned objects; a git gc --prune=now at a quiet moment reclaims it (cosmetic, not urgent).
Init wiring (Drew's "the init job sets up all backups on sandbox")
- Inventory: every system-level backup component already had an init restore path in
~/tools/init.sh (the code#903 pattern — idempotent installer in the owning repo + restore block): hatch-autocommit, fleet-feed-collector (the pm-feed aggregator's installer), fleet units (init-ensure + fleet-fetch), plus airthings-monitor + resource-sampler. Runtime crons persist via the runtime (above). No user-level systemd backup units exist. No new wiring was needed — it needed proof.
- Simulated-recycle proof (backup components only): stopped and removed all 8 unit files from
/etc/systemd/system (4 timers confirmed inactive/not-found), reset the init boot marker, ran bash ~/tools/init.sh → END result=SUCCESS (76s) with restore lines for fleet units, fleet-feed-collector, and hatch-autocommit; all 4 timers active again. Ticks verified: fleet-feed.json regenerated 00:54:42 UTC and a fresh 27-file autocommit landed 00:56:23 UTC. Today's real recycles corroborate (the 19:02 CDT boot's init log shows the same restores).
- One nuance worth knowing: init.sh's warm-boot skip checks boot-id + nix only, so a hypothetical mid-boot unit loss (not a recycle) would wait for init-ensure (fleet units only) or the next boot. Recycles always change the boot-id, so the recycle path — the actual threat model — is covered.
Left for Drew
- Decide whether the home repo (
dezren39/hatch) working tree should get the same every-minute autocommit protection hatch-personal has. Today only its committed content is backed up; an unlucky recycle mid-edit loses uncommitted tools/ changes.
dezren39 commented on Nov 8, 2026 🤖 Agent note · done — triaged (task 12662)
Verdict re-confirmed fresh 2026-11-08T10:01Z
The triage verdict task 11949 recorded at 2026-11-08T03:31Z still holds on current state:
Remainder disposition: #1514 only. Issue #1516 stays OPEN until #1514 closes by a running routine + one restore test. No new fix packet enqueued from this task. The packet evidence quoting "PR #977" merged in code (a tangential docs note, code#977) did not address the audit; the substantive work is dezren39/darwin-nix#977.
dezren39 commented on Nov 17, 2026 agent-note:v1
state: triaged - close condition met, closing with evidence
task 18123 (repo-health-code-pilot, lane code-e)
Bulk-intake re-triage verification, 2026-11-17.
Fresh state checked this run: issue #1516 is OPEN, labels kind/infrastructure, priority/high, effort/m, epic/storage. No status/needs-triage and no held, user/owned, do-not-merge, or do-not-auto-edit label. Sole remainder issue #1514 re-checked fresh this run: CLOSED, stateReason COMPLETED.
The triage of record (task 11949, re-confirmed by task 12662 on 2026-11-08) checked every audit item except one, and recorded the close condition for this issue verbatim: issue #1516 stays OPEN until issue #1514 closes by a running routine + one restore test.
That condition is now met on the record of issue #1514 itself: it closed COMPLETED (2026-11-08, task 11948's remainder work), and on 2026-11-14 a full audit + restore-verify at Drew's order confirmed the routine healthy - pm-dashboard-backup.timer runs the DB-dump step for the Kaneo Postgres, Grist, and Pad containers, the 2026-11-14 run record is complete with all steps ok across destinations, and the restore side was verified. No fix was needed at that audit.
With every checklist item of the 2026-10-27 coverage audit now closed and its sole remainder closed on a running, restore-tested routine, issue #1516 is closed by this note as completed. If a future coverage audit finds a new gap, it files as a new audit issue, as the 2026-10-27 one did.
Completing task 18123 as triaged (issue closed in this pass per its own recorded condition). dezren39 commented on Nov 17, 2026 🤖 Agent note · done — already_done (task 19525)
Fresh state (2026-11-17)
dezren39 commented on Nov 23, 2026 Interim-risk note for #9093 acceptance — lane felix, 2026-11-23.
The cold-store-nightly Turso→Drive export leg failed on 2026-11-12 (service 30-minute start timeout killed the run mid-export; only 2 of 42 database exports filed that night). The interim risk, named here per #9093's acceptance list: between that failure and the fix taking effect on the running system (partial nights 2026-11-11→13), the every-database Turso→Drive leg was degraded — Turso's own 30-day PITR was the only protection for any database state not covered by the per-store legs (atlas-backup, supabase-backup), and PITR cannot resurrect a database deleted outside its 5-day deleted-DB window (Delete Protection was OFF fleet-wide at the time).
Disposition: root cause identified (TimeoutStartSec 30m + unbounded export scratch in anonymous /tmp dirs), fixed in code 2026-11-11 (TimeoutStartSec 120m, d3fa454; per-database bounded scratch, b4278bc), full 42/42 successful runs on record 2026-11-15 and 2026-11-16, Delete Protection enabled on all 42 fleet Turso databases 2026-11-17, and the #1841 watchdog now carries a cold-store completion check (PR #10988, merged). Record: #9093 comments of 2026-11-17 (lane code-a) and the #9093 design record.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|