region HA W6: drain a fixed box out of the NLB before its edge stops
A fixed box that is an NLB target now fails its own health check, waits until DescribeTargetHealth shows both target groups have withdrawn it (plus a 10 s settle), closes its public listeners gracefully, and only then lets systemd stop tenants and the edge. Triggers: carlos system apply and rollback ask before the binary swap; a new carlos-edge-drain.service (Upholds= from the edge, every tenant unit Before= it) runs the drain in its ExecStop for manual restarts and reboots. Group members are excluded (they use §25 Standby). Also: target groups stop resetting connections on unhealthy targets (180 s draining); fixed boxes get read-only DescribeTargetHealth and DescribeTargetGroupAttributes; host-env key CARLOS_INGRESS_TARGET_GROUPS; the gzip header sync keeps a drain's Connection: close (fixes §25 too); wakes on a draining box get 503 Retry-After. Spec docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md (rev 4, approved). Root-runner witness on real systemd 257: drain ends before the first tenant stop and the edge stop. Census approved (#280). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from w6-ingress-drain into main.
commands.go+7 −0commands_test.go+2 −2docs/region-ha-runbook.md+113 −1docs/superpowers/notes/census-claims-w6-ingress-drain.tsv+34 −0docs/superpowers/notes/census-proposal-w6-ingress-drain.md+82 −0docs/superpowers/plans/2026-11-10-fixed-edge-ingress-drain.md+81 −0docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md+4 −3docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md+223 −0infra/modules/region-host/ingress/main.tf+10 −0infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl+18 −0infra/modules/region-host/main.tf+23 −0infra/modules/region-host/outputs.tf+5 −0infra/modules/region-host/tests/group_iam.tftest.hcl+13 −0infra/modules/region-host/tests/ingress_drain_read.tftest.hcl+112 −0infra/modules/region-host/variables.tf+32 −0internal/activator/activator.go+3 −0internal/activator/group_admission.go+3 −0internal/activator/group_admission_test.go+23 −0internal/edge/compress.go+10 −0internal/edge/compress_test.go+70 −0internal/edge/edge.go+7 −7internal/edge/hadrainconns.go+59 −23internal/edge/heldstream.go+8 −3internal/edge/ingressdrain.go+192 −0internal/edge/ingressdrain_test.go+676 −0internal/host/agent.go+42 −10internal/host/bootstrap.go+8 −1internal/host/departure_queue_default.go+19 −0internal/host/departure_queue_rootrunner.go+44 −0internal/host/execsandboxfloor_test.go+1 −1internal/host/group_admission.go+21 −2internal/host/group_admission_test.go+41 −0internal/host/group_maintenance_test.go+1 −1internal/host/gvisor_fixture_rootrunner_linux_test.go+1 −1internal/host/gvisor_hardening_rootrunner_linux_test.go+1 −1internal/host/gvisor_units_test.go+1 −0internal/host/hadrain_call.go+122 −11internal/host/hadrain_call_linux.go+16 −1internal/host/hadrain_call_other.go+12 −0internal/host/hadrain_socket.go+60 −1internal/host/hadrain_socket_linux.go+1 −1internal/host/hadrain_socket_other.go+3 −2internal/host/haplacement_root_linux_test.go+13 −4internal/host/haterminate_rootrunner_linux_test.go+5 −0internal/host/host_test.go+3 −2internal/host/ingressdrain.go+676 −0internal/host/ingressdrain_call_linux_test.go+203 −0internal/host/ingressdrain_rootrunner_linux_test.go+1,237 −0internal/host/ingressdrain_socket_linux_test.go+58 −0internal/host/ingressdrain_test.go+1,170 −0internal/host/rootmovesfloor_refresh_test.go+1 −1internal/host/systemapply.go+96 −4internal/host/systemapply_ingress_test.go+366 −0internal/host/systemapply_test.go+6 −6internal/host/units/carlos-edge-drain.service+60 −0internal/host/units/carlos-edge.service+5 −0internal/host/units/carlos-instance-cmd@.service+2 −0internal/host/units/carlos-instance-gen@.service+2 −0internal/host/units/carlos-instance-gvisor@.service+1 −0internal/host/units/carlos-instance-rootfs-cmd@.service+2 −0internal/host/units/carlos-instance-rootfs-gen@.service+2 −0internal/host/units/carlos-instance-rootfs-tty@.service+2 −0internal/host/units/carlos-instance-rootfs-worker@.service+2 −0internal/host/units/carlos-instance-rootfs@.service+2 −0internal/host/units/carlos-instance-seed@.service+2 −0internal/host/units/carlos-instance-sidecar@.service+2 −0internal/host/units/carlos-instance-tty@.service+2 −0internal/host/units/carlos-instance@.service+2 −0internal/host/units/carlos-system-recover.service+4 −1internal/host/units/carlos-system-update.service+5 −2internal/host/units_ingress_drain_test.go+207 −0internal/hostenv/group.go+3 −0internal/hostenv/hostenv.go+43 −0internal/hostenv/hostenv_test.go+113 −0internal/ingresshealth/awstg/awstg.go+148 −0internal/ingresshealth/awstg/awstg_test.go+282 −0internal/ingresshealth/ingresshealth.go+278 −0internal/ingresshealth/ingresshealth_test.go+197 −0internal/lbhealth/lbhealth.go+19 −1internal/lbhealth/lbhealth_test.go+33 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-w6-ingress-drain.tsv+73 −0parity/cli.tsv+1 −0testdata/clireg-golden.jsonl+1 −0
CI failed — run details
commands.goLoading diff…
commands_test.goLoading diff…
docs/region-ha-runbook.mdLoading diff…
docs/superpowers/notes/census-claims-w6-ingress-drain.tsvLoading diff…
docs/superpowers/notes/census-proposal-w6-ingress-drain.mdLoading diff…
docs/superpowers/plans/2026-11-10-fixed-edge-ingress-drain.mdLoading diff…
docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.mdLoading diff…
docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.mdLoading diff…
infra/modules/region-host/ingress/main.tfLoading diff…
infra/modules/region-host/ingress/tests/group_ingress.tftest.hclLoading diff…
infra/modules/region-host/main.tfLoading diff…
infra/modules/region-host/outputs.tfLoading diff…
infra/modules/region-host/tests/group_iam.tftest.hclLoading diff…
infra/modules/region-host/tests/ingress_drain_read.tftest.hclLoading diff…
infra/modules/region-host/variables.tfLoading diff…
internal/activator/activator.goLoading diff…
internal/activator/group_admission.goLoading diff…
internal/activator/group_admission_test.goLoading diff…
internal/edge/compress.goLoading diff…
internal/edge/compress_test.goLoading diff…
internal/edge/edge.goLoading diff…
internal/edge/hadrainconns.goLoading diff…
internal/edge/heldstream.goLoading diff…
internal/edge/ingressdrain.goLoading diff…
internal/edge/ingressdrain_test.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/bootstrap.goLoading diff…
internal/host/departure_queue_default.goLoading diff…
internal/host/departure_queue_rootrunner.goLoading diff…
internal/host/execsandboxfloor_test.goLoading diff…
internal/host/group_admission.goLoading diff…
internal/host/group_admission_test.goLoading diff…
internal/host/group_maintenance_test.goLoading diff…
internal/host/gvisor_fixture_rootrunner_linux_test.goLoading diff…
internal/host/gvisor_hardening_rootrunner_linux_test.goLoading diff…
internal/host/gvisor_units_test.goLoading diff…
internal/host/hadrain_call.goLoading diff…
internal/host/hadrain_call_linux.goLoading diff…
internal/host/hadrain_call_other.goLoading diff…
internal/host/hadrain_socket.goLoading diff…
internal/host/hadrain_socket_linux.goLoading diff…
internal/host/hadrain_socket_other.goLoading diff…
internal/host/haplacement_root_linux_test.goLoading diff…
internal/host/haterminate_rootrunner_linux_test.goLoading diff…
internal/host/host_test.goLoading diff…
internal/host/ingressdrain.goLoading diff…
internal/host/ingressdrain_call_linux_test.goLoading diff…
internal/host/ingressdrain_rootrunner_linux_test.goLoading diff…
internal/host/ingressdrain_socket_linux_test.goLoading diff…
internal/host/ingressdrain_test.goLoading diff…
internal/host/rootmovesfloor_refresh_test.goLoading diff…
internal/host/systemapply.goLoading diff…
internal/host/systemapply_ingress_test.goLoading diff…
internal/host/systemapply_test.goLoading diff…
internal/host/units/carlos-edge-drain.serviceLoading diff…
internal/host/units/carlos-edge.serviceLoading diff…
internal/host/units/carlos-instance-cmd@.serviceLoading diff…
internal/host/units/carlos-instance-gen@.serviceLoading diff…
internal/host/units/carlos-instance-gvisor@.serviceLoading diff…
internal/host/units/carlos-instance-rootfs-cmd@.serviceLoading diff…
internal/host/units/carlos-instance-rootfs-gen@.serviceLoading diff…
internal/host/units/carlos-instance-rootfs-tty@.serviceLoading diff…
internal/host/units/carlos-instance-rootfs-worker@.serviceLoading diff…
internal/host/units/carlos-instance-rootfs@.serviceLoading diff…
internal/host/units/carlos-instance-seed@.serviceLoading diff…
internal/host/units/carlos-instance-sidecar@.serviceLoading diff…
internal/host/units/carlos-instance-tty@.serviceLoading diff…
internal/host/units/carlos-instance@.serviceLoading diff…
internal/host/units/carlos-system-recover.serviceLoading diff…
internal/host/units/carlos-system-update.serviceLoading diff…
internal/host/units_ingress_drain_test.goLoading diff…
internal/hostenv/group.goLoading diff…
internal/hostenv/hostenv.goLoading diff…
internal/hostenv/hostenv_test.goLoading diff…
internal/ingresshealth/awstg/awstg.goLoading diff…
internal/ingresshealth/awstg/awstg_test.goLoading diff…
internal/ingresshealth/ingresshealth.goLoading diff…
internal/ingresshealth/ingresshealth_test.goLoading diff…
internal/lbhealth/lbhealth.goLoading diff…
internal/lbhealth/lbhealth_test.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-w6-ingress-drain.tsvLoading diff…
parity/cli.tsvLoading diff…
testdata/clireg-golden.jsonlLoading diff…