carlos / platform Public

Region HA two-box model plan: Astra round 5 findings (3 resolved, 1 new P2), unedited

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev b13b66858a1218ff63f1bd5a5601c229f7473591 parent 56ea4a1
1 file changed, +41 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-TWO-BOX-R5.md +41 −0
diff --git a/docs/superpowers/plans/CODEX-PLAN-REGION-HA-TWO-BOX-R5.md b/docs/superpowers/plans/CODEX-PLAN-REGION-HA-TWO-BOX-R5.md
new file mode 100644
index 000000000..611fbc28a
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-PLAN-REGION-HA-TWO-BOX-R5.md
@@ -0,0 +1,41 @@
+Reviewed `56ea4a15`.
+
+| Round 4 finding | Disposition | Assessment |
+|---|---|---|
+| #1: converted moves pin before naming a target | Resolved | Task 5D names missing targets before pin selection on every path and adds the no-eligible-target interleaving. |
+| #2: one-box matrix misses actual `pinning` | Resolved | Phase predicates distinguish `PinFailover`’s `starting` from `pinning`; the matrix exercises both boundaries. |
+| #3: initial failovers bypass start guards | Resolved | Failover starts now check eligibility, admission and the relocation start guard, with tests for closed admission and outstanding `park-replica`. |
+
+1. **P2 — Task 3, Step 1, and Task 5B, Step 1: a pending target fence allows phase work to continue.**
+
+ [`fenceStep`](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-two-box/docs/superpowers/plans/2026-10-07-region-ha-hostlife-two-box.md:7122) returns true only when fencing changes the claim version. When a terminated target has no eligible replacement and its deadline has not passed, `replaceTarget` refuses the CAS. Consequently, [`workerMode`](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-two-box/docs/superpowers/plans/2026-10-07-region-ha-hostlife-two-box.md:2611) continues into `role`.
+
+ For example, terminate an acknowledged target in `starting`, with no spare eligible. The source’s worker can advance to `releasing` while replacement remains blocked. At `pinning`, it can likewise select a pin while the dead target remains named.
+
+ In 1b-next rev 19, `Worker.Step` returns `w.replace(...)` immediately upon finding the target’s fence, **before the phase switch** (lines 6949–6958). That pending fence therefore blocks regional phase transitions even when replacement changes nothing. The model still permits an ordering that production refuses.
+
+ **Fix:** distinguish “relocation fence pending” from “no fence” and block regional phase transitions in the former case. Keep independent participant work schedulable. Add a mutation-sensitive test that terminates an acknowledged target in `starting` and separately in `pinning`, holds replacements ineligible, and asserts no phase advance or pin selection before replacement or the deadline.
+
+The four new Go files reconstructed from their sequential patches passed `gofmt` syntax checks. Compilation, runtime tests and mutations were not independently reproduced in this read-only workspace. No files changed or sweeps ran.
+
+---
+
+**FIRST PROMPT:**
+Review the plan at `56ea4a15` using review brief 5.
+
+**WHAT:**
+Check prior dispositions and report new findings.
+
+**STATUS:**
+All three round 4 findings resolved; one new P2 finding.
+
+**NEEDED:**
+Nothing for this review.
+
+**RECOMMENDED:**
+Correct pending-fence scheduling and add the discriminating test.
+
+**SESSION:**
+Safe to close — no changes or processes left running.
+
+**Verdict: not ready.**
\ No newline at end of file