carlos / platform Public

Region HA P1b-1: whole-branch review brief, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 23d219c6baf0fde51c47d96ad79b7a78be6c4fe1 parent 7305110
1 file changed, +51 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B1-BRANCH-1.md +51 −0

CI failed — run details

diff --git a/docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B1-BRANCH-1.md b/docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B1-BRANCH-1.md
new file mode 100644
index 000000000..254295bb2
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B1-BRANCH-1.md
@@ -0,0 +1,51 @@
+# Review brief: Region HA P1b-1 branch (takeover of a terminated box's hosts), round 1 of 3
+
+Repo carlos/platform, branch `region-ha-p1b1-takeover`, commit 7305110c6a17ae41f4c3938560e6e5c4009badb0.
+Under review: the diff 42f9f091..7305110c (the code; 42f9f091 is the approved plan rev 3.1 on top of main 81db4870),
+packaged with its commit list and stat in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/.superpowers/sdd/2026-10-27-region-ha-p1b1-takeover/review-42f9f091..7305110c.diff` (read it first).
+Authorities: `docs/superpowers/plans/2026-10-27-region-ha-p1b1-takeover.md` (rev 3.1; its own Astra review closed READY AFTER FIXES at
+round 3), the spec `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md` (rev 6.1 plus this branch's N-HA8/N-HA9 edits), and
+P1a as merged on main (fd93024, 80343a5). Do not review against unmerged branches.
+
+You are an independent reviewer. Read the diff, then the code it calls, and check every claim against that code. Each task with its own
+review (1, 2, 4, 5) passed it; the ledger of those reviews and their deferred minors is
+`.superpowers/sdd/2026-10-27-region-ha-p1b1-takeover/progress.md` (read the "Progress" section). Task 3 had no per-task review (AGENTS.md stopping rule 3): review it in full.
+
+## Fixed: do not re-argue
+
+- Paul's rulings N-HA8 and N-HA9 (the plan's "Rulings"): takeover only of an EXPIRED lock whose owner EC2 confirms terminated, request-driven;
+ same-box recovery unchanged from P1a; storage fencing, the SQS consumer, the scan, forwarding and edges-file deletion are later slices.
+- The census (TestPlan14RootReadCensus currently fails on this branch) is handled by the next step; do not review census rows.
+
+## What to check
+
+1. **Single writer (I1).** Across the whole branch, can any path take or write a host's lock, replica or files that another live process
+ holds? Include the interaction of the new row with P1a's same-box recovery, the legacy path, the obligation retry and releases.
+2. **Termination evidence and the confirmer** as wired in production (`internal/host/agent.go`): identity read at each call, EC2 only
+ through rootaws, the cache and single-flight, the describe budget.
+3. **Task 3, identity.** `readIdentity`, `haSelfRetry` and its start in `RunAgent`, `AcquireHA`'s refusal; can a box be left without a
+ complete identity for its process's life, or can a legacy host be affected?
+4. **The simulation** (`internal/sim/regionha`): does it still model P1a's paths faithfully, and do the new rules test what they claim?
+5. **Deferred minors and parked items** in the ledger: say which must be fixed before merge.
+6. **Binary size:** linux/arm64 `-s -w` measured at 52,887,714 bytes against the 53,000,000 ceiling (`.amadan/ci.d/20-cross@5`). Anything
+ in the diff that pulls more of the SDK than needed?
+
+## 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. (The census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md, "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round.
+
+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 file or task, the problem, the evidence (file:line, verified), the failure scenario, a concrete
+fix and the invariant or trust boundary it breaks (its fault family). 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 or the simulation sweep.