carlos / platform Public

fix/dr2-departed-member-snapshot

DR-2: retired member's status snapshot refuses non-home creates for 15 min

Symptom (dev rehearsal 2026-11-07, ~/.cache/region-ha-next/dev-rehearsal-log.md): after a group member departs, every automatic create in a non-home region is refused 503 "could not confirm that this app's region uk can take new instances" for up to 15 minutes. carlos deploy's auto-create takes this path. On the flagship every member replacement would refuse new apps' US instances.

Cause: edgesfile.JoinLive ruling (A) reads a fresh status/boxes/<label>.json with no edges file as incomplete evidence. A retired member's snapshot stays fresh for 3 x 5 min after its last write; the fast departure deletes its edges file in about 2 min.

Fix (option b): Controller.complete calls retireStatusSnapshot after the edges phases: for a deterministic account/iid group reference only, one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that revision. Best-effort: a failure is logged and never holds completion, paging or the ack (worst case is the old window). Fixed refs are untouched (their label is reused by the replacement). JoinLive and its rulings are unchanged.

Why not option (a) (JoinLive skips proven-departed members): the only proof the console can read (retiredGroupStatus: verified identity + edges file absent) cannot tell a departed member from a live one whose edges publication has not landed, which is ruling (A)'s exact case. The departure record (box registry) and the termination proof (member data bucket) are not readable by the console.

Not done: alerts/boxes (deleting it would clear a firing alert as gone; its own decision) and metrics/boxes (history, many keys, blocks nothing). Noted in the G3 follow-ups, item 8.

Tests: internal/host/hadepartures_dr2_test.go, through armHADepartures and the real edgesfile.ReadLiveSnapshot: RED before the fix (BoxesComplete false one minute after finalize), GREEN after; refused delete does not block or page; fixed ref keeps its snapshot. Two mutations (drop the group guard, drop the call) each fail a test. No root path, so no root-runner witness.

Census: card docs/superpowers/notes/census-proposal-region-ha-dr2.md (Controller.complete sites + envelope internal/host). Review: Astra, round 1 (in progress).

🤖 Generated with Claude Code

Commits 2
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity