carlos / platform Public

region-ha-g2-fixes

Region HA G2 drill-4 fixes (F-B, F-A, F-D code). Analysis: G2-FINDINGS (agent manager 8a3d302). Plan: docs/superpowers/plans/2026-11-06-region-ha-g2-fixes.md.

F-B, pool tenancy boundary (Critical). One membership rule (PoolEvidence.Serves) enforced at lease acquire, adoption, takeover, wake, local serve, existing awake entries, duties, placement and the peer filter. A box outside a host's pool never acquires, wakes, serves or takes duties for it. It still forwards: an in-memory ingress projection (primaries, aliases, regional names) built from the record scan lets an ineligible box (the US old box in G3) forward pooled hosts with no local row; it is built at agent start, and one tenant's bad object can no longer 503 the region. A box that leaves a pool drops its old rows only after a proven stop and a clean release (own clean marker, successor present, or never held here); rows with duties or special ownership stay fenced and logged. Pending withdrawals back off 5 min on terminal causes. EC2 "still running" now has its own diagnostic (ha_owner_not_terminated). Spec §3, §6.1 and I1 state the pool rule.

F-A, silent hang (High). A lost or relinquished lease answers 503, Retry-After 10, X-Carlos-Holder none at once (direct, forwarded, queued waiters); recovery is demand-driven and needs a fresh acquisition. Each renewal attempt is bounded by min(30 s, TTL/3, SafeUntil). Peers: a client hang-up never confirms a holder; 3 s without response headers triggers one bounded lock re-read per window and never refuses a same-holder unexpired lease or replays a request.

F-D (code). The suspect-holder clock starts at the lease's ExpiresAt; departure page failures log their cause; the region-host module grants sns:Publish on configured alert topics (alert_publish). Live IAM for dev is pinfra PR #72 (not merged, not applied); the US grant is a G3-card item.

Verification. Opus reviews: F-B group (READY at R3), F-A group (READY at R2), whole branch (READY at R2; R3 P2 fixed). Census approved by Opus (cross-model). Production-wired witnesses on throwaway dev runners: TestRootG2PoolIngress PASS (22 cases, guard-removed build fails) and TestRootG2LostLeaseResponses. CI green on the tip.

Out of scope (follow-ups in docs/superpowers/notes/2026-11-06-region-ha-g2-follow-ups.md). F-C write fence, S3 cancel-and-join on stop (G5), F-E harness, T1 terminate drill. No release, apply or drill.

Commits 68
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity