carlos / platform Public

region-ha-p1b3-placement

Region HA P1b-3a: cold-wake placement (plan docs/superpowers/plans/2026-11-01-region-ha-p1b3-placement.md rev 3; spec region-ha-without-claims §6.3, §11).

What changes: a request for an asleep born-HA host that reaches the other box can now wake the host on the chosen box, through the existing signed forward, with one writer and one owner of request accounting.

  • Boxes publish live awake app counts in headroom (additive apps field, rides the timed publication, zero new S3).
  • The edge projects a wake snapshot from the cached fold (same region/store/key, fresh generation, primary host membership, mirrored signing key for peers; self adopts via its local route).
  • One pure rule, activator.DecidePlacement, decides Base / Recovery / Place / Refuse: switch off, missing evidence, self-owned or unknown locks all keep main's local HA acquire; expired peers get a Recovery hint only while in view; free hosts prefer an eligible clean releaser, else the roomiest box (ChooseRoomiest). Only AcquireHA authorizes a writer.
  • N-HA12: a target that has not woken the host is excluded for 10 s, in one per-box suspect list (placementPeers); only success or a holder-naming answer clears it; visitor-cancelled forwards are ignored (ruling R7).
  • Front door (N-HA10): a placement peer lost after projection answers 503 Retry-After 10 with no ingress accounting; hops never re-choose.
  • Operator page when no box has headroom (warning, once/region/hour/process).
  • Copy (Luna pass, approved by delegation): C1 "This instance cannot wake right now. Please try again shortly." C2 "Region %s needs more capacity" / "Region %s is short on spare capacity. Instance %s is waking on %s. Add capacity to the region."

Testing: unit and targeted tests per task; regionha simulation with 27 mutations, each caught (placement-refusal-clears-suspect by I5 alone); production witnesses in child processes; 10 root witnesses (nested launch, sealed wake, competing views, expired-owner recovery, switch off, dead/unusable choice, new host before fold, request budget) PASS on the designated root runner, run 20261101T203709-7b77cf. CI green at 62fc43f7.

Review: Astra implemented; Opus per-task reviews on Tasks 2-4 (Task 3 and 4 one fix round each), whole-branch review READY AFTER FIXES (one P2, fixed in 3e08575b, confirmed). Census: Astra APPROVED at 62fc43f7 (#280). Follow-ups: docs/superpowers/notes/region-ha-p1b3a-followups.md, plus: a cancelled only-request to a dead peer leaves its dial failure unrecorded (one extra dial per window).

Not done here: release, dev drill (Task 5A on sophie/leo, needs Paul's go), P1b-3b.

Human

Region HA P1b-3a: cold-wake placement. When no box holds a born-HA host's lease, exactly one box wakes it, and the others forward to it over P1b-2's front-door hop. The waking box is the clean releaser if eligible, otherwise ChooseRoomiest, with app spread from headroom.apps. Outside one applicability rule a box behaves exactly as main does: switch off, expired owner (Recovery hop to the owner), self adoption, missing view. N-HA12 adds that a placement target that hasn't woken the host is excluded for 10 s. Plan rev 3 is final (Opus R1 NOT READY, R2 READY AFTER FIXES, review closed). Next: build subagent-driven, with Astra implementing and Opus reviewing, then the Task 5A dev drill on sophie and leo (pool hapair). P1b-3b (duties and departed-box scan, N-HA11 SQS consumer) is outlined only and gets its own plan after 3a merges.

Commits 23
Discussions 0 0 open
Tasks 9/9 done

Discussions

  • No discussions on this branch yet.

Tasks 9/9 done

  • Task 1: publish awake app counts, pure cold-wake choice Done
  • Task 2: project wake snapshot from cached fold (Opus review) Done
  • Copy: Luna pass on HA3-C1 and HA3-C2 subject/body Done
  • Task 3: one applicability rule at the front door (Opus review) Done
  • Task 4: production witnesses, simulation, landing gate (Opus review; fix round 1) Done

Activity