carlos / platform Public

Region HA P1b-3a: place cold wakes on the chosen box

A request for an asleep born-HA host that reaches the other box now wakes
it on the chosen box (eligible clean releaser, else roomiest) through the
existing signed forward. One pure rule (DecidePlacement) keeps main's
local HA acquire whenever evidence is missing, the switch is off or the
lock is owned; only AcquireHA authorizes a writer. Targets that fail to
wake a host are excluded for 10 s (N-HA12, one per-box suspect list).
Boxes publish awake app counts in headroom (additive, no new S3).

Plan rev 3, Opus reviews, census approved by Astra on #280, root
witnesses passed on the designated runner. Follow-ups in
docs/superpowers/notes/region-ha-p1b3a-followups.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Prompts:

  Presumably this ha stuff will also allow us to do zero-downtime platform updates?

  <task-notification>
  <task-id>ad3489321e79458ec</task-id>
  <tool-use-id>toolu_01RAD3zGAWwupJTi8aVP6RC7</tool-use-id>
  <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/aab63774-dfe6-44a4-9cd9-230e6f4c3d13/tasks/ad3489321e79458ec.output</output-file>
  <status>completed</status>
  <summary>Agent "Release agent: cut v0.33.3" finished</summary>
  <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note>
  <result>v0.33.4 published, waiting for GO. I've promoted nothing and touched no box, console, flagship or Tito.
  
  - **Tag:** v0.33.4 (tag object 93ca6264).
  - **Cut from:** 5887f944, which is 3a (44d810d0), the spec note (581e648e) and the rootfs HOME fix. Main CI passed on it at 11:40Z, and main hadn't moved when I tagged.
  - **Release:** [https://github.com/carlosframework/releases/releases/tag/v0.33.4](https://github.com/carlosframework/releases/releases/tag/v0.33.4). It is marked Latest. The signature verifies, `sha256sum -c` passes and the sums match what I built.
  - **Tap:** homebrew-tap PR #80 is merged, and the four hashes match the sums.
  - **apt:** v0.33.4-1 is promoted to `canary/apt`, which is the apt site, not a box channel. The served arm64 deb matches the signed sum (87f33068), and the live Packages file lists 0.33.4.
  - **Notes:** v0.33.3's notes plus the one HOME line, in your wording. Luna reviewed the new line only and approved it with no changes. The deb sentence is unchanged from v0.33.3.
  - **Builds:** the linux-arm64 binary has sha 86b1952b and the console has sha 42905b15.
  - **v0.33.3:** it stays published and is not rolled. The `canary/apt` pointer now reads v0.33.4.
  
  At 13:50Z I resume as follows:
  - Message platform-86 first.
  - Promote canary (sophie) and stable back to back. Dennis then rolls with leo.
  - Check the boxes and roll the dev console.
  - Run the HOME check on box-1, reading only the HOME line of shop's web process, then message platform-cf with the result.
  
  The pre-roll baseline from this morning is in `/home/paulca/.cache/release-v0.33.3/tmp/`, in `pre-dev.txt`, `pre-global.txt` and `sophie-console-pre.txt`. It should be re-read just before the roll.
  
  Log: `/home/paulca/.cache/release-v0.33.4/roll-log.md`.</result>
  <usage><subagent_tokens>131957</subagent_tokens><tool_uses>12</tool_uses><duration_ms>854235</duration_ms></usage>
  </task-notification>

  <task-notification>
  <task-id>b0zfdbhzc</task-id>
  <tool-use-id>toolu_018pA3SgFDn9AeudWZ1bcqhg</tool-use-id>
  <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/aab63774-dfe6-44a4-9cd9-230e6f4c3d13/tasks/b0zfdbhzc.output</output-file>
  <status>completed</status>
  <summary>Background command "Commit R1 findings and have Astra write rev 2" completed (exit code 0)</summary>
  </task-notification>

  … and 7 more, on the branch's Prompts tab.

Squashed from region-ha-p1b3-placement into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 322d24470702b379605d9f93e762623ed2988232 parent f2810fd
48 files changed, +6,964 −154
  • docs/superpowers/notes/census-proposal-region-ha-p1b3a.md +31 −0
  • docs/superpowers/notes/census-region-ha-p1b3a-claims.md +9 −0
  • docs/superpowers/notes/region-ha-p1b3a-followups.md +18 −0
  • docs/superpowers/plans/2026-11-01-region-ha-p1b3-placement.md +364 −0
  • docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R1.md +79 −0
  • docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R2.md +106 −0
  • docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R1.md +124 −0
  • docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R2.md +77 −0
  • internal/activator/activator.go +4 −1
  • internal/activator/awakeapps.go +19 −0
  • internal/activator/awakeapps_test.go +67 −0
  • internal/activator/hacache.go +186 −51
  • internal/activator/haforward.go +65 −26
  • internal/activator/haforward_test.go +17 −17
  • internal/activator/haplacement.go +203 −0
  • internal/activator/haplacement_peers.go +125 −0
  • internal/activator/haplacement_test.go +786 −0
  • internal/activator/hasuspect_test.go +18 −10
  • internal/boxchoice/boxchoice.go +6 −5
  • internal/boxchoice/coldwake.go +37 −0
  • internal/boxchoice/coldwake_test.go +127 −0
  • internal/boxchoice/policy.go +3 −3
  • internal/edge/forwardha.go +43 −7
  • internal/edge/forwardha_test.go +77 −8
  • internal/edge/haplacement_test.go +78 −0
  • internal/edge/homemap.go +12 −1
  • internal/edge/wakeplacement.go +176 −0
  • internal/edge/wakeplacement_test.go +392 −0
  • internal/host/agent.go +1 −0
  • internal/host/edgesfile.go +3 −2
  • internal/host/haawake_source.go +23 −0
  • internal/host/haforward_wiring_test.go +1 −1
  • internal/host/haplacement.go +19 −0
  • internal/host/haplacement_budget_test.go +333 −0
  • internal/host/haplacement_fold_test.go +93 −0
  • internal/host/haplacement_root_linux_test.go +897 −0
  • internal/host/haplacement_scenarios_root_linux_test.go +962 −0
  • internal/host/haplacement_wiring_test.go +451 −0
  • internal/host/headroom.go +1 −0
  • internal/host/headroom_test.go +127 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p1b3a.tsv +19 −0
  • internal/sim/regionha/actions_test.go +245 −0
  • internal/sim/regionha/invariants_test.go +6 −0
  • internal/sim/regionha/rules_test.go +11 −0
  • internal/sim/regionha/sim_test.go +1 −1
  • internal/sim/regionha/witness_test.go +343 −0
  • internal/sim/regionha/world_test.go +178 −21

CI passed — run details

landed from region-ha-p1b3-placement

docs/superpowers/notes/census-proposal-region-ha-p1b3a.md

Loading diff…

docs/superpowers/notes/census-region-ha-p1b3a-claims.md

Loading diff…

docs/superpowers/notes/region-ha-p1b3a-followups.md

Loading diff…

docs/superpowers/plans/2026-11-01-region-ha-p1b3-placement.md

Loading diff…

docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R1.md

Loading diff…

docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R2.md

Loading diff…

docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R1.md

Loading diff…

docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R2.md

Loading diff…

internal/activator/activator.go

Loading diff…

internal/activator/awakeapps.go

Loading diff…

internal/activator/awakeapps_test.go

Loading diff…

internal/activator/hacache.go

Loading diff…

internal/activator/haforward.go

Loading diff…

internal/activator/haforward_test.go

Loading diff…

internal/activator/haplacement.go

Loading diff…

internal/activator/haplacement_peers.go

Loading diff…

internal/activator/haplacement_test.go

Loading diff…

internal/activator/hasuspect_test.go

Loading diff…

internal/boxchoice/boxchoice.go

Loading diff…

internal/boxchoice/coldwake.go

Loading diff…

internal/boxchoice/coldwake_test.go

Loading diff…

internal/boxchoice/policy.go

Loading diff…

internal/edge/forwardha.go

Loading diff…

internal/edge/forwardha_test.go

Loading diff…

internal/edge/haplacement_test.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edge/wakeplacement.go

Loading diff…

internal/edge/wakeplacement_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/edgesfile.go

Loading diff…

internal/host/haawake_source.go

Loading diff…

internal/host/haforward_wiring_test.go

Loading diff…

internal/host/haplacement.go

Loading diff…

internal/host/haplacement_budget_test.go

Loading diff…

internal/host/haplacement_fold_test.go

Loading diff…

internal/host/haplacement_root_linux_test.go

Loading diff…

internal/host/haplacement_scenarios_root_linux_test.go

Loading diff…

internal/host/haplacement_wiring_test.go

Loading diff…

internal/host/headroom.go

Loading diff…

internal/host/headroom_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-chain.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-region-ha-p1b3a.tsv

Loading diff…

internal/sim/regionha/actions_test.go

Loading diff…

internal/sim/regionha/invariants_test.go

Loading diff…

internal/sim/regionha/rules_test.go

Loading diff…

internal/sim/regionha/sim_test.go

Loading diff…

internal/sim/regionha/witness_test.go

Loading diff…

internal/sim/regionha/world_test.go

Loading diff…