carlos / platform Public

Regional domains (#447): Astra review brief for spec rev 2, round 2 of 3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 9a49716cb29483561243cf2870629d221a51ee8c parent be2faed
1 file changed, +135 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-regional-domains-447-R2.md +135 −0

CI passed — run details

diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-regional-domains-447-R2.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-regional-domains-447-R2.md
new file mode 100644
index 000000000..f9a6a82b7
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-regional-domains-447-R2.md
@@ -0,0 +1,135 @@
+# Review brief: regional custom-domain placements (#447) spec rev 2, round 2 of 3
+
+Repo carlos/platform, branch `regional-domains-447`, commit be2faede (the spec);
+this brief is committed on top of it.
+Under review: `docs/superpowers/specs/2026-10-28-regional-domains-447-design.md`.
+Authorities: the code on this branch, which is main 803c6800 plus documents only.
+No runtime code has changed yet. Do not review against unmerged branches (in
+particular not `custom-domain-placements-447`); if this work needs one, say so
+as a P1 and stop.
+
+You are an independent reviewer. Read the document, then the code it names,
+and check every claim against that code. Read AGENTS.md "Stopping rules" first:
+they bind you.
+
+## Fixed: do not re-argue
+
+Paul's rulings (2026-10-28, recorded on amadan discussion #447, latest comment,
+and in spec §2). Report only mechanisms that fail to honour them.
+
+1. The stable per-region address is each box's EIP as published in its edges
+ file (`internal/edgesfile` `EIP`, from `aws_eip.host` in
+ `infra/modules/region-host/main.tf`), the same addresses the platform's own
+ latency DNS uses. The placements GET reports, per region, the EIPs of the
+ boxes that actually serve the bound target.
+2. Old binaries are kept out by a release floor modelled on the rootfs floor
+ (`internal/console/rootfsfloor.go`, `rootfsReadyRefusal` in
+ `internal/console/rootfs.go`): while any regional claim exists, a system
+ channel at or above the floor never moves below it without an explicit
+ override; enabling regional mode refuses unless every fresh edge box
+ (complete evidence) is at or above the floor. The version is assigned at
+ the end of the build.
+3. Scope is the platform capability only. The #447 consumer's migration (its
+ relay to socket instances, lifting ruling H24 for it, its DNS) is a later,
+ separate go and is not in this branch. Do not raise its absence.
+
+Also fixed, by the controller's brief: simplification is wanted. A cut the
+spec lists in §4 is not a finding unless the core invariant or a security
+boundary needs what was cut; then say which and why (file:line).
+
+## 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 (spec §1).
+
+## What to check
+
+1. **The one gate.** Is `Edge.regionalGate`, placed after
+ `lookupUpstreamPath` in `internal/edge/edge.go` `ServeHTTP`, really ahead of
+ every arm that can send a request for a regional name off the box (exact
+ home backhaul, far asset catch, door `Owner` dial, `serveAssetFar`,
+ `e.backhaul`)? Are there other serving entry points (inbound hop handler,
+ WebSocket/upgrade, door callers, TLS/SNI paths, ACME HTTP-01, the asset
+ cache, instance catch-all, wake) that reach a dial or backhaul without
+ passing it? Is the star-match no-op (`!servesExactly(host)` with
+ `ExactHome` naming another box) safe, given §7.1's claim that a regional
+ name is never published?
+2. **Never published.** Verify §7.1: no reader other than the edges-file
+ writer can put a regional apex or `*.<apex>` into any box's edges file or
+ home map (DNS readings, cert warm, steering, served-by joins, asset
+ publication, instance catch-all, `catchallServed`, wildcard role). Check
+ the derivation in §7.2 really keeps regional claims out of
+ `route_aliases`/`route_paths`.
+3. **Schema 2 and old readers.** Do all claim readers on main
+ (`claims.go:449,705` and the rest) skip a schema-2 body as the spec says,
+ on every binary that could be running (box agent, edge, console)? When a
+ claim converts from single to regional (§7.5), can a box running the old
+ binary keep a stale `route_aliases` row and serve or publish the name as an
+ ordinary alias, and does the floor plus schema 2 actually close that?
+4. **The floor (ruling 2).** Does §10 mirror the rootfs floor faithfully
+ (promotion gate on every door the rootfs floor sits on, the judged-pointer
+ ETag binding, override as part of the request, activation barrier over
+ complete fresh evidence)? Is "a regional claim exists" judged safely
+ (listing errors, unread claims)? Is §10.4's argument that every escape
+ fails closed correct?
+5. **Addresses (ruling 1).** Does §8's join (`edgesfile.ReadSnapshot`,
+ `status.LoadBoxesComplete`, `JoinLive`) report only boxes that actually
+ serve the bound target, from fields that exist?
+6. **Authority.** PUT door (§6.2): person-only, neutral refusals for unknown
+ versus foreign targets, tenancy of every target, region match, collision
+ with real routes, CAS. Team scope (§6.4). Other writers (§6.3): attach,
+ paths, capabilities, detach, proof renewal, ownership transfer. Can any
+ path bind another tenant's instance, or keep a foreign owner's bindings?
+7. **TLS (§9).** Apex certificate on a box holding only a deny entry; the
+ housekeeper's warm; the catch-all through the existing delegated wildcard.
+ Does any new entry let an arbitrary SNI drive an order?
+8. **Request budget (§11).** Verify there is no new per-box polling and that
+ the per-PUT/GET/update costs are as stated.
+9. **Witnesses (§13).** Can W1 actually detect a removed gate (its legs c and
+ d), through production wiring? Is anything the invariant depends on left
+ without a witness?
+10. **Build order (§15).** Is each step buildable on the previous ones, and
+ does step 1 change something observable?
+
+## Round 2
+
+Earlier rounds: round 1 is the independent Opus read of rev 1,
+`docs/superpowers/reviews/OPUS-REVIEW-regional-domains-447-R1.md` (NOT READY,
+2 P1, 7 P2, 8 P3). Rev 1 itself is at
+`docs/superpowers/reviews/custom-domain-placements-447-rev1.md`. The round
+number counts every earlier review of this design, under any file name or
+reviewer.
+
+First give one line per P1 and P2 from round 1: resolved, partly, or not.
+Carry every unresolved or partly resolved finding forward at its current
+severity, then add new findings. The verdict covers everything outstanding,
+earlier rounds included.
+
+## 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 section, the problem, the evidence
+(file:line, verified), the failure scenario, a concrete fix and the invariant
+or trust boundary it breaks (that is 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.