carlos / platform Public

member backups: slice 2a SDD ledger and final reviews (#898)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev c83aca57cb6d90e0f9de168dd789761f19c20f06 parent 16142c9
4 files changed, +335 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-fix-review.md +29 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-astra.md +110 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-fable.md +66 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-ledger.md +130 −0

CI failed — run details

Intent

Attributed to this commit: 58.9 g CO₂e (7,487,042 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-member-backups, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-fix-review.md b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-fix-review.md
new file mode 100644
index 000000000..ba708030c
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-fix-review.md
@@ -0,0 +1,29 @@
+1. **Drill every selected family with its own identity rule** — ADDRESSED. [drillidentity.go:52](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/drillidentity.go:52) handles instances and sidecars without member-read class refusals; confirmation detects identity changes. Family tests cover resident, pooled and fleet records. `no_record` is excluded from coverage; the masked fleet test is corrected.
+
+2. **Group boxes drill local non-HA rows** — ADDRESSED. [hibernate_verify.go:605](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:605) selects non-HA rows before assignment checks.
+
+3. **`no_assignment` advances the alert streak** — ADDRESSED. [dbverify.go:261](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:261) holds only `not_reached` and `no_record`; tests and comments agree.
+
+4. **Only proven damage produces `failed/restore_error`** — NOT ADDRESSED — **Important**, invariant: storage failures must not imply replica damage. [hibernate_verify.go:494](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:494) still defaults unrecognized errors to damage. A prematurely closed HTTP response produces `io.ErrUnexpectedEOF`; the new recorder preserves it, but `storageError` recognizes none of its types. Separately, [check.go:285](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/lease/check.go:285) marks **every** database-check error `ErrCheckFailed`, including SQLite open/I/O failures, which the drill immediately classifies as damage. Preserve transport-error provenance and distinguish integrity failures from operational check failures.
+
+5. **Missing planned objects trigger bounded replanning** — ADDRESSED. [hibernate_verify.go:472](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:472) and `:486` retry missing headers/content; persistent misses become `plan_moved`. Tests exercise the real planner/downloader and unavailable targets.
+
+6. **Publication is acknowledged only after success** — ADDRESSED. [hibernate_verify.go:223](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:223) acknowledges only successful uploads; the regression test covers next-tick retry without new results.
+
+7. **Landing removal survives overlapping publication** — ADDRESSED. [dbverify.go:376](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:376) checks removals inside each CAS attempt. The publisher retains removals locally while merging streaks from the run-start record; tests record interleaved writes.
+
+8. **Abandoned hosts rotate behind older attempts** — ADDRESSED. [dbverify.go:218](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:218) preserves the prior verdict and stamps `AttemptedAt`; `OldestFirst` uses the later timestamp.
+
+9. **Stale scratch directories are removed at run start** — NOT ADDRESSED — **Important**, invariant: abandoned restored databases must be reclaimed independently of current assignments. [ops.go:528](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:528) invokes cleanup **after** both empty-fleet returns. Once the last host leaves or is assigned elsewhere, every subsequent run skips cleanup, retaining crash leftovers indefinitely. Move cleanup before those returns and cover an empty-fleet run.
+
+10. **Boot catch-up waits for fresh `self.json`** — ADDRESSED. [ops.go:458](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:458) retries every 15 seconds for five minutes, with cancellation.
+
+11. **Coverage alerts refresh overdue counts** — ADDRESSED. [verify.go:171](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:171) updates the count and emits an event without resetting firing timestamps.
+
+**New breakage in the fix diff:** None separate from the unresolved defects above.
+
+**Out-of-scope observations:** None.
+
+**Checks:** Inspected the supplied diff and covering tests. The report names tests and supplies summarized results, not complete execution logs. No tests rerun, git commands executed, files changed or reviewers spawned; GOCACHE was not set.
+
+**Fix round:** Findings remain open — **4 and 9**.
\ No newline at end of file
diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-astra.md b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-astra.md
new file mode 100644
index 000000000..063bca959
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-astra.md
@@ -0,0 +1,110 @@
+Reviewed `01d6ca78..bb254400edff20549cfabdb1918b099da0e791c6`, final whole-branch round 1.
+
+### Strengths
+
+- Replica-derived outcomes, including restore failures and freshness checks, pass through the closing identity check.
+- Root execution is refused before monitor-file access. Agent readers and writers have corresponding root guards.
+- Assignment uses the existing serving view and shared HRW implementation, without new bucket polling.
+- Publication has its own deadline; cumulative results avoid incrementing streaks multiple times within one run.
+
+### Issues
+
+#### Critical — P1, blocks merge
+
+**1. The new identity gate prevents existing replica families from ever being drilled.**
+
+**Invariant: every database assigned to this drill must remain verifiable.**
+
+[hibernate_verify.go:330](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:330) sends every selected route through the instance-only identity checker. However, `HibernatingHosts` includes hibernating sidecars and resident rootfs instances:
+
+- Sidecars have records under `sidecars/<name>.json`; `CaptureIdentity` reads `instances/<host>.json`. Healthy sidecars therefore become `no_record` forever.
+- Resident rootfs instances can have `Hibernate=false`; `ClassRefusal` rejects them even though the activator replicates their databases.
+
+Both families are deliberately excluded from box-wide verification, as documented by [rootfs_litestream_test.go:72](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/rootfs_litestream_test.go:72). Those tests check selection, so they miss the subsequent refusal.
+
+The result is lost restore coverage and unavoidable alerts after three runs or seven days. This challenges the ledger’s characterization of `no_record` routes as orphans.
+
+**Fix:** preserve verification for these existing families with appropriate identity checks, without weakening member-facing database admission. Add end-to-end drill tests using actual sidecar and resident records. This is also a flaw in the plan’s choice of a shared admission rule.
+
+#### Important — P2, fix before merge
+
+**2. A failed periodic upload is treated as successfully published.**
+
+**Invariant: finished results remain pending until publication succeeds.**
+
+[hibernate_verify.go:272](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:272) advances `published` before calling the publisher, whose callback returns no success indication.
+
+If the ten-minute upload fails while the next host remains blocked, the twenty- and thirty-minute ticks skip retrying. A crash then loses results that could have been uploaded after connectivity recovered.
+
+**Fix:** acknowledge the snapshot version only after successful bucket publication. Test failed upload → recovery → another tick without another completed host.
+
+**3. Compaction can still produce a false failed-restore incident.**
+
+**Invariant: disappearance of a compacted input must trigger replanning before declaring failure.**
+
+[hibernate_verify.go:423](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:423) retries only `litestream.ErrTxNotAvailable` returned by restoration.
+
+A listed file can disappear before its header or contents are opened. The installed Litestream S3 client returns `os.ErrNotExist` for that case. Both the planning-error arm and restore-error fallback classify it as `failed/restore_error`, despite a healthy replacement chain being available.
+
+**Fix:** handle missing planned replica objects through the bounded replan path, including header reads. Exercise disappearance through the real planner/downloader, and distinguish persistent missing history from successful compaction recovery.
+
+**4. A periodic publish can resurrect a verdict removed by move landing.**
+
+**Invariant: landing invalidation must survive an overlapping drill run.**
+
+[ops.go:550](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:550) rebuilds every publication from the run-start record. [dbverify.go:344](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:344) reads the current object only for its ETag.
+
+If landing removes a host after the drill loads its prior record, a later publication can restore that host’s old verdict. CAS does not prevent this: the publisher obtains the post-removal ETag and writes its stale body successfully. The local alert copy can then carry the resurrected verdict too.
+
+**Fix:** make landing invalidation durable against overlapping publication while retaining once-per-run streak accounting. Add an interleaved landing/publication test; the current sequential landing test cannot establish this property.
+
+**5. The streak exclusions suppress the promised warning for broken assignment.**
+
+**Invariant: persistent inability to run a test alerts after three runs, except budget exhaustion.**
+
+[dbverify.go:233](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:233) holds the streak for `no_assignment` and `no_record`.
+
+I challenge the Task 8 ruling. A missing or stale assignment for three nights is an operational fault, not ordinary budget exhaustion. Holding its streak delays detection until the seven-day coverage alert. That alert also directs operators toward capacity, rather than broken assignment.
+
+**Fix:** count persistent assignment failure toward the three-run warning. Resolve supported record families under finding 1, then distinguish genuinely excluded routes from failed identity lookup rather than suppressing all `no_record` outcomes.
+
+#### Minor — P3, follow-up
+
+- **Crash-leftover restore directories:** [ops.go:484](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:484) relies on deferred removal. SIGKILL, OOM or power loss leaves restored databases in the persistent cache; subsequent runs create another directory. Monitor staging cleanup does not cover these. Add bounded cleanup of abandoned drill scratch directories.
+- **Coverage count becomes stale while firing:** [verify.go:162](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:162) updates the count only when the alert first fires. Refresh its value when the number of overdue hosts changes.
+
+### Recommendations
+
+Deferred-minor triage:
+
+| Deferred item | Decision |
+|---|---|
+| Fleet-refusal test masked by region mismatch | P3; isolate the fleet guard. |
+| Trailing JSON delimiters accepted | Resolved by the second decode requiring EOF. |
+| Unavailable-target test | Include before merge with finding 3’s regression tests. |
+| Historical `/tmp/g` scratch | Execution location was corrected; its creator must confirm cleanup. |
+| Incorrect streak-test comment | P3; update it to match the final rule. |
+| Blocked-download test replaces the restore | P3; existing lease tests exercise real restoration cancellation, but a stalled transport test would strengthen coverage. |
+| Landing test compares bytes instead of recording writes | P3; add write tracking alongside finding 4’s interleaving test. |
+| Hook reads `cfg.Box` at call time | No required change; I found no production mutation after wiring. |
+| Bare metric numbers and missing snoozed reason | P3; presentation follow-up. |
+
+The quiet-tick test now uses a completion handshake, addressing the reported timing race.
+
+### Declined to judge
+
+- Console identity/`copy_since` filtering and roster expiry: explicitly deferred to slice 2b.
+- Export scheduling and destination behavior: later slices.
+- Actual deployment load and first-night production results: require the planned rollout; not established by this source review.
+
+### Assessment
+
+**Ready to merge? No.**
+
+The instance-only gate removes existing restore coverage. Publication recovery, landing invalidation and alert behavior also need fixes before enabling the nightly job everywhere.
+
+Changed Go files are `gofmt` clean. Targeted tests could not start because the sandbox blocked Go’s build-directory creation. CI lookup was blocked by network permissions. Earlier reports record Linux, Darwin and Windows builds; I could not independently verify them or Linux arm64. `git diff --check` reports trailing whitespace in historical review documents.
+
+No files were edited, no delegates spawned, no full suites run, and `GOCACHE` remained unset.
+
+**NOT READY**
\ No newline at end of file
diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-fable.md b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-fable.md
new file mode 100644
index 000000000..909d3c1ea
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-final-review-fable.md
@@ -0,0 +1,66 @@
+**Verdict: READY AFTER FIXES.** One P1 and three P2s, all small. I reviewed in passes myself (drill, record, bracket, alerts, agent wiring, monitor-file IO); I did not read the 1,500-line drill test file in full and ran no tests. No files changed.
+
+### Strengths
+- **Bracket:** `drillOne` confirms identity before every replica-derived outcome (empty plan, plan-moved, restore error, integrity, stale), and freshness is read inside it. No path records `passed` or `failed` for a changed instance (`internal/ops/hibernate_verify.go:359-405`).
+- **Record isolation:** every write goes through `KeyFor(ref)` with CAS. The move hook uses `cfg.Box`, which is the same `metricsBoxLabel` the lease ref uses (`haself.go:29`, `movespass.go:336,577`), so it cannot touch another box's record.
+- **Root safety:** the only monitor-file readers and writers are the agent, the drill and the alert watch, and each refuses at euid 0 before touching a path. The move hook takes nothing from `<data>/monitor`.
+- **Publishing:** every publish merges into the run-start record under its own 30 s context, and the final publish survives SIGTERM and the deadline.
+- **Request cost:** no new bucket polling. Per night a box makes one `Load`, at most about six GET+PUT publishes, and per host two record GETs plus one lock GET. The agent's 5-minute work is local files only.
+- **Cross-compile:** `GOOS=darwin` and `GOOS=windows` builds of `./internal/... ./cmd/...` succeed.
+
+### Issues
+
+#### P1 (blocks merge)
+1. **Instances the bracket permanently refuses will alert on night 3, on every box that has one.**
+ - `HibernatingHosts` (`hibernate_verify.go:74`) walks every `ActivatorLeased` row with a DBPath. That includes resident rootfs instances, which its own comment says are drilled here.
+ - `CaptureIdentity` (`internal/dbreads/identity.go:39-43`) returns `record-changed` for a record that does not sleep (`class.go:21`), is pooled, or is fleet-placed (`fleet/<name>`).
+ - `drillOne` (`hibernate_verify.go:338-346`) maps only a missing record to `no_record`. Every other refusal becomes `record_changed`, which adds to the streak, and the test at `hibernate_verify_test.go:714-759` pins that.
+ - Result: `verify_unverified@<host>` fires after three nights for every resident rootfs instance and every instance on a fleet or pool box, and never clears. Those instances also lose the drill they had before this branch.
+ - I confirmed this from code; I did not check which of these classes exist on dev or flagship today.
+ - Fix: decide per class. Either drill them (the bracket needs a drill-side class rule, not the `db`-read one) or give a standing refusal a streak-holding reason and leave it out of coverage. Reserve `record_changed` for a difference between open and close, or a record that changed since the last run.
+
+#### P2 (fix before merge)
+2. **`verify_coverage` fires permanently after 7 days for hosts that can never be decided.** `ReadVerify` (`internal/metrics/verify.go`, the `since` calculation) falls back to `FirstSeen` whatever the reason. Three kinds of host never get a decided verdict:
+ - `no_record` hosts. Sidecars with a database are in this set on every box, because their records live under `sidecars/`, not where `GetRecord` looks.
+ - Non-HA rows on a group box, which are `no_assignment` forever because `computeAssignment` walks only `rt.HA`.
+ - The refused classes from finding 1.
+
+ The ledger ruling that `no_record` is a "silent gap" is therefore wrong: it pages at day 7. Fix with finding 1 by excluding standing-refusal reasons from `Behind`, or by not putting those hosts in the fleet.
+3. **An abandoned host starves the box (challenges the ruling "abandoned hosts get no new verdict… costs nothing").** A host cut by the deadline, or one whose restore gets the unit killed (`MemoryMax=512M`), keeps a zero or oldest `VerifiedAt`, so `OldestFirst` puts it first every night. If it never finishes it takes the whole 45 minutes every night and nothing else on the box is drilled. Fix: record an abandoned host with `VerifiedAt = now` (still `not_reached`) so it rotates to the back.
+4. **A killed run leaves a tenant database on disk, and nothing removes it.** `run` creates `%C/carlos-verify/carlos-hibernate-verify*` (`ops.go:484`) and removes it only by `defer`. After SIGKILL or OOM the restored copy stays in the cache directory, and each night adds another. Fix: remove stale `carlos-hibernate-verify*` directories at the start of the run.
+5. **Transient and local errors page as an incident.** Any plan or restore error that is not `ErrNothingReplicated`/`ErrTxNotAvailable` becomes `failed/restore_error` (`hibernate_verify.go:427-440`). That covers an S3 error while listing, a network cut and a full scratch disk. `verify_failed` is incident level and holds until the host is re-drilled; under budget pressure a just-failed host sorts last. The plan asks for this, so it is a plan issue: only an integrity failure or a decode error is evidence of damage. At minimum, send plan-step and `ENOSPC` errors to `unverified`.
+
+#### P3 (follow-up)
+6. **Fresh boot:** the timer is `Persistent=true` and the unit orders only after `carlos-edge.service`. A catch-up run at boot can find a `self.json` older than 15 minutes, exit 1 and lose the night. It publishes nothing wrong. Order it after the agent, or retry briefly.
+7. **No free-space check:** `plan.RestoredBytes` is known before the restore, so a host that would not fit can be skipped.
+8. **Recreated but not reached:** a host recreated and then cut by the budget keeps the old incarnation's `passed` verdict and `LastDecidedAt` until it is drilled. It is identity-bound, so the 2b reader is safe, but the coverage clock is wrong for it.
+9. **No deployment store:** a box with a hibernate bucket but no deployment store now fails the unit every night. That ruling is acceptable; note it in the dev check.
+10. **Test cross-compile:** `go vet` for darwin and windows fails in `internal/edge` and `internal/host` test files this branch does not touch (`readerConn`, `deadAddr`, `claimsOffEnv`). The gate builds, not vets, so it is not a blocker.
+11. **Timing tests:** `verifyassign_test.go:132` and `hibernate_verify_test.go:1088` use 50 ms negative waits. They can only pass falsely, not flake red.
+
+### Deferred minors, triaged
+| Minor | Ruling |
+|---|---|
+| T1: fleet row masked by region mismatch in `identity_test.go:45` | Fix before merge, with finding 1; that guard is the one that matters. |
+| T2: `Decoder.More` accepts a trailing delimiter | Already fixed in 85903698. Close. |
+| T4: stale comment at `dbverify_test.go:132` | Fix before merge (one line). |
+| T4: `/tmp/g` socket scratch | Superseded by the `~/.cache/sk` ruling; confirm it is removed at branch close. |
+| T3: unavailable-target case | Follow-up. |
+| T5: blocked download through the production downloader | Follow-up. |
+| T7: landing test does not record writes | Follow-up. |
+| T7: `cfg.Box` read at call time | No change; it is set once. |
+| T8: bare number on the metrics page; all-snoozed message | Follow-up with 2b. |
+
+### Rulings
+- **Challenged:** "abandoned hosts… costs nothing" (finding 3), and `no_record` as a silent gap (finding 2).
+- **Upheld:** holding the streak for `no_assignment`/`no_record` against Astra's P2, root refusal, self-expiring `self.json`, the wall-clock publish, and accepting double drills on group boxes.
+
+### Declined to judge
+- Whether resident, fleet-placed or pooled instances should be drilled at all: a product decision for finding 1.
+- Whether the WAL freshness logic misses real staleness: the ledger accepts it, and it fails safe.
+- Console rendering and copy of the three rules: reviewed and approved in Task 8.
+- The 2b reader, `copy_since` and roster expiry: out of this slice.
+- Whether a failed oneshot unit raises any fleet alert: I did not trace it.
+
+### Assessment
+**Ready to merge: with fixes.** The bracket, isolation, root and publish paths are sound. As built, arming by default raises spurious operator alerts on night 3 (finding 1) and day 7 (finding 2) on any box holding a class the bracket refuses, and one stuck host can stop a box's drill (finding 3).
diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-ledger.md b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-ledger.md
new file mode 100644
index 000000000..20cf980bf
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-slice2a-ledger.md
@@ -0,0 +1,130 @@
+# SDD ledger — plan: docs/superpowers/plans/2026-11-11-member-backups-slice2a.md
+
+Branch member-backups-2a (base b358d51d). Spec rev 4.1. Implementers Opus; task reviews Astra; final Astra + Fable 5.2. Starts after slice 1.
+
+## Pre-flight scan
+| Pair / task | Produces vs consumes | Found |
+|---|---|---|
+| T1→T5 | dbreads.Identity, CaptureIdentity, ConfirmIdentity, CodeRecordChanged→record_changed | consistent |
+| T1→T4 | dbverify mirrors Identity field for field | consistent |
+| T2→T5 | boxself.Self{Ref,Group}, Assignment{At,Hosts,Unknown}, Read/ReadAssignment; boxchoice.HRW | consistent |
+| T2 (edge test) | TestDrillAssignmentCoversEveryHost in internal/edge; computeAssignment in internal/host | self-consistent |
+| T3→T5 | VerifyReplicaAt(ctx,bucket,prefix,region,dir,txid) (uint32,error), CheckDBContext | consistent |
+| T4→T5,T7,T8 | KeyFor, Merge(prior=run-start), Load/Publish/RemoveHost(ref,...), LastDecidedAt, UnverifiedRuns, FirstSeen | consistent |
+| T5→T8 | local alert copy <data>/monitor/verify.json = the record | consistent |
+| T6 | arms timer; T5 empty-fleet rule | consistent |
+| T7 | RemoveHost(ctx,s,cfg.Box,h) | consistent with T4 |
+| T0→T8 | copy ids: plan says MB2A-C*, review used rule.* / verify.reason.* | conflict, ruled |
+| T9 | two censuses | self-consistent |
+
+Ruling: approved copy ids are the review's rule.verify_*.{title,what,what.none,how_long,what_to_do} and verify.reason.* ids, not MB2A-C* — the review is the record — costs a rename.
+Ruling: Tasks 1-7 run before Paul's copy review returns; only Task 8 carries copy — costs nothing.
+Task 1: dispatched (base b358d51d)
+Task 1: implemented 8a0dd368 (DONE)
+Task 1: minor (deferred): identity_test.go:45 fleet row masked by region mismatch; request "fleet/acme" to isolate the fleet guard (same masking at agent_test.go:39)
+Task 1: complete (commits b358d51d..8a0dd368, review clean)
+Task 2: dispatched (base 8a0dd368)
+Task 2: implemented 3e962a32 (DONE; host claim census lists monitor/self.json + verify-assign.json)
+Ruling: listing the two new /data/monitor files in the host claim census is part of the task — the census refuses unclassified /data files — costs nothing.
+Ruling: a first assignment written before the edge view loads lists hosts Unknown until the next 5-min tick; the drill treats Unknown/stale as not_reached — costs at most one night's drill for a box restarted near 03:00.
+Task 2: minor (deferred): boxself.go:203 Decoder.More() accepts a trailing ] or }; decode a second value and require io.EOF
+Task 2: fix round 1/5 dispatched (P2 stale self identity on failed write; missing RED evidence)
+Task 2: fix round 1 implemented 038807ea — re-review running
+Task 2: fix round 1/5 (1 addressed, 1 open — unwritable monitor dir leaves old self.json; commits 3e962a32..038807ea)
+Ruling: self.json becomes self-expiring (At stamp, rewritten every 5 min on every box; drill reads it with ReadFresh maxAge 15m) instead of relying on removal — matches the assignment file's freshness rule — costs one extra small local write per 5 min per box.
+Task 2: fix round 2/5 dispatched
+Task 2: fix round 2 implemented 9b66dd45 — re-review running
+Task 2: fix round 2/5 (1 addressed, 0 open; commits 038807ea..9b66dd45)
+Task 2: complete (commits 8a0dd368..9b66dd45, review clean) — carry to Task 5: drill reads identity with boxself.ReadFresh(dataDir, now, 15*time.Minute)
+Task 3: dispatched (base 9b66dd45)
+Task 3: implemented e1d33194 (DONE)
+Ruling: a restore error wrapping litestream ErrTxNotAvailable (compaction between plan and restore) is not a failure: Task 5 replans once, then records unverified/plan_moved — costs a missed failure only if compaction keeps winning, which the 3-run unverified alert surfaces.
+Ruling: WAL databases rarely prove stale (counter doesn't move); accepted — fails safe, matches spec 'stale only when proved' — costs missed stale alarms, never false ones.
+Task 3: minor (carried to Task 5): add an unavailable-target case (ErrTxNotAvailable, not ErrNoReplica, empty scratch) — Task 5's replan test covers the caller side
+Task 3: complete (commits 9b66dd45..e1d33194, review clean)
+Task 4: dispatched (base e1d33194)
+Task 4: implemented 750bd288 (DONE; record-write census fails as expected incl. OfflineManifest — Task 9)
+Ruling: identity counts as changed only when both sides are known and differ (a not_reached placeholder gaining its first identity keeps FirstSeen) — costs a later FirstSeen if wrong.
+Ruling: not_reached and no_assignment HOLD UnverifiedRuns (neither increment nor reset) — 'three runs in a row' means tested runs; the coverage alert handles not-reached — costs a delayed unverified alert if wrong. Fix to follow review.
+Ruling: Detail free-text field kept — the restore error text is operator evidence — costs nothing.
+Task 4: minor (deferred): socket tests' TMPDIR=/tmp/g on the shared RAM disk — keep tiny; remove at branch close
+Task 4: fix round 1/5 dispatched (identity reset through unknown; shared ValidRef; streak hold for not_reached/no_assignment)
+Task 4: fix round 1 implemented 7af5822e — re-review running
+Task 4: fix round 1/5 (3 addressed, 0 open; commits 750bd288..7af5822e)
+Task 4: minor (deferred): dbverify_test.go:132 comment still says an unreached run ends the streak
+Task 4: complete (commits e1d33194..7af5822e, review clean)
+Task 5: dispatched (base 7af5822e)
+Task 5: implemented 6de4a16f (DONE_WITH_CONCERNS)
+Ruling: hosts with no instance record get reason no_record, which holds the streak (no 3-night alert) and is counted in the operator view — they are not 'changed', and alerting nightly would be noise — costs a silent gap for orphan registry rows until the operator view (2b). Fix after review.
+Ruling: exit 1 on invalid CARLOS_REGION or an unopenable bucket — refuse loudly over drilling unpublished — costs a failed unit on a misconfigured box (visible).
+Ruling: budget-cut/abandoned hosts get no new verdict (Merge keeps the old one or marks never-seen not_reached), so they sort first next night — costs nothing.
+Ruling: periodic publish fires after the first host finishing past each 10-min mark (each host is deadline-bound) — costs at most one host's duration of delay.
+Ruling: plan_moved and record_unreadable (and no_record) get copy labels added to the open 2a copy review.
+Ruling REVERSED: periodic publish is wall-clock every 10 min, independent of host completion (Astra P2: spec says every 10 min; a long restore would hold finished work unpublished) — costs a ticker goroutine and a mutex.
+Task 5: minor (deferred): blocked-download test stubs the whole restore; add a focused case through the production downloader
+Task 5: fix round 1/5 dispatched (wall-clock publish; no_record reason)
+Task 5: fix round 1 implemented ddfbd4df — re-review running
+Task 5: fix round 1/5 (2 addressed, 0 open; commits 6de4a16f..ddfbd4df)
+Task 5: complete (commits 7af5822e..ddfbd4df, review clean)
+Task 6: dispatched (base ddfbd4df)
+Task 6: implemented b63ba33a (DONE; root-read census fails for Task 9; TestPlan14ActivationNamedUnitPreflight failing at ddfbd4df — checking base)
+Ruling: TestPlan14ActivationNamedUnitPreflight fails at base b358d51d too (instance-control/empty: lifecycle provider unavailable) — pre-existing/environmental, not this branch — costs nothing; CI decides.
+Ruling: socket-test scratch moves from /tmp/g to ~/.cache/sk (short, on disk) — Astra flagged /tmp three times; machine rules say /tmp is a shared RAM disk — costs nothing.
+Task 6: complete (commits ddfbd4df..b63ba33a, review clean)
+Task 7: dispatched (base b63ba33a)
+Task 7: implemented 86eb0563 (DONE; test only; hook reads cfg.Box at call time)
+Ruling: Task 7 scope finding resolved by evidence, not a fix — Task 4 (e1d33194..7af5822e, reviewed clean) changed movespass.go:576 and movesland_test.go; movescutguard_test.go:78 and movesinstall_test.go:230 stubs already have the unchanged (ctx, store, host) signature — costs nothing.
+Task 7: minor (deferred): landing test compares bytes but doesn't record writes; an identical rewrite of another box's record would pass
+Task 7: minor (deferred): hook reads cfg.Box at call time; capture it at wiring if cfg.Box could ever change
+Task 7: complete (commits b63ba33a..86eb0563, review clean after ruling)
+Task 0: Paul approved copy review 5vr6yqeoyyq5ohzicaykwchyzu unedited (25 strings); folded into Task 8
+Task 8: dispatched (base 86eb0563)
+Task 8: implemented 0bcdd2de (DONE_WITH_CONCERNS)
+Ruling: Rules-page 'Fires when' and threshold lines (6 strings) go to a small copy review (mb-copy2); the derived what.none placeholders and 'No threshold.' are replaced once approved — costs a follow-up fix round.
+Ruling: verify_unverified's reason line moves below 'What to do' so 'Check the reason below' is true — copy stays as approved — costs one line in alertEmitNote.
+Ruling: levels accepted — verify_failed incident (like restarts), unverified and coverage warning (like disk_eta/geoip).
+Task 8: Astra review Needs fixes (P2 streak exclusions; P3 separator; P3 thresholds; ⚠️ no RED evidence)
+Ruling: Astra's P2 (no_assignment/no_record hold the streak) is overruled by the ledger's earlier rulings (Task 4 fix round, Task 5 no_record) made after the plan text — they are not faults, alerting would be noise — costs a delayed alert if either masks a real problem; the coverage alert still fires.
+Ruling: reason composed into the what line after a colon (strip the full stop, append ': <label>.'), as the reason labels were written; what_to_do 'below' -> 'above' sent for copy approval — costs one re-approval.
+Copy: Paul approved review 2jhfdd2h… unedited (6 rules.when/th lines, rule.verify_unverified.what_to_do 'above', backups.why.otherregion command-line wording) — approved-copy-2.json
+Task 8: fix round 1/5 dispatched (approved rules lines, what_to_do, colon composition, copy record; P2 overruled)
+Task 8: fix round 1 implemented 3bf932b0 — re-review running
+Task 8: fix round 1/5 (5 addressed, 0 open; commits 0bcdd2de..3bf932b0)
+Task 8: minor (deferred): metrics page shows a bare number for verify_failed/verify_coverage; all-snoozed message uses what.none without a reason
+Task 8: complete (commits 86eb0563..3bf932b0, review clean)
+Task 9: dispatched (base 3bf932b0)
+Task 9: implemented 0e60df82 (record-write inventory) + c113836e (root-read proposal) — both census tests pass; implementer flagged root-agent symlink/unbounded-read risk in boxself writes and metrics.ReadVerify (ls284 family)
+Ruling: fix with no-follow, exclusive random temp names, regular-file checks and bounded reads (the approved ls284 pattern), not skip-on-root — the drill must work on root-run boxes — costs Linux-specific IO code with refusing stubs.
+Task 9: fix round 1/5 dispatched (root-safe monitor IO; re-propose census)
+Task 9: fix round 1 implemented 833b86af (no-follow safefile IO, caps 64KiB/1MiB) + ecb11bfd (re-proposed). Facts: agent and drill both run as carlos; carlos owns <data>/monitor. verify.json added to claim census.
+Task 9: fix round 2/5 dispatched (flaky TickWithNothingNewIsQuiet; crash-leftover staging dirs wedging the claim census)
+Task 9: fix round 2 implemented 8a79cf14 7eb8d64f 7df59219 (deterministic ticker test; crash-leftover cleanup + census acceptance; re-proposed, seal a51642d7)
+Task 9: code re-review (fix rounds 1-2) and census review (brief aa34ebdb) running
+Census review round 1: NOT READY (P1 root consumes agent-written monitor records; P2 readStrict trailing delimiters). Code re-review of Task 9 fixes: 3 addressed, 1 new Important (test hook leak between subtests).
+Ruling REVERSED: drill and agent refuse/skip monitor-file reads and writes when euid==0 (ls284 precedent) — both shipped units run as carlos, so production is unaffected — costs the drill on a hypothetical root-run box.
+Task 9: fix round 3/5 dispatched (root refusal; strict single-value JSON; subtest hook isolation)
+Task 9: fix round 3 implemented 8361c75a 85903698 132dc89a (root refusal; strict JSON; hook isolation) — census R2 + code re-review running
+Task 9: fix round 3/5 (3 addressed, 0 open; commits 7df59219..132dc89a); census R2 READY (recorded on #280)
+Task 9: complete (commits 3bf932b0..132dc89a, review clean, census approved)
+Final review: dispatched (Astra + Fable 5.2, 01d6ca78..bb254400)
+Final review (Astra): NOT READY — P1 sidecars/resident rootfs refused by the instance-only identity gate; P2 failed upload acked; P2 os.ErrNotExist not replanned; P2 publish resurrects landing-removed verdicts; P2 no_assignment should count toward the 3-run alert
+Ruling REVERSED (Astra P2-5): no_assignment counts toward the 3-run unverified alert (a broken assignment is an operational fault); no_record keeps holding only for routes with no record of any family after the P1 fix — costs alerts for stale assignments, which is the point.
+Final review: waiting for Fable before the single fix wave
+Final review (Fable): READY AFTER FIXES — same P1 (refused families), P2 coverage fires for never-decidable hosts, P2 abandoned host starves the box, P2 crash leftovers, P2 transient errors page as failures
+Ruling: drill every family HibernatingHosts selects with a drill-side identity rule (no member-facing class refusals); no_record holds and leaves coverage; group-box non-HA rows drilled locally; no_assignment counts (Astra over Fable, now that permanent no_assignment is gone); only integrity/decode failures are 'failed', the rest unverified/storage_unavailable (copy pending 'tcoodml4…').
+Final fix wave: dispatched (final-fix-brief.md)
+Final fix wave implemented f0493005..9550426a (11 items)
+Ruling: a record placing the host in another region is no_record (holds, no coverage alert), not record_changed — conservative — costs a silent stale route until the operator view.
+Ruling: every planning error incl. an undecodable header is unverified/storage_unavailable — ltx v0.5.1 reports missing objects as corrupt, so decode errors aren't reliable damage evidence — costs a missed 'failed' for real header corruption (the 3-run unverified alert still fires).
+Ruling: scratch cleanup removes only directories older than 2 hours; abandoned hosts keep their previous verdict plus AttemptedAt — accepted.
+Merged main (77a38e8d) + census re-proposed (bee2b497); fix-wave re-review + census R3 running
+Final fix wave re-review: 9/11 addressed; open: (4) unknown errors and all CheckDB errors still classified as damage; (9) scratch cleanup after the empty-fleet returns
+Ruling: residual P2s fixed without reopening the review (AGENTS stopping rules: P2s are fixed without another round); both are load-bearing (false incident pages; tenant data left on disk) — costs a quick census re-confirm on the new tip.
+Residual P2s fixed 26e0ed44 + census re-proposed 5ef39d64 (seal b130b2d6); census R3 READY at bee2b497 committed
+Ruling: SQLite's own corrupt/not-a-database errors count as damage (implementer's extension) — otherwise a non-database restore could never be failed — costs nothing.
+Census R3b READY at d1d40fac (seal b130b2d6)
+CI d1d40fac failed: TestCLIGolden (new --budget/--publish-every flags) and TestLargeManifestReleaseThenKeep (activator; checking whether branch-caused); flag help lines added to Paul's pending copy review
+CI fix: TestCLIGolden re-recorded d82ba6c2; TestLargeManifestReleaseThenKeep not reproducible (0/280 at tip and main) — flake, noted on #933
+Note: the implementer ran 'git worktree prune' (removes only entries whose directories are gone; may include other sessions' stale entries)
+Copy: Paul approved storage_unavailable label + --budget/--publish-every help unedited; recorded and pinned; Paul's go to merge after copy approval
+Merged main e8a36b14 again; census re-proposed (seal unchanged b130b2d6); CI rerun