carlos / platform Public

member backups 2a: census round 3 READY (Astra) (#898)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 52ed2b9a32d61e23159110fd17fb0b8728ab754b parent 5ef39d6
1 file changed, +65 −0
  • docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a-R3.md +65 −0

Intent

Human

<task-notification> <task-id>a8d4a811d55efa7fa</task-id> <tool-use-id>toolu_01J2j9ZmwoKomR9oxpeqtrWb</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/a8d4a811d55efa7fa.output</output-file> <status>completed</status> <summary>Agent "Slice 2a final-review fix wave" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE. Both remaining P2s are fixed and the census is re-proposed under the same NAME. Nothing is pushed. Commits: 26e0ed44 (the fixes) and 5ef39d64 (the census re-proposal). - **Item 4:** a host is now marked `failed` only on proven damage, and everything else is `unverified/storage_unavailable`. - **Lease:** `CheckDBContext` marks damage only when integrity_check isn't "ok", the database has no tables, or SQLite itself says the file is corrupt or not a database. Open and I/O errors come back unmarked. - **Drill:** `failed` now needs that mark, or an LTX checksum/format error with no storage error behind it. Your four requested tests are in, plus one that runs a real corrupted database through the real restore. - **Item 9:** crash-leftover cleanup now runs right after the root and config checks, before both empty-fleet returns. A test covers an empty-fleet run with and without a previous record. Tests: before the fixes, the new ops and lease tests failed on body cut short, SQLite open failure, unknown error, cannot-open marking and both empty-fleet cases; they all pass now. The four census tests pass, the linux/darwin/windows builds succeed, and the targeted ops, lease, dbverify, alerting, metrics and dbdoor tests pass. Concerns: - **Beyond the brief:** I count SQLite's own corrupt / not-a-database errors as damage. Without that, a restore that isn't a database at all would never be `failed`. - **Claims file:** I added one claim for `lease.CheckDBContext` and updated the `hibernateRun.run` claim. "Same claims" wasn't enough because the census card needs a claim for every changed unit. - **Census round 3:** the seal is now `b130b2d6…`. The round 3 brief (615ee1b5) and the untracked R3 findings file appeared while I worked and refer to the earlier seal, so round 3 needs to check the new one. I didn't touch either file. - **Still open:** the census needs re-confirming, and Paul still has to approve the `storage_unavailable` label. Report (new "Residual P2s" section at the end): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/.superpowers/sdd/2026-11-11-member-backups-slice2a/final-fix-report.md</result> <usage><subagent_tokens>438319</subagent_tokens><tool_uses>23</tool_uses><duration_ms>436185</duration_ms></usage> </task-notification>

diff --git a/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a-R3.md b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a-R3.md
new file mode 100644
index 000000000..0ad6e7370
--- /dev/null
+++ b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a-R3.md
@@ -0,0 +1,65 @@
+Reviewed `origin/main...bee2b497f3f31362a82e78a63c161cd3a5d9f3b2`, focusing on changes since `132dc89a`. Census round **3 of 3**. **No outstanding census findings.** Round 1’s root-input and JSON-framing fixes remain intact.
+
+The family lookups, self.json wait, scratch cleanup, and publication remain behind the root refusal. The database-read gate retains its existing restrictions.
+
+| Changed unit | Verdict | Evidence and basis |
+|---|---|---|
+| `host.armPhase1` | Approve | [movespass.go:576](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/movespass.go:576): removal targets the configured box’s record; existing authority retained. |
+| Hibernate-verify service `external` | Approve | [service:43](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/units/carlos-hibernate-verify.service:43): directives unchanged, including `User=carlos` and sandbox restrictions. |
+| `EmptyInstallationCensus.checkLocal` | Approve | [empty_census.go:224](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/empty_census.go:224): exact stage classification; surrounding refusals retained. |
+| `censusRule.check` | Approve | [empty_census.go:335](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/empty_census.go:335): stage parent must be a real directory. |
+| `CheckMigrationRoots` | Approve | [migration_census_linux.go:96](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/migration_census_linux.go:96): same bounded stage check and refusal reporting. |
+| `host.runAgent` | Approve | [agent.go:1277](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agent.go:1277): shared duty view preserves existing inputs; assignment loop retains its root guard. |
+| `boxself.Read` | Approve | [boxself.go:171](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:171): bounded, validated identity read; production caller refuses root. |
+| `boxself.ReadFile` | Approve | [boxself.go:273](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:273): delegates bounded, no-follow I/O. |
+| `boxself.ReadFresh` | Approve | [boxself.go:189](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:189): age and future-skew checks retained. |
+| `boxself.readStrict` | Approve | [boxself.go:289](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:289): unknown fields refused; second decode must return EOF. |
+| `boxself.readFile` | Approve | [io_linux.go:21](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/io_linux.go:21): pinned regular-file read, single-link check, size cap. |
+| `boxself.writeFile` | Approve | [io_linux.go:49](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/io_linux.go:49): no-follow directory access and staged replacement. |
+| `host.dataDirFrom` | Approve | [agent.go:220](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agent.go:220): existing environment/default selection moved unchanged. |
+| `computeAssignment` | Approve | [verifyassign.go:62](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:62): existing registry and serving-view inputs determine assignment. |
+| `dutyView` | Approve | [verifyassign.go:33](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:33): existing sidecar refusal and projections preserved. |
+| `runVerifyAssign` | Approve | [verifyassign.go:87](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:87): production caller refuses root before listing or writing. |
+| `censusStageCheck` | Approve | [empty_census.go:369](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/empty_census.go:369): bounded, no-follow metadata listing; no file contents consumed. |
+| `recordedRead.Read` | Approve | [check.go:101](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/lease/check.go:101): records errors from the existing replica stream; no new source or credential. |
+| `metrics.ReadVerify` | Approve | [verify.go:61](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:61): bounded parsing; root-run monitoring remains disabled. |
+| `hibernateRun.clearCrashedScratch` | Approve | [ops.go:567](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:567): reached only after root refusal; cleanup selects aged, prefixed directories directly under configured scratch. |
+| `hibernateRun.run` | Approve | [ops.go:443](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:443): root refusal precedes monitor reads, waiting, store access, registry access, and cleanup. |
+| `parseHibernateVerifyFlagsTo` | Approve | [ops.go:318](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:318): flag parsing adds no external read. |
+| `safefile.ReapStages` | Approve | [reap_linux.go:40](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/safefile/reap_linux.go:40): direct-child listing; existing ownership, age, type, and anchored-removal checks retained. |
+| `HibernatingHosts` | Approve | [hibernate_verify.go:69](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:69): existing selection retained; sidecar and HA fields select drill handling. |
+| `host.dataDir` — quiet | Approve retirement | [agent.go:217](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agent.go:217): reads moved into inventoried `dataDirFrom`. |
+| `runHibernateVerify` — quiet | Approve retirement | [ops.go:346](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:346): registry read moved into `hibernateRun.run`; actual effective UID supplies its root guard. |
+
+| Changed envelope | Verdict | Evidence and basis |
+|---|---|---|
+| `internal/activator` | Approve | [haduties.go:401](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/activator/haduties.go:401): hashing extracted without changing selection. |
+| `internal/alerting` | Approve | [ruletext.go:73](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/alerting/ruletext.go:73): text and numeric reason mapping; no new authority. |
+| `internal/boxchoice` | Approve | [hrw.go:15](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxchoice/hrw.go:15): existing hash algorithm preserved. |
+| `internal/boxself` | Approve | [boxself.go:289](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:289): strict framing and bounded I/O retained; root consumers excluded. |
+| `internal/dbreads` | Approve | [identity.go:29](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbreads/identity.go:29): database-read class, placement, identity, and move restrictions remain intact. |
+| `internal/dbverify` | Approve | [dbverify.go:376](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:376): publication remains confined to a validated box key; removal checks occur inside each CAS attempt. |
+| `internal/host` | Approve | [agententry.go:61](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agententry.go:61), [metrics_loop.go:634](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/metrics_loop.go:634): root monitor reads and writes remain disabled; bootstrap arms the existing unprivileged service. |
+| `internal/host/units` | Approve | [service:53](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/units/carlos-hibernate-verify.service:53): execution identity and restrictions unchanged. |
+| `internal/hostbox` | Approve | [empty_census.go:369](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/empty_census.go:369): narrowly classified stage metadata; contents never opened. |
+| `internal/hostops` | Approve | [mutation_classifier.go:64](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostops/mutation_classifier.go:64): verification family remains non-app; delete permission not added. |
+| `internal/lease` | Approve | [check.go:52](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/lease/check.go:52), [check.go:250](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/lease/check.go:250): error recording wraps existing reads; scratch restoration and cleanup remain bounded to the supplied output directory. Zero-target behavior retained. |
+| `internal/metrics` | Approve | [verify.go:61](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:61): bounded record parsing and alert evaluation behind the root caller guard. |
+| `internal/moves` | Approve | [offline.go:72](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/moves/offline.go:72): manifest description only. |
+| `internal/ops` | Approve | [drillidentity.go:49](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/drillidentity.go:49), [ops.go:449](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:449), [ops.go:634](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:634): family-specific identity checks, waiting, cleanup, and acknowledged publication remain exclusively on the non-root drill path. |
+| `internal/release` | Approve | [changeindex.go:92](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/release/changeindex.go:92): per-box generation scope restricted to the intended key depth. |
+| `internal/safefile` | Approve | [reap_linux.go:40](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/safefile/reap_linux.go:40): exact stage names and existing constrained cleanup. |
+
+The record-write inventory changes also pass:
+
+| Unit | Verdict | Evidence |
+|---|---|---|
+| `Publish` → `PublishOver` | Approve `nonrecord / sel:Put` | [dbverify.go:362](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:362): write moved into the helper; validated control key and three-attempt CAS retained. |
+| `RemoveHost` | Approve `nonrecord / sel:Put` | [dbverify.go:325](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:325): read/delete/write stays inside each CAS attempt and within the supplied box key. |
+| `OfflineManifest` | Approve `reference / lit:instances` | [offline.go:72](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/moves/offline.go:72): description only. |
+
+Verified **24 changed-unit source digests**, **3,949 inventory fingerprints**, and **177 cumulative seals**, ending at `ecd4ad1ec5b8027552456c99abd06862637a26d4c5e021615481794c4a7752f0`.
+
+Targeted census tests and architecture-scope listing could not start because the read-only sandbox blocked Go’s temporary/cache writes. This is source-review approval, not a test-pass or independently recomputed envelope-hash claim. No files edited, no subagents spawned, no full suites run; `GOCACHE` left unset.
+
+READY
\ No newline at end of file