carlos / platform Public

region HA P3a: dev NLB ingress, plan gate, box roles, opt-in admission

Adds the regional NLB ingress module with health alarms, a JSON plan
gate that refuses any change touching a fixed box identity, desired box
roles read through the change index, and fixed-box opt-in admission
(CARLOS_GROUP_ADMISSION=1): a box starts closed and serves tenants only
after its four startup facts. Switch-off boxes are byte-identical.
Namespace withdrawal was cut under stopping rule 2 (#421). Opus reviewed
tasks and branch (R1 READY); census approved on #280.

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

Squashed from region-ha-p3-group into main.

Squashed from region-ha-p3-group into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 016599d5b97c04b2fc5e807b834fdf38e2c7a35e parent f18da98
94 files changed, +7,853 −55
  • docs/superpowers/notes/census-proposal-region-ha-p3a.md +111 −0
  • docs/superpowers/notes/census-region-ha-p3a-claims.tsv +60 −0
  • docs/superpowers/plans/2026-11-01-region-ha-p3-group.md +405 −0
  • docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R1.md +80 −0
  • docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R2.md +104 −0
  • docs/superpowers/plans/REVIEW-REGION-HA-P3-R1.md +107 −0
  • docs/superpowers/plans/REVIEW-REGION-HA-P3-R2.md +118 −0
  • docs/superpowers/reviews/REVIEW-BRIEF-REGION-HA-P3A-BRANCH.md +61 −0
  • docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.md +177 −0
  • infra/modules/region-host/group_alarms.tf +24 −0
  • infra/modules/region-host/ingress/alarms.tf +89 −0
  • infra/modules/region-host/ingress/main.tf +127 −0
  • infra/modules/region-host/ingress/outputs.tf +19 −0
  • infra/modules/region-host/ingress/tests/fixed-targets/main.tf +33 −0
  • infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl +61 −0
  • infra/modules/region-host/ingress/tests/fixed-targets/variables.tf +56 −0
  • infra/modules/region-host/ingress/tests/fixed-targets/versions.tf +9 −0
  • infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl +282 −0
  • infra/modules/region-host/ingress/variables.tf +79 −0
  • infra/modules/region-host/ingress/versions.tf +9 −0
  • infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl +97 −0
  • infra/modules/region-host/tests/group_alarms.tftest.hcl +106 −0
  • internal/activator/activator.go +57 −2
  • internal/activator/backend_exec.go +28 −0
  • internal/activator/backend_rootfs.go +2 −0
  • internal/activator/claimwake.go +1 −1
  • internal/activator/cmd.go +3 −0
  • internal/activator/cmdunit.go +7 −0
  • internal/activator/containment.go +1 −0
  • internal/activator/genbackend.go +4 −1
  • internal/activator/genservice.go +6 −0
  • internal/activator/group_admission.go +80 −0
  • internal/activator/group_admission_test.go +138 −0
  • internal/activator/hawake.go +3 −0
  • internal/activator/rootfsworkers.go +2 −2
  • internal/activator/swapadmit.go +1 −1
  • internal/activator/wakeplan.go +1 −1
  • internal/activator/workerbuild.go +3 −0
  • internal/boxroles/roles.go +136 −0
  • internal/boxroles/roles_test.go +82 −0
  • internal/console/apiplacements.go +1 −1
  • internal/console/boxroles_test.go +48 −0
  • internal/console/instancesplacement.go +4 −1
  • internal/edge/admission_exact_test.go +126 −0
  • internal/edge/admission_export_test.go +112 −0
  • internal/edge/boxroles_test.go +62 −0
  • internal/edge/edge.go +19 −2
  • internal/edge/group_admission.go +52 −0
  • internal/edge/group_admission_external_test.go +50 −0
  • internal/edge/homemap.go +10 −4
  • internal/edge/lbhealth.go +10 −0
  • internal/edge/wakeplacement.go +1 −1
  • internal/edge/wakeplacement_test.go +6 −1
  • internal/edgesfile/admission.go +27 −0
  • internal/edgesfile/admission_test.go +45 −0
  • internal/edgesfile/edgesfile.go +1 −0
  • internal/edgesfile/homeelect.go +3 −2
  • internal/edgesfile/snapshot.go +2 −1
  • internal/groupadmission/observation.go +10 −0
  • internal/groupadmission/state.go +101 −0
  • internal/groupadmission/state_test.go +141 −0
  • internal/host/agent.go +29 −11
  • internal/host/booting_publication_test.go +128 −0
  • internal/host/boxroles.go +148 −0
  • internal/host/boxroles_config.go +39 −0
  • internal/host/boxroles_config_linux.go +32 −0
  • internal/host/boxroles_config_other.go +9 −0
  • internal/host/boxroles_config_test.go +55 −0
  • internal/host/boxroles_test.go +559 −0
  • internal/host/edgesfile.go +31 −10
  • internal/host/group_admission.go +246 −0
  • internal/host/group_admission_fix_test.go +300 −0
  • internal/host/group_admission_test.go +362 −0
  • internal/host/group_metrics.go +128 −0
  • internal/host/group_metrics_test.go +234 −0
  • internal/host/memwatch.go +25 −4
  • internal/host/schedule_wiring.go +17 −6
  • internal/host/startup_largebox_linux_test.go +12 −2
  • internal/hostenv/boxroles_test.go +9 −0
  • internal/hostenv/hostenv.go +2 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv +128 −0
  • internal/release/boxroles_test.go +11 −0
  • internal/release/changeindex.go +1 −1
  • scripts/check-region-group-plan.py +425 −0
  • scripts/check_region_group_plan_test.py +390 −0
  • scripts/group_alarm_plan_test.py +72 −0
  • scripts/testdata/region-group-plan/fixed-eip-reassociation.json +25 −0
  • scripts/testdata/region-group-plan/fixed-identities.json +74 −0
  • scripts/testdata/region-group-plan/fixed-identity-probes.json +191 −0
  • scripts/testdata/region-group-plan/new-ingress.json +26 −0
  • scripts/testdata/region-group-plan/regional-alarms.json +477 −0
  • scripts/testdata/region-group-plan/targeted-fixed-user-data.json +41 −0
  • scripts/testdata/region-group-plan/unchanged-move.json +26 −0

CI passed — run details

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

Loading diff…

docs/superpowers/notes/census-region-ha-p3a-claims.tsv

Loading diff…

docs/superpowers/plans/2026-11-01-region-ha-p3-group.md

Loading diff…

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

Loading diff…

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

Loading diff…

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

Loading diff…

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

Loading diff…

docs/superpowers/reviews/REVIEW-BRIEF-REGION-HA-P3A-BRANCH.md

Loading diff…

docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.md

Loading diff…

infra/modules/region-host/group_alarms.tf

Loading diff…

infra/modules/region-host/ingress/alarms.tf

Loading diff…

infra/modules/region-host/ingress/main.tf

Loading diff…

infra/modules/region-host/ingress/outputs.tf

Loading diff…

infra/modules/region-host/ingress/tests/fixed-targets/main.tf

Loading diff…

infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl

Loading diff…

infra/modules/region-host/ingress/tests/fixed-targets/variables.tf

Loading diff…

infra/modules/region-host/ingress/tests/fixed-targets/versions.tf

Loading diff…

infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl

Loading diff…

infra/modules/region-host/ingress/variables.tf

Loading diff…

infra/modules/region-host/ingress/versions.tf

Loading diff…

infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl

Loading diff…

infra/modules/region-host/tests/group_alarms.tftest.hcl

Loading diff…

internal/activator/activator.go

Loading diff…

internal/activator/backend_exec.go

Loading diff…

internal/activator/backend_rootfs.go

Loading diff…

internal/activator/claimwake.go

Loading diff…

internal/activator/cmd.go

Loading diff…

internal/activator/cmdunit.go

Loading diff…

internal/activator/containment.go

Loading diff…

internal/activator/genbackend.go

Loading diff…

internal/activator/genservice.go

Loading diff…

internal/activator/group_admission.go

Loading diff…

internal/activator/group_admission_test.go

Loading diff…

internal/activator/hawake.go

Loading diff…

internal/activator/rootfsworkers.go

Loading diff…

internal/activator/swapadmit.go

Loading diff…

internal/activator/wakeplan.go

Loading diff…

internal/activator/workerbuild.go

Loading diff…

internal/boxroles/roles.go

Loading diff…

internal/boxroles/roles_test.go

Loading diff…

internal/console/apiplacements.go

Loading diff…

internal/console/boxroles_test.go

Loading diff…

internal/console/instancesplacement.go

Loading diff…

internal/edge/admission_exact_test.go

Loading diff…

internal/edge/admission_export_test.go

Loading diff…

internal/edge/boxroles_test.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/group_admission.go

Loading diff…

internal/edge/group_admission_external_test.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edge/lbhealth.go

Loading diff…

internal/edge/wakeplacement.go

Loading diff…

internal/edge/wakeplacement_test.go

Loading diff…

internal/edgesfile/admission.go

Loading diff…

internal/edgesfile/admission_test.go

Loading diff…

internal/edgesfile/edgesfile.go

Loading diff…

internal/edgesfile/homeelect.go

Loading diff…

internal/edgesfile/snapshot.go

Loading diff…

internal/groupadmission/observation.go

Loading diff…

internal/groupadmission/state.go

Loading diff…

internal/groupadmission/state_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/booting_publication_test.go

Loading diff…

internal/host/boxroles.go

Loading diff…

internal/host/boxroles_config.go

Loading diff…

internal/host/boxroles_config_linux.go

Loading diff…

internal/host/boxroles_config_other.go

Loading diff…

internal/host/boxroles_config_test.go

Loading diff…

internal/host/boxroles_test.go

Loading diff…

internal/host/edgesfile.go

Loading diff…

internal/host/group_admission.go

Loading diff…

internal/host/group_admission_fix_test.go

Loading diff…

internal/host/group_admission_test.go

Loading diff…

internal/host/group_metrics.go

Loading diff…

internal/host/group_metrics_test.go

Loading diff…

internal/host/memwatch.go

Loading diff…

internal/host/schedule_wiring.go

Loading diff…

internal/host/startup_largebox_linux_test.go

Loading diff…

internal/hostenv/boxroles_test.go

Loading diff…

internal/hostenv/hostenv.go

Loading diff…

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

Loading diff…

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

Loading diff…

internal/release/boxroles_test.go

Loading diff…

internal/release/changeindex.go

Loading diff…

scripts/check-region-group-plan.py

Loading diff…

scripts/check_region_group_plan_test.py

Loading diff…

scripts/group_alarm_plan_test.py

Loading diff…

scripts/testdata/region-group-plan/fixed-eip-reassociation.json

Loading diff…

scripts/testdata/region-group-plan/fixed-identities.json

Loading diff…

scripts/testdata/region-group-plan/fixed-identity-probes.json

Loading diff…

scripts/testdata/region-group-plan/new-ingress.json

Loading diff…

scripts/testdata/region-group-plan/regional-alarms.json

Loading diff…

scripts/testdata/region-group-plan/targeted-fixed-user-data.json

Loading diff…

scripts/testdata/region-group-plan/unchanged-move.json

Loading diff…