carlos / platform Public

durability 3a: whole-branch review brief, round 1

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

CI passed — run details

Intent

Attributed to this commit: 85.2 g CO₂e (10,213,210 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.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch.md
new file mode 100644
index 000000000..3bf5f504f
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch.md
@@ -0,0 +1,100 @@
+# Review brief: durability plan 3a, whole branch, round 1 of 3
+
+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?
+
+## 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`.