Regional domains (#447): Astra brief Tasks 4+5 round 1 (edge routing; stands in for the ruling-6 design re-check)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+120
−0
docs/superpowers/reviews/regional-domains-447/CODEX-REVIEW-BRIEF-T4T5-R1.md+120 −0
diff --git a/docs/superpowers/reviews/regional-domains-447/CODEX-REVIEW-BRIEF-T4T5-R1.md b/docs/superpowers/reviews/regional-domains-447/CODEX-REVIEW-BRIEF-T4T5-R1.md| new file mode 100644 |
| index 000000000..d1010b9e9 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/regional-domains-447/CODEX-REVIEW-BRIEF-T4T5-R1.md |
| @@ -0,0 +1,120 @@ |
| +# Review brief: regional domains (#447) Tasks 4+5 (derivation and the edge's routing decision), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `regional-domains-447`, commit: this brief's commit. |
| +Under review: |
| +- Task 4, commit 8c5a83ec (diff `f2f9b28c..8c5a83ec`): `release.RegionalTarget`, the |
| + `regional_domains` registry table, the box-side derivation in |
| + `internal/domains/aliases.go`, the heartbeat's `aliases_read`, and W1's |
| + per-box edges-file goldens with W2. |
| +- Task 5, commit d9a0fe61 (diff `7fc98ba1..d9a0fe61`; 7fc98ba1 is a merge of |
| + origin/main, review only d9a0fe61's own changes): edge regional entries, |
| + `regionalGate`, W1 `TestRegionalNameNeverLeavesItsRegion`, W9, W10. |
| +- **The design re-check (Paul, ruling 6):** this review stands in for a design |
| + round on two spec rev 5 changes, diff `9d6424e4..75b6bf83` of |
| + `docs/superpowers/specs/2026-10-28-regional-domains-447-design.md`: |
| + 1. **Ruling 6:** a regional claim's wildcard and catch-all capabilities are |
| + fixed when it is created; the capability door (and |
| + `domains.SetClaimCapabilities`) refuses changes to them; changing them |
| + means detach and recreate. Consequence: `*.X` is derived from the claim's |
| + first derivation, like the apex, so round 4's P1 (a catch-all switched on |
| + later leaving a box without the `*.X` row while a root hand route holds |
| + `*.X`) cannot arise. Task 2 implemented the writer refusal (already |
| + reviewed); check the derivation and the edge honour the consequence. |
| + 2. **The R4 P2 fix:** the placements PUT refuses while |
| + `PendingForHost(host, "")` is nonzero, under the host lock (spec §6.2; |
| + built later in Task 7). Check the design text only: is it sufficient |
| + against round 4's P2 (`docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R4.md`)? |
| + 3. **The residual to judge:** detach and recreate with different |
| + capabilities, on a box whose claim reads keep failing, leaves the old apex |
| + row but no `*.X` row (spec §10.5's never-read-the-claim class). Does it |
| + belong in that class, given ruling 5(b)'s Reload deny over a real route at |
| + its own key? Say so with evidence either way. |
| + |
| +Authorities: the spec rev 5 (§1, §2 rulings 1-6, §7.1-§7.5, §9, §10.5, §13 W1, |
| +W2, W3, W9, W10, W13); the task text in |
| +`docs/superpowers/plans/2026-10-28-regional-domains-447.md` (Tasks 4, 5) as |
| +amended by the controller rulings in |
| +`.superpowers/sdd/2026-10-28-regional-domains-447/progress.md`. Reports: |
| +`.superpowers/sdd/2026-10-28-regional-domains-447/task-4-report.md`, |
| +`task-5-report.md` (Task 5's records the mutation checks). Earlier design |
| +rounds: `docs/superpowers/reviews/OPUS-REVIEW-regional-domains-447-R1.md`, |
| +`docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R2.md`, `-R3.md`, |
| +`-R4.md`. |
| + |
| +You are an independent reviewer. This change decides the edge's routing and |
| +backhaul for regional names, touches certificate admission, and changes what |
| +root's box agent derives, so it gets its own review. Read AGENTS.md "Stopping |
| +rules" first; they bind you. |
| + |
| +## The core invariant |
| + |
| +A regional name is never served from, or backhauled to, another region, |
| +including after a restart, an unreadable claim, or a rollback, within §10.5's |
| +stated limit (accepted by Paul; do not raise the limit itself). |
| + |
| +## Fixed: do not re-argue |
| + |
| +Paul's rulings 1-6 (spec §2). Census tests red until Task 13: not a finding. |
| +The PUT door, floor and readiness are later tasks: do not raise their absence. |
| + |
| +## What to check |
| + |
| +1. `regionalGate`: is it ahead of every arm that can send a regional name off |
| + the box (exact-home backhaul, far asset catch, door `Owner` dial, |
| + `serveAssetFar`, `e.backhaul`), for every entry point (inbound hop, |
| + upgrades/WebSocket, door callers, login re-resolution, the asset cache, |
| + wake)? Is the star exemption (another box's exact name under a regional |
| + star) safe, and is the second refusal point after the exact-home arm right? |
| +2. Reload: regional entries carry no path map; `lookupUpstreamPath` returns |
| + early for them; the deny over a real route at the same key (ruling 5(b)) |
| + for the apex and the star; `release.RegionalTarget` applied to the same |
| + routes slice Reload builds from; any failure gives deny. Any way a |
| + replaced, foreign-owned, tunnel-backed, fleet-placed, replica or |
| + other-region target is served? |
| +3. Derivation (Task 4): rows for every regional claim on every box; a target |
| + only where `RegionalTarget` holds; unread-claim rows kept (including the |
| + not-found case Task 4 chose) and the pass marked incomplete; regional |
| + claims never reach `route_aliases`/`route_paths`; `wildcard_domains` only |
| + where a target exists (and the effect on the `*.X` certificate when a |
| + claim is unread for a pass). `aliases_read` set only on a successful read. |
| +4. Publication (W2): the apex never published; the star never as `home`; the |
| + cert-only `wildcard` entry present. |
| +5. Certificates (§9, W9): the apex admitted on a box with only a deny entry; |
| + `*.X` keys and invented one-label names drive no orders. |
| +6. Witnesses: does W1 go through production wiring, and do the recorded |
| + mutation checks prove each guard? Anything the invariant depends on that |
| + has no witness? |
| +7. Ruling 6, the R4 P2 fix and the residual, as above. |
| + |
| +## 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 location, the problem, the |
| +evidence (file:line, verified), the failure scenario, a concrete fix and the |
| +invariant or trust boundary it breaks (its fault family; say explicitly when |
| +a finding is in the "covering routes" family, the one rounds R2-R4 carried). |
| +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. Also say whether they share one |
| + cause, and whether refusing the case up front or cutting a feature (name |
| + it) would remove them. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your |
| +own. Do not run the full test suites (targeted `go test -run` is fine; leave |
| +GOCACHE unset). |