carlos / platform Public

regional-domains-447

Regional custom-domain placements (#447). A member can now serve one verified custom domain, and optionally its one-label catch-all, from a different instance of the same app in each region. Each region serves it from its own instance. A request for the name is never served from another region and never sent to one.

What a member gets

  • carlos domains placements --app shop --set ie=shop-ie.example.net --set uk=shop-uk.example.net [--wildcard --catchall] example.com creates a regional domain. The domain must be new: one that has served as an ordinary alias is refused. Its capabilities are fixed when it is created. To change them, detach it and create it again.
  • carlos domains placements --app shop example.com shows, for each region, which instance serves the name, whether it is ready, and the EIPs of the boxes that serve it, to point latency DNS at (ruling 1).
  • GET/PUT /api/cli/apps/{account}/{app}/domains/{host}/placements. The domain list, the per-host GET and the settings page show a regional state that points at the placements view.

How the invariant holds

  • Every box derives a regional_domains row for each regional claim it reads. The apex row and the *.X row are written in one transaction per claim (ruling 7). A row names the box's bound target only when release.RegionalTarget passes: same account and app, the box's region, a local socket-backed instance.
  • The edge's regionalGate runs before every arm that could leave the box. A regional entry carries no path map. A regional row beats a real route at its own key. Any failure of the target recheck gives a deny (503), never a dial.
  • Regional names are never published as dial targets. The schema-2 claim is skipped by old readers.
  • A release floor (release.RegionalDomainsFloor = v0.31.0, modelled on the rootfs floor) keeps old binaries out (ruling 2): - while a regional claim exists, a system channel never moves below it without --allow-below-regional-floor; - the floor judgment and the pointer publication run under one mutex; - the PUT refuses unless every fresh box, and every channel fresh boxes follow, is at or above the floor, with complete aliases_read evidence.
  • Ordinary catch-alls and regional names never overlap. Every catch-all-on write decides under regionalMu on a fresh read and writes against its ETag (ruling 8). Pending allocations and declared instance records block the PUT.

Limits (stated in spec §10.5, accepted by Paul): a box on an old binary, or one that has not successfully derived the claim, falls outside the guarantee until it does. A region-HA pool whose EIP has moved to the load balancer shows no address.

Design and reviews: spec docs/superpowers/specs/2026-10-28-regional-domains-447-design.md (rev 5.3, rulings 1-9), plan docs/superpowers/plans/2026-10-28-regional-domains-447.md.

  • Design rounds: R1 Opus NOT READY; R2, R3 and R4 Astra NOT READY, each followed by a ruling from Paul.
  • Per-task Astra reviews: T2+T3 (R2 READY), T4+T5 (R2 READY AFTER FIXES), T6, T7+T8 (R2 READY AFTER FIXES), T10 (R2 READY AFTER FIXES). Whole branch: Astra R1 READY AFTER FIXES. P2s fixed.
  • Census census-ruling-regional-domains-447 approved by Astra (#280).
  • Copy: Luna, three passes plus a single-row pass for RD-46, applied verbatim. The copy gate is approved_regional_domains_copy_test.go.

Release: the first release cut from a main containing this branch must be v0.31.0, the floor. Not merged, not released.

Human

Regional custom-domain placements (#447): one custom domain served by a different instance per region, never backhauled; release floor v0.31.0. Merge-ready, not merged.

Commits 69
Discussions 0 0 open
Tasks 15/15 done

Discussions

  • No discussions on this branch yet.

Tasks 15/15 done

  • T1 Placements GET and CLI read Done
  • T2 Regional claim shape and domains writer rules Done
  • T3 Console writer rules, team scope, instance-create recheck Done
  • T4 RegionalTarget, regional_domains table, derivation, aliases_read Done
  • T5 Edge regional entries and regionalGate (W1 + mutation) Done

Activity