carlos / platform Public

region HA: G3 fixes (steering, departures, edges readers, alerts topic)

Fixes from the first US HA window (2026-11-07), plus Paul's step-back items:
- steering never targets pool-only boxes; one target per name and AWS region;
  a refused chunk is bisected and the rest applied
- departures finalize under record churn and lease waits; members retire in
  minutes via a gated lock listing; late edges publications rebind safely
- pooled apps auto-create in their HA region; startup record view retries
- every control/edges reader audited (spec 24); console DNS advice, size door
  and status-row readers are member-aware
- region-host takes an existing alerts topic (alerts_topic_arn)
- flagship-shaped replay test; flaky console perf budget fixed

Reviews: Opus task reviews, Fable whole-branch R1/R3, census approved (#280).
Follow-ups: docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md

Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from region-ha-g3-fixes into main.
claude agent, operated by paul@keymail.dev ca027e8554e50a7c122a9ed2384d1081765dc9eb parent d675f24
62 files changed, +6,424 −274
  • docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md +34 −0
  • docs/superpowers/notes/census-proposal-region-ha-g3-fixes.md +40 −0
  • docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md +264 −0
  • docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md +110 −0
  • infra/modules/README.md +2 −1
  • infra/modules/region-host/README.md +24 −0
  • infra/modules/region-host/alert_publish.tf +5 −2
  • infra/modules/region-host/group_alarms.tf +5 −5
  • infra/modules/region-host/main.tf +9 −9
  • infra/modules/region-host/outputs.tf +2 −2
  • infra/modules/region-host/tests/alerts_topic.tftest.hcl +569 −0
  • infra/modules/region-host/variables.tf +19 −1
  • internal/console/alertsignals.go +9 −7
  • internal/console/apiinstances.go +4 −4
  • internal/console/apiinstances_test.go +35 −0
  • internal/console/apiplacements.go +3 −1
  • internal/console/apisystemgeoip.go +3 −0
  • internal/console/apisystemupdate.go +7 −0
  • internal/console/edgesdns.go +18 −0
  • internal/console/edgesreaders_g3_test.go +270 −0
  • internal/console/g3_replay_test.go +232 −0
  • internal/console/hacreate_test.go +17 −0
  • internal/console/layoutguard.go +2 −2
  • internal/console/perfwrites_test.go +16 −12
  • internal/console/policysize.go +61 −17
  • internal/console/policysize_test.go +9 −9
  • internal/console/regiondefault.go +3 −3
  • internal/console/regiondefault_test.go +33 −0
  • internal/console/seedmove.go +5 −0
  • internal/console/server.go +23 −12
  • internal/console/statusrows.go +67 −0
  • internal/console/statusrows_g3_test.go +198 −0
  • internal/edge/g3_replay_test.go +150 −0
  • internal/host/aliasesread_e2e_test.go +2 −2
  • internal/host/edgesfile_group_guard_test.go +66 −0
  • internal/host/g3_replay_test.go +396 −0
  • internal/host/group_departure_test.go +5 −0
  • internal/host/hadepartures.go +2 −0
  • internal/host/hadepartures_fix_test.go +4 −0
  • internal/host/hadepartures_g3_test.go +800 −0
  • internal/host/hadepartures_listing_test.go +429 −0
  • internal/host/hadepartures_retained_test.go +5 −1
  • internal/host/hadepartures_scan.go +218 −59
  • internal/host/hadepartures_scan_test.go +39 −24
  • internal/host/haingress.go +30 −3
  • internal/host/haingress_g3_test.go +275 −0
  • internal/host/steering_g3_test.go +297 −0
  • internal/host/steering_loop.go +20 −5
  • internal/host/testdata/g3-replay.json +707 −0
  • internal/lease/ha.go +22 −2
  • internal/lease/ha_list_test.go +55 −0
  • internal/lease/locktest/fixture.go +23 −4
  • internal/provision/plan9_b8_census_test.go +1 −2
  • internal/provision/recordview.go +21 −3
  • internal/provision/recordview_g3_test.go +125 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-g3-fixes.tsv +37 −0
  • internal/registry/ha_scan.go +9 −0
  • internal/steering/g3_test.go +354 −0
  • internal/steering/route53.go +182 −58
  • internal/steering/route53_test.go +42 −20
  • internal/steering/steering.go +9 −4

CI passed — run details

docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md

Loading diff…

docs/superpowers/notes/census-proposal-region-ha-g3-fixes.md

Loading diff…

docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md

Loading diff…

docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md

Loading diff…

infra/modules/README.md

Loading diff…

infra/modules/region-host/README.md

Loading diff…

infra/modules/region-host/alert_publish.tf

Loading diff…

infra/modules/region-host/group_alarms.tf

Loading diff…

infra/modules/region-host/main.tf

Loading diff…

infra/modules/region-host/outputs.tf

Loading diff…

infra/modules/region-host/tests/alerts_topic.tftest.hcl

Loading diff…

infra/modules/region-host/variables.tf

Loading diff…

internal/console/alertsignals.go

Loading diff…

internal/console/apiinstances.go

Loading diff…

internal/console/apiinstances_test.go

Loading diff…

internal/console/apiplacements.go

Loading diff…

internal/console/apisystemgeoip.go

Loading diff…

internal/console/apisystemupdate.go

Loading diff…

internal/console/edgesdns.go

Loading diff…

internal/console/edgesreaders_g3_test.go

Loading diff…

internal/console/g3_replay_test.go

Loading diff…

internal/console/hacreate_test.go

Loading diff…

internal/console/layoutguard.go

Loading diff…

internal/console/perfwrites_test.go

Loading diff…

internal/console/policysize.go

Loading diff…

internal/console/policysize_test.go

Loading diff…

internal/console/regiondefault.go

Loading diff…

internal/console/regiondefault_test.go

Loading diff…

internal/console/seedmove.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/statusrows.go

Loading diff…

internal/console/statusrows_g3_test.go

Loading diff…

internal/edge/g3_replay_test.go

Loading diff…

internal/host/aliasesread_e2e_test.go

Loading diff…

internal/host/edgesfile_group_guard_test.go

Loading diff…

internal/host/g3_replay_test.go

Loading diff…

internal/host/group_departure_test.go

Loading diff…

internal/host/hadepartures.go

Loading diff…

internal/host/hadepartures_fix_test.go

Loading diff…

internal/host/hadepartures_g3_test.go

Loading diff…

internal/host/hadepartures_listing_test.go

Loading diff…

internal/host/hadepartures_retained_test.go

Loading diff…

internal/host/hadepartures_scan.go

Loading diff…

internal/host/hadepartures_scan_test.go

Loading diff…

internal/host/haingress.go

Loading diff…

internal/host/haingress_g3_test.go

Loading diff…

internal/host/steering_g3_test.go

Loading diff…

internal/host/steering_loop.go

Loading diff…

internal/host/testdata/g3-replay.json

Loading diff…

internal/lease/ha.go

Loading diff…

internal/lease/ha_list_test.go

Loading diff…

internal/lease/locktest/fixture.go

Loading diff…

internal/provision/plan9_b8_census_test.go

Loading diff…

internal/provision/recordview.go

Loading diff…

internal/provision/recordview_g3_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-chain.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-region-ha-g3-fixes.tsv

Loading diff…

internal/registry/ha_scan.go

Loading diff…

internal/steering/g3_test.go

Loading diff…

internal/steering/route53.go

Loading diff…

internal/steering/route53_test.go

Loading diff…

internal/steering/steering.go

Loading diff…