Region HA P1b-2: whole-branch review brief, round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md+30 −0
CI failed — run details
Intent
<task-notification> <task-id>a1fafc0d13e70dc72</task-id> <tool-use-id>toolu_01LvqjpxUsHMazWnc87F9ZoG</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/953e7524-2e06-4308-b9ce-fd1b38579971/tasks/a1fafc0d13e70dc72.output</output-file> <status>completed</status> <summary>Agent "Implement Task 4: wiring check" 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 Commits: 0e2cb7e5 "region-ha p1b-2: wiring check" Test: `TestAgentActivatorForwards` in `internal/host/haforward_wiring_test.go` passes. `RunAgent` can't be called from a test, so the agent's half is a check on `agent.go` for the `act = svc` wiring. The Service half builds a `Service` over `SplitBackend{ExecBackend, UnitBackend}`. It satisfies `edge.HAForwarder`, and a non-HA route forwards nowhere. A nil `edge.Activator` yields no forwarder. Changing `act = svc` to `act = nil` in `agent.go` made it fail; I restored it by hand. Builds: linux, darwin and windows `go build ./...` all OK, `go vet ./internal/host` clean. Binary: 53,674,146 bytes (limit 64,000,000). Concerns: The test doesn't show an HA route naming a holder through the `SplitBackend`, which needs a lock read. The previous commit's tests in `internal/activator/haforward_test.go` cover that. The sandbox made the Go build cache read-only, so the builds ran with the sandbox disabled. The test ran inside the sandbox. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/.superpowers/sdd/2026-10-29-region-ha-p1b2-forwarding/task-4-report.md. It is untracked, so it is not in the commit.</result> <usage><subagent_tokens>62980</subagent_tokens><tool_uses>18</tool_uses><duration_ms>196725</duration_ms></usage> </task-notification>
Attributed to this commit: 34.1 g CO₂e (4,464,158 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-p1b2-forwarding, 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/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md b/docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md| new file mode 100644 |
| index 000000000..f9684ed52 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md |
| @@ -0,0 +1,30 @@ |
| +# Review brief: Region HA P1b-2 branch (forwarding between boxes), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `region-ha-p1b2-forwarding`, commit 0e2cb7e5a7a172a7ebdce725aba2de479306aa48. Under review: the code diff |
| +c01c4d4e..0e2cb7e5 (c01c4d4e is plan rev 4 on main 1fa2a99b), packaged in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/.superpowers/sdd/2026-10-29-region-ha-p1b2-forwarding/review-c01c4d4e..0e2cb7e5.diff` (read it first). |
| +Authorities: `docs/superpowers/plans/2026-10-29-region-ha-p1b2-forwarding.md` (rev 4; its review closed at round 3 with Paul's rulings |
| +N-HA8 and N-HA10), the spec `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md` (§6, §4.3), and P1a/P1b-1 on main. |
| +The SDD ledger with every task review and the deferred minors: `.superpowers/sdd/2026-10-29-region-ha-p1b2-forwarding/progress.md`. Tasks 2 and 3 had their own Astra reviews; Tasks 1 |
| +and 4 had none (AGENTS.md rule 3): review them in full. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- N-HA10: forward at the front door, before every per-request step. The plan's Scope table (§6.3 placement, §6.5 retry, roles and the latch |
| + are later slices; regional names refused). The census is a later step. |
| + |
| +## What to check |
| + |
| +1. Single writer and loops across the whole branch: can any path wake a host on a box that should not, forward a hop, or loop? |
| +2. The front-door placement: nothing per-request runs on the forwarding box (gate, assets, guards, records, rate limits, usage, analytics). |
| +3. Production wiring end to end: agent -> edge type assertion -> Service.ForwardTarget through SplitBackend -> holder cache -> lease read; |
| + and the holder's answers. A review already caught one production-only gap (SplitBackend); look for any other. |
| +4. The holder cache: bounds, TTLs, single-flight, every set/drop rule; can a stale entry black-hole a host? |
| +5. The deferred minor in the ledger (a dead holder with an unexpired lease costs one GET plus a 2 s dial per request): must it be fixed |
| + before merge? |
| +6. Tests: do they prove the claims, and would they fail without the change? |
| + |
| +## Severity, output |
| + |
| +P1 (unsafe, does not work, a test fails), P2 (wrong or missing; fixed without another round), P3 (follow-up). Each with file:line, failure |
| +scenario, fix and fault family. End with exactly one verdict: READY, READY AFTER FIXES, or NOT READY. Do not edit files, spawn subagents of |
| +your own, or run full suites. |