carlos / platform Public

durability 3a: whole-branch review brief, round 3 (final)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 55e6a56bc6f5f6bcebaa58b6dd0596ee354156c8 parent 9d7ad2c
1 file changed, +133 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.md +133 −0

CI passed — run details

Intent

Human

<task-notification> <task-id>bux42cn6l</task-id> <tool-use-id>toolu_01Qqb37VdZehi4Etd6VufBso</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/aab63774-dfe6-44a4-9cd9-230e6f4c3d13/tasks/bux42cn6l.output</output-file> <status>completed</status> <summary>Background command "Run fix round 2b on Astra" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 15.7 g CO₂e (1,967,555 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on durability-3a-escrow, 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/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.md
new file mode 100644
index 000000000..92cd37b17
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.md
@@ -0,0 +1,133 @@
+# Review brief: durability plan 3a, whole branch, round 3 of 3 (FINAL)
+
+Repo carlos/platform, branch `durability-3a-escrow`. Read the commit
+named in your prompt.
+Under review: the diff `origin/main...durability-3a-escrow`, the
+branch's changes against main. It includes a merge of main at 2878ac69.
+Authorities, merged on main:
+- `docs/superpowers/specs/2026-10-23-durability-design.md`. The branch
+ takes it to rev 4.3.
+- `docs/superpowers/plans/2026-10-30-durability-step3-escrow-fence-restore.md`,
+ rev 3.1, written on this branch from the merged spec.
+- Region HA: `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md`.
+
+You are an independent reviewer. Read the plan, then the diff, and
+check every claim against the code. The branch description on amadan
+summarises the change.
+
+## Fixed: do not re-argue
+
+- Paul's rulings of 2026-10-31, at the top of the plan:
+ - **Rollback:** no latch or floor. The step 7 copier is the one place
+ that refuses raw secret items. A rolled-back box is reported by the
+ detector.
+ - **Fleet key:** one account lock covers create, lifetime recovery
+ and key replacement, plus the membership refusal.
+- The controller rulings in
+ `.superpowers/sdd/2026-10-30-durability-step3-escrow-fence-restore/progress.md`
+ (the "Ruling" lines), including the 2026-11-01 ruling that a box key
+ changed outside the console fails closed and does not reseal.
+- The plan's three Astra rounds are closed. The tables at the end of
+ the plan record their dispositions.
+- **3a deletes nothing.** Historical raw objects stay until 3b's
+ operator migration.
+
+## What to check
+
+1. **No raw write.** Can any production path on this branch still put
+ `<host>.env`, `instance.key`, `report.token`, `<host>.config.env` or
+ a sidecar env into a files manifest or the bucket unsealed? Cover HA
+ publication, escrow, relocation, moves, claim seed, and Prepared.
+ Can the publication guard (`internal/layout/pubclass/publication_guard_test.go`)
+ miss such a path?
+2. **Restore and mint.** Can a box mint fresh secrets for a host whose
+ escrow exists, or restore a stale or other-host copy? Cover:
+ - missing key or store;
+ - lease loss mid-publish;
+ - restart, where the ledger is not trusted across processes;
+ - conflict markers;
+ - read failures, which must fail closed.
+3. **Write-once.** Are the platform-minted env variables and the trio
+ write-once against the escrow, and does every divergence refuse,
+ alert and persist the marker?
+4. **Fleet key lock.** Does every instance record creator run under
+ `lockAccount`, with lock order account, then app, then hostname?
+ Does replacement count trashed but unpurged apps? Can it deadlock?
+5. **Cost.** Does the 30 s sweep keep an unchanged host at zero S3
+ requests? Does the merge with main (`2878ac69`) lose or double
+ anything? Check especially `internal/layout/plan.go` /
+ `pubclass/names.go` (RoleTTY) and the census layers.
+6. **Open from per-task reviews:**
+ - Does deleting an instance or purging an app remove or invalidate
+ its `<host>/files/0/` escrow? If not, does a later create on the
+ same hostname under another key fail closed forever?
+ - The CAS-recovery manifest reread failure (`internal/hostfiles/publisher.go`
+ near the reread) may lack `errEscrowUnreadable` and reach the
+ later-launch fallback.
+ - 85 host tests are still skipped whole by `skipParkedSecretFlow`.
+ Does any of them guard live behaviour?
+
+## Round 3 (final)
+
+Earlier rounds, all by Astra and recorded in the ledger directory
+`.superpowers/sdd/2026-10-30-durability-step3-escrow-fence-restore/`:
+
+| Round | Against | Findings | Fixes | Fix report |
+|---|---|---|---|---|
+| 1 | cfe3122c | `branch-review-r1-astra.md` | cb26724c..14455b0d | `task-B1-report.md` |
+| 2 | 369ad61d | `branch-review-r2-astra.md` | d0ca0208, 8167332e, de8a9e41, 9d7ad2cd | `task-B2-report.md` |
+
+**Fixed by Paul's ruling of 2026-11-01 (stopping rule 2): do not
+re-argue.** The hostname-lifetime binding is CUT. Hostname reuse belongs
+to #199. A recreated hostname may inherit its predecessor's escrow
+(same app and key) or refuse after a key change until an operator
+removes its `files/0/manifest.json`. The spec states this limit and its
+recovery, and `TestEscrowHostnameReuseInheritsOrRefusesAfterKeyChange`
+pins it. Report a finding in that family only if it breaks the stated
+limit, for example by restoring across accounts or apps, or by minting
+over a live successor.
+
+First give one line per P1 and P2 from rounds 1 and 2: resolved, partly,
+not, or cut by ruling. Carry every unresolved or partly resolved finding
+forward, then add new ones. Look hardest at:
+- `de8a9e41`: the one write-once gate (`stageEscrowReads`) for HA and
+ non-HA. Is it the only path to StageSealed, and can any HA pass skip
+ it?
+- `9d7ad2cd`: the refresh after an uncertain commit. Does every caller
+ handle the stale publisher, and can a stale publisher still commit?
+
+This is the final round. A NOT READY must also say whether its P1s share
+one cause, and whether refusing the case up front or cutting the feature
+would remove them.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not
+ work. Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review.
+- **P3**: clarity or polish. Goes on a follow-up list.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives:
+- the task or area;
+- the problem;
+- the evidence (file:line, verified);
+- the failure scenario;
+- a concrete fix;
+- the invariant or trust boundary it breaks.
+
+End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without
+ another round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents
+of your own. Do not run the full test suites. Focused `go test -run`
+runs on one package are fine; for internal/activator and internal/host,
+use `TMPDIR=/tmp/g`.