carlos / platform Public

Merge origin/main into stateless-coordinator-route

Resolve the sole census-chain conflict by keeping main's order and
appending this branch's overlay. Re-seal against main's last overlay.
Old seal: b129397d033dff1da950da3c6879132d003191c81d282de250ff72dff7444020
New seal: 7974cb078e82272605cbc8ef6809c9ae5e0b02edc22ca843cd2ef4b38d9e44e9
Co-Authored-By: Codex (gpt-6-astra) <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 1b334cb8f197edb64b9f45cd87203403fe369ef2 parent 92b24a7parent 3487d6f
103 files changed, +8,480 −67
  • README.md +2 −0
  • cmd/console/member.go +31 −1
  • cmd/console/member_demo_test.go +131 −0
  • docs/superpowers/notes/census-claims-stateless-coordinator-route.tsv +1 −1
  • docs/superpowers/notes/census-proposal-region-ha-p3a.md +111 −0
  • docs/superpowers/notes/census-proposal-stateless-coordinator-route.md +4 −4
  • 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
  • docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md +20 −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/demo_members.go +131 −0
  • internal/console/instancesplacement.go +4 −1
  • internal/console/member_demo_test.go +300 −0
  • 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 +2 −1
  • internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv +128 −0
  • internal/provision/testdata/plan14-root-reads-stateless-coordinator-route.tsv +6 −5
  • 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

Intent

Human

