carlos / platform Public

region-ha-g3-fixes

Region HA G3 fixes: the faults the first US HA window on the flagship found (2026-11-07). Paul switched G3 off because of F4.

F4: steering (critical). Group members published serves_shared_pool:false. Steering never read that field, so each member became a us-east-1 latency target beside the fixed box. Route 53 allows one latency RRSet per (name, type, region), and the converge stopped at the first failed 100-change chunk, so all 135 changes failed every 5 minutes.

  • Boxes that don't serve the shared pool are never steering targets.
  • One target per (name, AWS region). The record already live there wins, otherwise the lowest box ref; drops are logged.
  • A failed chunk no longer stops the others. A refused chunk is bisected by name group (a name's delete and upsert stay together), and the other changes are applied.
  • Health-check cleanup works from a fresh zone read and keeps every check a surviving record uses.
  • The Route 53 fakes now refuse a duplicate regional latency set and apply each batch atomically.
  • A production-wired G3 test runs the extracted housekeeper pass (steeringPassFor) against a loopback Route 53 with 135 changes.

Departure never finalized. On the flagship the dead member's edges file was still there an hour after the terminate (adi: scan Version 41, Cursor 32). The scan walks the whole deployment inventory, about 260 records in 9 pages.

  • Any record write anywhere restarted the walk.
  • A dead member's unexpired lease made every later page blocked, with failure backoff and a page.

Now:

  • A per-record visit map with catch-up replaces the restart.
  • Lease waits neither back off nor page, and the next walk starts just after the earliest expiry.
  • A late edges publication by the dead member is read, verified and rebound before the conditional delete, without paging.
  • The journal Cursor is kept at 0, which is safe on rollback.
  • The invariant is stated at the decision point.
  • One seeded simulation (64 seeds) covers churn, waits, takeovers and unbound successors.
  • Production-wired tests run through armHADepartures and Controller.step and fail on cf762224.

F2: pooled apps. carlos deploy auto-create now applies an app's region when the manifest's pool is in that region's ha_pools (a strict test). All other creates are unchanged.

F1: startup. RecordView.Refresh retries failed scopes once within the same call. The startup HA ingress attempt deadline is 5 s + 50 ms per scope, capped at 20 s.

Reviews:

  • Opus task reviews on F4 and the departure fix. F4 had two P2s, both fixed. The departure fix was approved with no P1 or P2.
  • Fable whole-branch review: READY.
  • Fix-wave re-review: one P1 from a hardening item, which was reverted.
  • Census reviewed and approved by Opus (cross-family; the author is Astra).

Added after Paul adopted the step-back plan:

  • T5, readers of edges files. All ~35 readers of control/edges/ were audited, and spec §24 now records each one with its rule and a rule for new readers. Fixes: - Console DNS advice, bought-zone apex and placements never offer a proven member's address. In HA regions they also skip any box that publishes serves_shared_pool:false. The flagship console has no CONSOLE_REGION_INGRESS. - The instance size check now looks at pools. - A retired member's leftover status/boxes row no longer pages box_silent, blocks GeoIP readiness or makes the layout guard refuse. This applies only to a proven member whose edges file is gone.
  • T6, fast retirement. Each walk lists the dead box's data-bucket host directories once, with a "/" delimiter. Records with no directory are covered without a read, and listed hosts get 128 reads per pass. The shortcut is refused unless every key is exactly <root>/<host>. It came in under a rule 2 ruling (8a3d302: gate and fix). Three departures retire in 2m30s with 80 locked hosts under churn.
  • T7, replay. A production-wired replay over a flagship-shaped, anonymised world: 4 fixed boxes, aliases, wildcards, 3 members, one of them terminated. It drives steering, domains, departures, hosts-used and console DNS under churn. Against cf762224 it fails on steering and on departures.
  • T8. The flaky console write-performance budget now has scheduling headroom. Its S3 request counts are still enforced exactly.
  • T9. infra/modules/region-host gains alerts_topic_arn, an existing topic for every alarm, rule and publish grant. The module then creates no topic or subscription. Setting it together with alerts_email is refused.

Reviews: three rounds. R1 (Fable) READY. R2 found a P1 in a hardening change, which was reverted. R3 (Fable) READY AFTER FIXES, and the fixes were applied. T6 had its own review, a P1 handled under rule 2, then a clean re-review. Census approved by Opus (cross-family) on #280.

Follow-ups: docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md. Offline-move compaction race: #659.

Earlier follow-ups (P3, not in this branch):

  • A dead-owned host whose record vanishes and reappears inside one walk's pass-end window drops out of coverage.
  • Bisect pacing against Route 53's 5 rps limit.
  • A transient ReadLock error counts as a blocker.
  • Simulation churn on duty records.
  • Journal size at thousands of records.
  • One extra ListResourceRecordSets per pass.
  • Roll note: reconcileMu can be held up to 20 s per startup attempt.
  • Release note: a pooled HA app whose allow-list excludes its region now gets not-allowed at the door.

Not released, applied or drilled.

Commits 27
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity