carlos / platform Public

Backups owners can see and check, plus a nightly copy to their own bucket Feature Request open

Claimed by claude~paul@keymail.dev 3 weeks ago

Want: owners, members and operators can see for themselves that their data is copied, how far back it reaches, and that a restore of it has actually been tested. Owners can also have a nightly copy land in a bucket they control, in a format they can open without CARLOS.

Why: the durability design (spec docs/superpowers/specs/2026-10-23-durability-design.md, discussions #352 to #356) is entirely operator-facing: drills, alerts, runbooks. Nothing tells an owner anything. Two different fears need two answers:

  1. "Is my data safe if a box or region dies?" Answered by evidence from the platform's own copies and drills.
  2. "What if I lose access to the service itself?" No platform-internal backup answers this one. Only a copy in the owner's own hands does.

Ground truth today (2026-11-11), which any surface must not overstate:

  • Databases: Litestream, RPO seconds. Sleeping instances keep 7 days (#263); "carlos db pull --at" reads it.
  • App files: copied only for born-HA hosts (durability step 6 not started).
  • Off-account copy: interim rclone, eu-west-1 only. UK, US, AU have none (step 7).
  • Restore tests: restore-verify daily on one box, three random hosts; nothing published (step 5).
  • Instance restore (#658): inert until the lifetimes cutover.
  • "Current" cannot be claimed from a drill (durability §3.1 item 12; #290).

Proposed shape (spec to follow on a design branch):

A. Backups panel per instance (console and "carlos instances backups"): last copied, history reaches back to, last restore test and its verdict, off-account copy and its age, and a plain "not covered" line for anything uncovered (files, regions without an offsite destination). Ages, never a green tick. Built on #893's replica position plus the durability step 3/4 inventory and step 5 published verdicts.

B. Download a copy (console button over "db pull --at"): reads the replica, no box load, never wakes the instance. The strongest proof we can offer is the owner holding the file.

C. Operator view: fleet-wide coverage gaps, drill verdicts and offsite lag in one place (durability step 5's published verdicts, surfaced).

D. Nightly export to the owner's bucket: any S3-compatible store, credentials sealed like other secrets, a time of day, failure email. Output: plain SQLite plus a files tarball, optionally encrypted to an age recipient only the owner holds. Runs from replicas through one scheduled job on the change index: no new per-box polling, a few PUTs per instance per night. Provider-neutral.

E. Public targets: publish the §2 RPO/RTO table and drill pass history once steps 5 and 7 are real.

Order: A's honest version and B can ship early (they only need #893 and db pull). Coverage lines fill in as durability steps 3 to 6 land. D waits for step 6 so the export is never partial without saying so. E last.

Decisions for Paul (recommendations first):

  1. Plans: download for every plan; scheduled export Personal and up. Or export for all.
  2. Encryption: optional age recipient. Or always required.
  3. Members (non-owners) see the panel read-only; only owners download or configure export.

Related: #893, #894, #658, #290, #352 to #356.

Rulings recorded (Paul, 2026-11-11): D1 nightly export on Personal and up (panel and db pull on every plan); D2 optional age recipient, adding filippo.io/age; D4 arm hibernate-verify by default with a time budget; D5 one nightly window per region. D3 (owners configure, members see) and D6 (#893 absorbed) taken as recommended.

Spec: docs/superpowers/specs/2026-11-11-member-backups-design.md on design-member-backups, rev 2.

Astra round 1: NOT READY, 3 P1 + 11 P2, all accepted. The cuts: the owner panel drops the files line, the off-account line and other-region instances until per-instance evidence exists. The export gets its own credential envelope, a destination client that refuses internal addresses and redirects, create-only attempt directories with the manifest last, deadlines, and a disk pin. Round 2 running.

Spec rev 4.1 (ebb1d3b7), ready for Paul's approval.

  • Astra: R1 NOT READY (3 P1, 11 P2), R2 NOT READY (1 P1, 2 P2, 3 partial), R3 READY AFTER FIXES (one budget line, applied). All findings accepted.
  • Fable 5.2 guidance: PROCEED WITH CHANGES, applied in rev 4. Say "no copy" where it is known; word the time as the last change saved; split slice 2 so per-box drill records ship first; a 7-day drill coverage target; an owner-side export verify; a staleness email; a provider probe before the export.
  • Ruling D7 (Paul): a narrow pull-only credential ships as slice 3a.

Slices: 1 door + Backups tab; 2a per-box drill records (fixes today's bug where boxes erase each other's verdicts); 2b the restore-test line + operator view; 3a pull credential; 3b managed nightly export. Slices 1, 2a and 3a need nothing else and can be planned now.

Paul approved spec rev 4.1 (2026-11-11). Writing plans for slice 1 (backups door + tab + CLI) and slice 2a (per-box drill records) now.

Plans final (b358d51d), awaiting Paul's choice of execution method.

  • Slice 1 (backups door, instance-page section, CLI): docs/superpowers/plans/2026-11-11-member-backups-slice1.md rev 3. Astra plan R3 READY.
  • Slice 2a (per-box restore drills): docs/superpowers/plans/2026-11-11-member-backups-slice2a.md rev 4. Astra R3 NOT READY on the repeated group-assignment family; Fable 5.2 SOUND WITH CHANGES (the asymmetry gives at worst a harmless double drill). Paul accepted double drills and Fable's changes; no fourth Astra round.

Findings and briefs: docs/superpowers/notes/reviews/member-backups/.

Build status (2026-11-11): slice 1 Tasks 1-3 and slice 2a Tasks 1-7 complete, each Astra-reviewed. Remaining work (slice 1 section + CLI, slice 2a alerts, both censuses, final reviews) waits on Paul's two copy reviews.

Download a copy (slice 1b), spec §2b, rev 6.1 (3b69c3c9). Paul asked for a console download as a background job with a preparing state and a zip. Astra R1 NOT READY (2 P1, 5 P2, all accepted); R2 READY AFTER FIXES (applied). Shape: own region only; durable job in console.db bound to account/app/host/incarnation; dispatched through the existing db-reads queue, one owner by election, result reconciled by the console; new dbreads export worker operation; zip held 24 h under downloads/ with a lifecycle rule (AWS + MinIO, verified before enabling); 15-minute presigned exact-object links, never logged or emailed.

UX pass (D9): the Backups section is now stat tiles + a "What we keep" table + a Download button + a CLI disclosure. AGENTS.md rule on branch agents-ux-pass.

Slice 1 merged to main as 929f786 (not released): the Backups section on the instance page, GET .../instances/{host}/backups, and carlos instances backups. Release, roll and the dev check (section matches db pull's position line) need Paul's go. Slice 2a: final fix wave in progress. Slice 1b (download): spec §2b reviewed, plan next.

Slice 2a merged to main as 178dcfe (not released). Nightly restore drills armed by default at the next roll, one record per box bound to instance identity, three operator alerts. Release + roll (dev first) need Paul's go; the dev check: after one night every dev box with sleeping hosts has control/verify/<ref>.json, control/restore-verify.json is untouched, no spurious alert, and a move clears the landing box's entry. Next: slice 1b (download) plan, slice 2b (restore-test line + operator view).

Drill fix merged as 4f95eb3 (first dev night findings: no-database hosts went unverified nightly; fleet boxes failed the unit). Follow-ups, not blocking:

  1. Sleeping HA instances with no database and no lease holder still stay unverified/nothingreplicated (no proof of absence from the drilling box), so they can still reach verifyunverified on night 3. Needs an authoritative "this app has no database" signal (manifest or provision record) rather than local file absence.
  2. Fleet boxes are not drilled at all: instance records are not reachable from a fleet box (no deployment store). Needs a design for fleet-box drill coverage.
  3. (Fable P2) The ops.go comment overstates verifycoverage: a persistently unreadable record surfaces only for hosts already in the frozen local copy with a stamp, 7 days on; new hosts, leftout-only hosts, no_record hosts and boxes with no local copy get only the failed unit. Confirm whether a failed oneshot with zero restarts alerts (Down is only used to hold a clear), and soften the comment or add a signal.
  4. (Fable P2) An unparseable control/verify/<ref>.json now wedges the drill (exit 1 nightly) until repaired by hand; document the recovery (delete the object) or self-heal on a parse error specifically.
  5. (Fable P2) TestRunHibernateVerifyUnreadablePriorPublishesNothing night A should assert the log names the record read, not just a non-zero exit.