<task-notification> <task-id>b0k1qlx2y</task-id> <tool-use-id>toolu_01KwmHyepR6BkFcZwgfcVUuc</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/b0k1qlx2y.output</output-file> <status>completed</status> <summary>Background command "Wait for the coordinator-route fix round" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a0f77aab818303732</task-id> <tool-use-id>toolu_01Pr2pZWrDsG22eLbeeTX3k8</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/a0f77aab818303732.output</output-file> <status>completed</status> <summary>Agent "Re-review coordinator-route fix round" 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>### Item verdicts - **(a) ADDRESSED.** `internal/host/replicacoordinator.go:100` now treats only these as `ErrConsoleUnreachable`: a status of 500 or higher, a response without `X-Carlos-Version`, or a transport error (line 97). A marked 404 falls through to `ErrFenced` (line 116). In the table test at `internal/host/replicacoordinator_test.go:564-565`, an unmarked "hub 404" gives unreachable and a marked "console 404" gives `ErrFenced`. The real-console test at `replicacoordinator_test.go:92-95` sends a wrong fleet token and asserts the marked 404 comes back `ErrFenced` and not unreachable. Marked 409 and the 429/408 transient cases are unchanged. - **(b) ADDRESSED.** `internal/edge/edge.go:1931` forwards only when all of these hold: the method is POST, `RawPath == ""`, `path.Clean(p) == p`, and the path has the `/api/fleet/replicas/` prefix. Anything else falls through to the hub branch as before. `internal/edge/replicaconsole_test.go:58-62` covers all five requested paths, each expecting a 404 and no console hit. The guard only narrows the old condition, so nothing that previously stayed on the hub is forwarded now. - **(c) ADDRESSED.** `SwapResult.Err` (`internal/activator/swap.go:74`) is set by `abandon`/`failSwap` (lines 116-121). Both classifications in `internal/rollout/scheduler.go:350` and `:426` use `errors.Is(res.Err, replicas.ErrConsoleUnreachable)`. `swap_error_test.go` proves two things: a wrapped sentinel survives, and an error with the same text but a different identity does not match. `status_test.go:375` now drives recovery with a wrapped cause. Status still emits the canonical text from typed state (`status.go:136-137`). - **(d) ADDRESSED.** SR-1-C14 is in `docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md:33`. It points at `internal/replicas/types.go`, where the literal is defined (line 44), with the text `console unreachable` and status "approved provisionally (controller ruling P25; for Paul's copy review)". It is in `statelessReplicaBuiltCopy`, so the built, applied and no-em-dash gates cover it. The deck has no em dashes (grep count 0). It still needs Paul's copy review before it counts as fully approved. ### New breakage in the fix diff None found. - Every `SwapResult` literal built in the scheduler (`scheduler.go:118/137/154/164/204`) leaves `Err` nil. None of them carried console-unreachable before (the reasons are fixed strings, or a staging `resolve` error), so moving off text matching loses no case. - Tenant-chosen text equal to "console unreachable" can no longer set the flag, which is a small improvement. - Wrapped causes, for example through `prepareStatelessEscrow`'s `refuse` wrapper, are now classified as intended. - I found no JSON or wire use of `SwapResult`, so the new interface field cannot break a serialised shape. ### Census | unit / envelope | change | verdict | |---|---|---| | `internal/edge/edge.go` `Edge.ServeHTTP` | body: a stricter guard before forwarding | Approve. It reads only the parsed request path. It is narrower than the approved P24 body, adds no read sites, and opens, runs, queries or follows nothing a tenant, app or box agent can name. | | `internal/rollout/scheduler.go` `scheduler.done` | body: `errors.Is` on an in-memory error | Approve. It adds no read sites and gets no new failure-book authority. Diagnostic text, which a tenant can influence, no longer grants the classification. | | envelope `internal/activator` (new) | `abandon`/`failSwap` keep the error; one struct field | Approve. Only an in-memory value is carried. There are no reads. | | envelopes `internal/edge`, `internal/host`, `internal/rollout` (re-pinned) | the changes above, plus the host fix for item (a) (status and header checks on a response) | Approve. No new reads. | | envelopes `.`, `internal/replicas` | unchanged pins | Approve. | | `internal/edge/replicaconsole.go` `Edge.serveReplicaConsole` | unchanged since the approved 7d072d77 (same fingerprint) | Approval stands. | On the chain: the branch's `plan14-root-reads-chain.tsv` equals origin/main's file (merge base f18da984) plus one final line for this overlay, after main's last `region-ha-followups` line. The seal moves from `cfb026f1…c387` to `b129397d033dff1da950da3c6879132d003191c81d282de250ff72dff7444020`. My focused run of `TestPlan14RootReadCensus$` passed. Census: APPROVED at 92b24a7d (seal `b129397d033dff1da950da3c6879132d003191c81d282de250ff72dff7444020`) I could not re-run the root-package copy tests myself. The test harness refuses a TMPDIR under home, and the sandbox makes `/tmp/g` read-only. I relied on the report's passing run and on reading the gate code, which does cover the new row. ### Verdict **Ready to merge?** Yes. All four P25 items are fixed and the census is approved; SR-1-C14 still waits on Paul's copy review.</result> <usage><subagent_tokens>71282</subagent_tokens><tool_uses>19</tool_uses><duration_ms>161209</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bf58xp5bc</task-id> <tool-use-id>toolu_01MXbJAhiV384Nkd3kJiRHA4</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/bf58xp5bc.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on 92b24a7d" completed (exit code 0)</summary> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="335399d5-3ec5-4e92-ae37-08e6aaae74c8" message-id="1698aadc-81dd-4932-8ec1-d2dab447666d"> From Paul (2026-11-04 ~01:05Z, relayed by platform-83): &apos;Go.&apos; Merge Plan 2 as you proposed. Right before merging, re-check that origin/main is still an ancestor of e9cd5fc7; if main moved, merge it in and wait for CI first. Then: amadan branch merge carlos/platform stateless-replicas-2-placement -squash -expect e9cd5fc752037804690ac8fa0a002b2a4252663f with a short subject and a body. Not released. Record the go as a ledger ruling, then carry on with the Plan 1 dev smoke (v0.34.0 is on dev since 21:06:21Z) and Plan 3. </paseo-system>

README.md

Loading diff…

cmd/console/member.go

Loading diff…

cmd/console/member_demo_test.go

Loading diff…

docs/superpowers/notes/census-claims-stateless-coordinator-route.tsv

Loading diff…

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

Loading diff…

docs/superpowers/notes/census-proposal-stateless-coordinator-route.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…

docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.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/demo_members.go

Loading diff…

internal/console/instancesplacement.go

Loading diff…

internal/console/member_demo_test.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/provision/testdata/plan14-root-reads-stateless-coordinator-route.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…