Region HA plan 1a: the foundations for running instances on any box in a region
Spec 1 (box placement, rulings H1-H9) and plan 1a, built task by task with a review after each, a whole-branch review and one fix wave. Everything here is dormant on today's one-box regions: nothing changes which box runs an instance and nothing starts the file publisher. - internal/boxid: a box's AWS-signed identity record, verification, operator bind for legacy labels, embedded regional certificates. - edges file: box_id (the box's label), the region-ha-1 capability, draining, and headroom (only with CARLOS_REGION_HA on). - internal/edge: two boxes claiming one host are settled by installation stamp; equal stamps are reported. Unstamped routing is unchanged. - internal/console: eligible boxes, one at a time, and a choice that spreads an app. - internal/hostfiles: ordered manifest (immutable objects, one CAS manifest), restore that cannot escape its directory and is durable, descriptor-based directory sync, the continuous publisher and inotify watcher, wake state. - internal/registry: ReplaceTimers. internal/termfence: termination evidence. internal/activator: the installation-complete marker and WarmCopyTrusted. - infra: a termination queue per box, box records storage will not let anyone rewrite, root volumes deleted on termination. Not applied. Open: the real-inotify tests and the IMDS signature check need the dev box; check for an existing deployment-bucket policy before applying that module. Plan 1b waits for the host lifecycle claim (#223). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from design-region-ha into main.
docs/superpowers/plans/2026-10-05-region-ha-1a-foundations.md+6741 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-1.md+50 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-2.md+46 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-3.md+41 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-4.md+29 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-5.md+17 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R1.md+41 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R2.md+56 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R3.md+41 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R4.md+20 −0docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R5.md+9 −0docs/superpowers/specs/2026-10-04-region-ha-box-placement-design.md+926 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-1.md+110 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-2.md+75 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-3.md+50 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-4.md+39 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-5.md+21 −0docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-6.md+14 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-1.md+53 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-2.md+63 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-3.md+65 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-4.md+65 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-5.md+62 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-6.md+61 −0infra/modules/deployment-buckets/main.tf+53 −0infra/modules/deployment-buckets/variables.tf+6 −0infra/modules/region-host/README.md+24 −0infra/modules/region-host/main.tf+77 −0infra/modules/region-host/outputs.tf+5 −0infra/modules/region-host/tests/store_scanning.tftest.hcl+7 −0internal/activator/installed.go+122 −0internal/activator/installed_test.go+106 −0internal/boxid/boxid_test.go+213 −0internal/boxid/certs.go+43 −0internal/boxid/certs/README.md+7 −0internal/boxid/certs/ap-southeast-2.pem+19 −0internal/boxid/certs/eu-west-1.pem+19 −0internal/boxid/certs/eu-west-2.pem+19 −0internal/boxid/certs/us-east-1.pem+19 −0internal/boxid/record.go+93 −0internal/boxid/verify.go+84 −0internal/console/boxchoice.go+98 −0internal/console/boxchoice_test.go+163 −0internal/console/instancesplacement.go+14 −4internal/console/regioncandidates_test.go+27 −0internal/edge/homemap.go+84 −6internal/edge/homemap_test.go+123 −0internal/host/edgesfile.go+77 −3internal/host/edgesfile_test.go+154 −0internal/host/headroom.go+38 −0internal/host/headroom_linux.go+23 −0internal/host/headroom_other.go+6 −0internal/host/headroom_test.go+26 −0internal/hostfiles/deadline.go+36 −0internal/hostfiles/deadline_test.go+38 −0internal/hostfiles/dir_other.go+26 −0internal/hostfiles/dir_unix.go+183 −0internal/hostfiles/hostfiles_test.go+822 −0internal/hostfiles/manifest.go+91 −0internal/hostfiles/publish_unix_test.go+135 −0internal/hostfiles/publisher.go+226 −0internal/hostfiles/restore.go+358 −0internal/hostfiles/run.go+213 −0internal/hostfiles/run_test.go+379 −0internal/hostfiles/sync.go+125 −0internal/hostfiles/sync_test.go+190 −0internal/hostfiles/sync_unix_test.go+254 −0internal/hostfiles/wake.go+138 −0internal/hostfiles/wake_test.go+191 −0internal/hostfiles/walk_unix.go+73 −0internal/hostfiles/watch_linux.go+217 −0internal/hostfiles/watch_linux_test.go+232 −0internal/hostfiles/watch_other.go+10 −0internal/registry/timers.go+31 −0internal/registry/timers_test.go+77 −0internal/termfence/fence.go+138 −0internal/termfence/fence_test.go+127 −0
CI passed — run details
docs/superpowers/plans/2026-10-05-region-ha-1a-foundations.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-1.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-2.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-3.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-4.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-BRIEF-5.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R1.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R2.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R3.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R4.mdLoading diff…
docs/superpowers/plans/CODEX-PLAN-REGION-HA-1A-R5.mdLoading diff…
docs/superpowers/specs/2026-10-04-region-ha-box-placement-design.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-1.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-2.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-3.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-4.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-5.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-REGION-HA-6.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-1.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-2.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-3.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-4.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-5.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-HA-6.mdLoading diff…
infra/modules/deployment-buckets/main.tfLoading diff…
infra/modules/deployment-buckets/variables.tfLoading diff…
infra/modules/region-host/README.mdLoading diff…
infra/modules/region-host/main.tfLoading diff…
infra/modules/region-host/outputs.tfLoading diff…
infra/modules/region-host/tests/store_scanning.tftest.hclLoading diff…
internal/activator/installed.goLoading diff…
internal/activator/installed_test.goLoading diff…
internal/boxid/boxid_test.goLoading diff…
internal/boxid/certs.goLoading diff…
internal/boxid/certs/README.mdLoading diff…
internal/boxid/certs/ap-southeast-2.pemLoading diff…
internal/boxid/certs/eu-west-1.pemLoading diff…
internal/boxid/certs/eu-west-2.pemLoading diff…
internal/boxid/certs/us-east-1.pemLoading diff…
internal/boxid/record.goLoading diff…
internal/boxid/verify.goLoading diff…
internal/console/boxchoice.goLoading diff…
internal/console/boxchoice_test.goLoading diff…
internal/console/instancesplacement.goLoading diff…
internal/console/regioncandidates_test.goLoading diff…
internal/edge/homemap.goLoading diff…
internal/edge/homemap_test.goLoading diff…
internal/host/edgesfile.goLoading diff…
internal/host/edgesfile_test.goLoading diff…
internal/host/headroom.goLoading diff…
internal/host/headroom_linux.goLoading diff…
internal/host/headroom_other.goLoading diff…
internal/host/headroom_test.goLoading diff…
internal/hostfiles/deadline.goLoading diff…
internal/hostfiles/deadline_test.goLoading diff…
internal/hostfiles/dir_other.goLoading diff…
internal/hostfiles/dir_unix.goLoading diff…
internal/hostfiles/hostfiles_test.goLoading diff…
internal/hostfiles/manifest.goLoading diff…
internal/hostfiles/publish_unix_test.goLoading diff…
internal/hostfiles/publisher.goLoading diff…
internal/hostfiles/restore.goLoading diff…
internal/hostfiles/run.goLoading diff…
internal/hostfiles/run_test.goLoading diff…
internal/hostfiles/sync.goLoading diff…
internal/hostfiles/sync_test.goLoading diff…
internal/hostfiles/sync_unix_test.goLoading diff…
internal/hostfiles/wake.goLoading diff…
internal/hostfiles/wake_test.goLoading diff…
internal/hostfiles/walk_unix.goLoading diff…
internal/hostfiles/watch_linux.goLoading diff…
internal/hostfiles/watch_linux_test.goLoading diff…
internal/hostfiles/watch_other.goLoading diff…
internal/registry/timers.goLoading diff…
internal/registry/timers_test.goLoading diff…
internal/termfence/fence.goLoading diff…
internal/termfence/fence_test.goLoading diff…