member backups 2a: census round 2 brief (#898)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a.md+83 −0docs/superpowers/notes/reviews/member-backups/CODEX-REVIEW-BRIEF-census-member-backups-2a-R2.md+54 −0
CI failed — run details
Intent
<task-notification> <task-id>a6db8b3211f158c85</task-id> <tool-use-id>toolu_01XwH83pSKWxZy6fC6u743Cq</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/a6db8b3211f158c85.output</output-file> <status>completed</status> <summary>Agent "Implement slice 1 Task 5 (CLI)" 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. All three review findings are fixed and committed on member-backups-1, which is not pushed. The census changed and was re-proposed, so the census approval needs re-confirming on #280. **Commits:** - d28afa8f: the `--instance` fix, the two comments, and the census re-pins. - 56d01f24: spec rev 6.1 and its review files from origin/design-member-backups (3b69c3c9). This branch's census review files are kept. **Item 1 (operate credential):** an operate credential that leaves out `--instance` now gets Paul's approved line, exactly: "This credential can't list the app's instances. Name one with --instance." The command exits 1 and never calls the backups route. The instance-list route is not widened. The line lives in `internal/backupswords` with the other shared strings, is in the copy record as `backups.cli.needinstance`, and is pinned in the approved-copy test. **Test:** a console-backed test harness exists, so the new test runs against a real `console.Server` and its route gates, not a fake console. It checks: - operate with `--instance` works; - operate without it prints the approved line and never calls the backups route; - deploy without it still picks the app's only instance. It failed first with the real role 403. **Test summary:** build, vet and gofmt are clean. The root CLI, parity, approved-copy, `backupswords`, both census tests and the console backups tests all pass at tip 56d01f24. **Census:** it changed. - In the record-write census, the CLI's backups function and the route table's comment fix needed new fingerprints. I re-pinned both; classes and kinds are unchanged. - In the root-read census, the root package and `internal/backupswords` changed, so I re-ran `make census-propose` with updated claims. The seal is unchanged. - The Astra census review recorded in 791acdce read the old overlay, so it needs re-confirming on #280 for the new tip. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-1/.superpowers/sdd/2026-11-11-member-backups-slice1/task-5-report.md (new "Final fix wave" section)</result> <usage><subagent_tokens>216525</subagent_tokens><tool_uses>47</tool_uses><duration_ms>553045</duration_ms></usage> </task-notification>
Attributed to this commit: 29.8 g CO₂e (3,774,636 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on member-backups-2a, 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/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a.md b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a.md| new file mode 100644 |
| index 000000000..b59bea3fb |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-census-member-backups-2a.md |
| @@ -0,0 +1,83 @@ |
| +Reviewed `01d6ca78..7df59219009377bbf83c04e0ed309681b55ceb47`, census round 1 of 3. Found **one P1 and one P2**. |
| + |
| +1. **P1 — `hibernateRun.run`, `ReadVerify`: root still consumes agent-controlled monitor records.** |
| + The drill reads `self.json` at [ops.go:404](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:404), then uses its `Ref` to select the deployment-store record at [ops.go:433](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:433). There is no effective-UID guard. `ValidRef` constrains the key’s shape; it does not establish that the reference belongs to this box. |
| + |
| + **Failure scenario:** a process acting as `carlos` replaces `self.json` with a regular, single-link file containing a fresh timestamp and another valid box reference. A root-invoked drill accepts it, reads that box’s record and can replace it—including clearing it when the local fleet is empty. No symlink is required. |
| + |
| + The same boundary remains open in monitoring: [metrics_loop.go:983](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/metrics_loop.go:983) unconditionally reads `verify.json`, allowing agent-written content to fire or clear a root-run agent’s verification alerts. The adjacent restart watcher implements the ls284 root refusal at [restartwatch.go:163](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/restartwatch.go:163). |
| + |
| + **Fix:** refuse root execution of the drill before reading monitor files, and disable the file-backed verification reading for root-run agents, following ls284. Test that these root paths never invoke the monitor reader or deployment-store operations. The shipped `User=carlos` service can continue operating. |
| + |
| + **Invariant / fault family:** ls284—new root operations must not derive their inputs or authority from agent-writable monitor records. No-follow I/O prevents pathname redirection; it does not authenticate file contents. |
| + |
| +2. **P2 — `readStrict`: trailing malformed JSON is accepted.** |
| + [boxself.go:298](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:298) uses `Decoder.More()` to check for trailing content. `More()` returns false for `}` and `]`; it does not require end-of-input. |
| + |
| + **Failure scenario:** a valid self or assignment object followed by an extra `}` or `]` is accepted, contrary to the claimed strict decoding contract. |
| + |
| + **Fix:** perform a second decode and require `io.EOF`; add cases for trailing closing delimiters and malformed suffixes. |
| + |
| + **Invariant / fault family:** monitor-record framing—accept exactly one complete JSON value. |
| + |
| +No P3 findings. |
| + |
| +The following verdicts cover each card entry. Approval of a helper or retirement is limited to that entry; it does not override the rejected caller paths above. |
| + |
| +| 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 uses `cfg.Box`; existing authority retained. | |
| +| Hibernate-verify service `external` | Approve | [service:32](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/units/carlos-hibernate-verify.service:32): directives unchanged, including `User=carlos`. | |
| +| `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; other 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:1270](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agent.go:1270): shared duty view and assignment wiring preserve existing registry authority. | |
| +| `boxself.Read` | Reject—P1 | [boxself.go:170](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:170): agent-written identity reaches an unguarded root caller. | |
| +| `boxself.ReadFile` | Approve helper | [boxself.go:272](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:272): delegates bounded I/O; establishes no content authority. | |
| +| `boxself.ReadFresh` | Reject—P1 | [boxself.go:188](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:188): freshness does not authenticate the reference. | |
| +| `boxself.readStrict` | Reject—P2 | [boxself.go:288](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:288): trailing-input check is incomplete. | |
| +| `boxself.readFile` | Approve helper | [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 and 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:61](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:61): registry/view-derived assignment only. | |
| +| `dutyView` | Approve | [verifyassign.go:32](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:32): preserves the sidecar refusal and existing projections. | |
| +| `runVerifyAssign` | Approve | [verifyassign.go:94](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/verifyassign.go:94): existing registry list feeds the bounded assignment writer. | |
| +| `censusStageCheck` | Approve | [empty_census.go:369](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/hostbox/empty_census.go:369): no-follow directory listing; empty or one regular `data` entry; no content read. | |
| +| `metrics.ReadVerify` | Reject—P1 | [verify.go:58](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:58): new agent-writable input consumed by root-run monitoring. | |
| +| `hibernateRun.run` | Reject—P1 | [ops.go:399](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:399): monitor identity selects store operations without a root refusal. | |
| +| `parseHibernateVerifyFlagsTo` | Approve | [ops.go:303](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:303): flag parsing; no new 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 children only, bounded listing, existing ownership/age/type checks and anchored removal. | |
| +| `host.dataDir`—quiet | Approve retirement | [agent.go:217](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/agent.go:217): literals moved to the separately inventoried helper. | |
| +| `runHibernateVerify`—quiet | Approve retirement | [ops.go:331](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:331): direct registry read moved to `hibernateRun.run`; P1 remains there. | |
| +| `HibernatingHosts` | Approve | [hibernate_verify.go:59](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/hibernate_verify.go:59): existing selection retained; account/app copied for identity checks. | |
| + |
| +| 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 moved 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): rule text and numeric reason mapping. | |
| +| `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 extracted intact. | |
| +| `internal/boxself` | Reject—P1, P2 | [boxself.go:170](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/boxself/boxself.go:170): identity-consumption and strict-decoding findings. | |
| +| `internal/dbreads` | Approve | [identity.go:29](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbreads/identity.go:29): shared bracket preserves identity, placement, class and move refusals. | |
| +| `internal/dbverify` | Approve | [dbverify.go:297](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:297): key confinement and CAS behavior correct; caller identity remains P1. | |
| +| `internal/host` | Reject—P1 | [metrics_loop.go:983](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/metrics_loop.go:983): unconditional root-run monitor reading. Timer arming and move-hook changes otherwise pass. | |
| +| `internal/host/units` | Approve | [service:39](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/host/units/carlos-hibernate-verify.service:39): environment, command, user and sandbox directives 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-record family remains non-app; delete permission not added. | |
| +| `internal/lease` | Approve | [check.go:149](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/lease/check.go:149): pinned scratch restore, cancellation-aware check and cleanup; zero-target restore behavior retained. | |
| +| `internal/metrics` | Reject—P1 | [verify.go:58](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/metrics/verify.go:58): unguarded root consumption through its host caller. | |
| +| `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` | Reject—P1 | [ops.go:404](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/ops/ops.go:404): agent-written identity controls the root-invoked drill. | |
| +| `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 three record-write inventory reasons match their diffs: |
| + |
| +| Unit | Verdict | Evidence | |
| +|---|---|---| |
| +| `dbverify.Publish` | Approve `nonrecord / sel:Put` | [dbverify.go:334](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:334): validated control key; same three-attempt Get/CAS Put. | |
| +| `dbverify.RemoveHost` | Approve `nonrecord / sel:Put` | [dbverify.go:297](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/dbverify/dbverify.go:297): read/delete/write remains inside each CAS attempt. | |
| +| `moves.OfflineManifest` | Approve `reference / lit:instances` | [offline.go:72](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups-2a/internal/moves/offline.go:72): only the verification-key description changes. | |
| + |
| +All legacy fingerprints and cumulative chain seals match, ending at `a51642d7a2dea0506dfd4b9116aec5261629d2a525d13250712f21cd42f6af10`. The targeted census tests could not start because the read-only sandbox blocked Go’s build-directory creation. `GOCACHE` remained unset. No files were edited, no subagents spawned, and no full suites run. |
| + |
| +NOT READY |
| \ No newline at end of file |
diff --git a/docs/superpowers/notes/reviews/member-backups/CODEX-REVIEW-BRIEF-census-member-backups-2a-R2.md b/docs/superpowers/notes/reviews/member-backups/CODEX-REVIEW-BRIEF-census-member-backups-2a-R2.md| new file mode 100644 |
| index 000000000..5d5dd41d1 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/member-backups/CODEX-REVIEW-BRIEF-census-member-backups-2a-R2.md |
| @@ -0,0 +1,54 @@ |
| +# Review brief: census proposal member-backups-2a, round 2 of 3 |
| + |
| +Repo carlos/platform, branch `member-backups-2a`, commit 132dc89a94d71a248780c46569fa0b48d4ec50c9. |
| +Under review: the root-read census card |
| +`docs/superpowers/notes/census-proposal-member-backups-2a.md` (overlay |
| +`internal/provision/testdata/plan14-root-reads-member-backups-2a.tsv`, its |
| +chain line, claims `docs/superpowers/notes/census-claims-member-backups-2a.tsv`) |
| +and the record-write census inventory (`memberBackups2aWriteCensusInventory`), |
| +against the branch diff `01d6ca78..132dc89a94d71a248780c46569fa0b48d4ec50c9`. |
| +Authorities: AGENTS.md "The census: the reviewer decides" on main. |
| + |
| +You are the independent census reviewer (the author is Claude). Give a |
| +verdict for every unit and envelope the card lists, citing the lines read. |
| + |
| +## What to check |
| + |
| +1. Reject, as a finding, if the change lets root open, run, query or |
| + follow anything it did not before from a path or input a tenant, an |
| + app or a box agent can create, write or name; if it weakens a check, |
| + refusal, validation, argument or environment root relies on; if a |
| + disposition is wrong for the unit's reads; or if the diff cannot settle |
| + any of these. |
| +2. Look hardest at: the files under `<data>/monitor` (self.json, |
| + verify-assign.json, verify.json and their staging directories), written |
| + by the agent and the drill (both User=carlos, carlos owns the |
| + directory) and read or listed by any root pass (the claim census walks, |
| + hostbox, safefile); the hibernate-verify drill as armed by default; |
| + the per-box `control/verify/<ref>.json` publish; the move-landing hook. |
| + The ls284 ruling is the precedent for monitor files. |
| +3. The record-write inventory re-pins dbverify.Publish, dbverify.RemoveHost |
| + and moves.OfflineManifest: each reason true to its diff. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. |
| +- **P2**: wrong or missing; fixed without reopening (the census checks the fix). |
| +- **P3**: clarity or polish; follow-up only. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3 (unit, problem, evidence file:line, failure |
| +scenario, fix, invariant). A per-unit/envelope verdict table. End with |
| +exactly one verdict: READY, READY AFTER FIXES, or NOT READY. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents. |
| +Do not run the full test suites. Leave GOCACHE unset. |
| + |
| +## Round 2 |
| + |
| +Round 1: `CODEX-FINDINGS-census-member-backups-2a.md` (NOT READY: P1 root |
| +consumes agent-written monitor records; P2 readStrict trailing delimiters). |
| +First give one line per round 1 P1/P2: resolved, partly, or not. Carry any |
| +unresolved finding forward at its severity, then add new findings. The |
| +verdict covers everything outstanding. |