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
armHADeparturesandController.stepand 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 publishesserves_shared_pool:false. The flagship console has noCONSOLE_REGION_INGRESS. - The instance size check now looks at pools. - A retired member's leftoverstatus/boxesrow no longer pagesbox_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-hostgainsalerts_topic_arn, an existing topic for every alarm, rule and publish grant. The module then creates no topic or subscription. Setting it together withalerts_emailis 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.
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- paul@keymail.dev pushed 559c61784 Merge origin/main into region-ha-g3-fixes
- paul@keymail.dev pushed 6f2448ab1 Merge origin/main into region-ha-g3-fixes
- paul@keymail.dev pushed 417154beb Merge origin/main into region-ha-g3-fixes
- paul@keymail.dev pushed 459b21409 notes: G3 fixes follow-up list
- paul@keymail.dev pushed ecd402317 provision: refresh the G3 census proposal
- paul@keymail.dev pushed 1f7a5740a infra: document the existing alert topic input
- paul@keymail.dev pushed 1aed0fce8 console: retain fixed DNS addresses and ignore proven retired status rows
- paul@keymail.dev pushed 2da580882 host: replay flagship edges readers under member churn
- paul@keymail.dev pushed 347e60939 console: exclude group edges from DNS and unrelated size limits
- paul@keymail.dev pushed 2a7ed4d09 host: gate departure listings on the configured lock prefix
- paul@keymail.dev pushed 43d4d033e console: allow scheduling headroom in write performance tests
- paul@keymail.dev pushed ef1e64495 host: retire HA members promptly with sparse lock scans
- paul@keymail.dev pushed 3a5b73e4d region-host: Accept an existing alerts topic
- paul@keymail.dev pushed e59db8b05 plan: G3 fixes task 9 (region-host takes an existing alerts topic)
- paul@keymail.dev pushed 422d2e880 plan: G3 fixes additions (edges readers, fast retire, replay, flake)
- paul@keymail.dev pushed 82b30f051 provision: refresh the G3 census proposal
- paul@keymail.dev pushed d3166f0b0 host: drop missing-record lock checks that could stall departures
- paul@keymail.dev pushed ba4f795af provision: record the G3 census proposal
- paul@keymail.dev pushed b5986773f host: allow scheduling slack in the startup budget test
- paul@keymail.dev pushed c9ef61cc7 steering: summarize duplicate region target drops per pass
- paul@keymail.dev pushed afff5794a host: retain pending departure duties across missing records
- paul@keymail.dev pushed f81cfd5cf host: finalize HA departures despite lease waits and inventory churn
- paul@keymail.dev pushed a9a3e4e94 host: retry transient HA ingress reads within bounded startup attempts
- paul@keymail.dev pushed 6fe676da1 steering: keep DNS replacements atomic and preserve per-name targets
- paul@keymail.dev pushed 460efd83d console: honor HA pool membership when defaulting instance regions
- paul@keymail.dev pushed c1aed6d9b steering: exclude pool-only boxes and isolate invalid DNS changes
- paul@keymail.dev pushed eb3b88a25 plan: region HA G3 fixes (steering, departures, pooled region, startup)