Merge origin/main into stateless-replicas-2-placement
Merge main through 38cda89e, retaining region HA P3a, demo holding-account tooling, coordinator tunnel forwarding and the OpenTofu plan-gate fix. Resolve approved_stateless_replicas_copy_test.go by preserving every SR-2 built entry and main's SR-1-C14 entry and copy-deck row. Resolve internal/activator/cmdunit.go by retaining main's tenant admission checks and the replica set exec-gate recheck after launch preparation. The final admission check follows the replica recheck before Cmd/TTY. Resolve internal/provision/testdata/plan14-root-reads-chain.tsv by retaining all main lines in order and appending the placement overlay last, parented on main's final overlay. Extend only the five merge-changed unit claims; record-write inventories pass without re-digesting entries. New placement census seal: 59c0891618b9befae27ebe04d0a67b08c7f7658bca9f1c78bf6d05eb7a708e82 Verify retirement ACKs use ErrConsoleUnreachable for non-console replies and retry, with regression coverage for backoff, recovery and launch gates. Package validation passes except 21 host failures matching isolated main exactly. Race, cross-builds, native build, vet, formatting and script tests pass. No push.
Co-Authored-By: Codex (gpt-6-astra) <noreply@openai.com>
README.md+2 −0approved_stateless_replicas_copy_test.go+1 −1cmd/console/member.go+31 −1cmd/console/member_demo_test.go+131 −0docs/superpowers/notes/census-claims-stateless-coordinator-route.tsv+3 −0docs/superpowers/notes/census-proposal-region-ha-p3a.md+111 −0docs/superpowers/notes/census-proposal-stateless-coordinator-route.md+27 −0docs/superpowers/notes/census-proposal-stateless-replicas-2.md+5 −5docs/superpowers/notes/census-region-ha-p3a-claims.tsv+60 −0docs/superpowers/plans/2026-11-01-region-ha-p3-group.md+405 −0docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md+1 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R1.md+80 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R2.md+104 −0docs/superpowers/plans/REVIEW-REGION-HA-P3-R1.md+107 −0docs/superpowers/plans/REVIEW-REGION-HA-P3-R2.md+118 −0docs/superpowers/reviews/REVIEW-BRIEF-REGION-HA-P3A-BRANCH.md+61 −0docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.md+177 −0docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md+20 −0infra/modules/region-host/group_alarms.tf+24 −0infra/modules/region-host/ingress/alarms.tf+89 −0infra/modules/region-host/ingress/main.tf+127 −0infra/modules/region-host/ingress/outputs.tf+19 −0infra/modules/region-host/ingress/tests/fixed-targets/main.tf+33 −0infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl+61 −0infra/modules/region-host/ingress/tests/fixed-targets/variables.tf+56 −0infra/modules/region-host/ingress/tests/fixed-targets/versions.tf+9 −0infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl+282 −0infra/modules/region-host/ingress/variables.tf+79 −0infra/modules/region-host/ingress/versions.tf+9 −0infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl+97 −0infra/modules/region-host/tests/group_alarms.tftest.hcl+106 −0instances_cli.go+3 −0instances_rollout_test.go+1 −0internal/activator/activator.go+57 −2internal/activator/backend_exec.go+28 −0internal/activator/backend_rootfs.go+2 −0internal/activator/claimwake.go+1 −1internal/activator/cmd.go+3 −0internal/activator/cmdunit.go+7 −0internal/activator/containment.go+1 −0internal/activator/genbackend.go+4 −1internal/activator/genservice.go+6 −0internal/activator/group_admission.go+80 −0internal/activator/group_admission_test.go+138 −0internal/activator/hawake.go+3 −0internal/activator/rootfsworkers.go+2 −2internal/activator/stateless_assignment_test.go+23 −0internal/activator/swap.go+7 −2internal/activator/swap_error_test.go+21 −0internal/activator/swapadmit.go+1 −1internal/activator/wakeplan.go+1 −1internal/activator/workerbuild.go+3 −0internal/boxroles/roles.go+136 −0internal/boxroles/roles_test.go+82 −0internal/console/apiplacements.go+1 −1internal/console/boxroles_test.go+48 −0internal/console/demo_members.go+131 −0internal/console/instancepage.go+3 −0internal/console/instancesplacement.go+4 −1internal/console/member_demo_test.go+300 −0internal/console/swapcopy_truth_test.go+7 −0internal/edge/admission_exact_test.go+126 −0internal/edge/admission_export_test.go+112 −0internal/edge/boxroles_test.go+62 −0internal/edge/edge.go+23 −2internal/edge/group_admission.go+52 −0internal/edge/group_admission_external_test.go+50 −0internal/edge/homemap.go+10 −4internal/edge/lbhealth.go+10 −0internal/edge/replicaconsole.go+39 −0internal/edge/replicaconsole_test.go+102 −0internal/edge/wakeplacement.go+1 −1internal/edge/wakeplacement_test.go+6 −1internal/edgesfile/admission.go+27 −0internal/edgesfile/admission_test.go+45 −0internal/edgesfile/edgesfile.go+1 −0internal/edgesfile/homeelect.go+3 −2internal/edgesfile/snapshot.go+2 −1internal/groupadmission/observation.go+10 −0internal/groupadmission/state.go+101 −0internal/groupadmission/state_test.go+141 −0internal/host/agent.go+29 −11internal/host/booting_publication_test.go+128 −0internal/host/boxroles.go+148 −0internal/host/boxroles_config.go+39 −0internal/host/boxroles_config_linux.go+32 −0internal/host/boxroles_config_other.go+9 −0internal/host/boxroles_config_test.go+55 −0internal/host/boxroles_test.go+559 −0internal/host/edgesfile.go+31 −10internal/host/group_admission.go+246 −0internal/host/group_admission_fix_test.go+300 −0internal/host/group_admission_test.go+362 −0internal/host/group_metrics.go+128 −0internal/host/group_metrics_test.go+234 −0internal/host/memwatch.go+25 −4internal/host/replica_retirement_unreachable_test.go+95 −0internal/host/replicacoordinator.go+30 −3internal/host/replicacoordinator_test.go+78 −2internal/host/schedule_wiring.go+17 −6internal/host/startup_largebox_linux_test.go+12 −2internal/hostenv/boxroles_test.go+9 −0internal/hostenv/hostenv.go+2 −0internal/provision/testdata/plan14-root-reads-chain.tsv+3 −1internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv+128 −0internal/provision/testdata/plan14-root-reads-stateless-coordinator-route.tsv+16 −0internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv+14 −14internal/release/boxroles_test.go+11 −0internal/release/changeindex.go+1 −1internal/replicas/types.go+2 −0internal/rollout/fake_test.go+6 −2internal/rollout/queue.go+3 −2internal/rollout/scheduler.go+10 −0internal/rollout/status.go+4 −0internal/rollout/status_test.go+25 −0scripts/check-region-group-plan.py+430 −0scripts/check_region_group_plan_test.py+413 −0scripts/group_alarm_plan_test.py+72 −0scripts/testdata/region-group-plan/fixed-eip-reassociation.json+25 −0scripts/testdata/region-group-plan/fixed-identities.json+74 −0scripts/testdata/region-group-plan/fixed-identity-probes.json+191 −0scripts/testdata/region-group-plan/new-ingress.json+26 −0scripts/testdata/region-group-plan/regional-alarms.json+477 −0scripts/testdata/region-group-plan/targeted-fixed-user-data.json+41 −0scripts/testdata/region-group-plan/tofu-1.12-fixed-replace.json+681 −0scripts/testdata/region-group-plan/tofu-1.12-identity.json+408 −0scripts/testdata/region-group-plan/unchanged-move.json+26 −0
CI passed — run details
Intent
<task-notification> <task-id>bk329bifb</task-id> <tool-use-id>toolu_01CDMHDWRL22rqt41cixsLSu</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/bk329bifb.output</output-file> <status>completed</status> <summary>Background command "Wait for merge 3" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>bslva0ias</task-id> <tool-use-id>toolu_01FweW8qhg6YykXRo6mn1YEv</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/bslva0ias.output</output-file> <status>completed</status> <summary>Background command "Push, note re-seal on #280, wait for CI" completed (exit code 0)</summary> </task-notification>
<paseo-system version="1" kind="agent-message" source-agent-id="335399d5-3ec5-4e92-ae37-08e6aaae74c8" message-id="c27c80ed-e990-4116-a70a-4fc854dcf3f0"> v0.34.0 is on every dev box and the dev console since 21:06:21Z (2026-11-03); Plan 1 dev smoke may run. Note (release agent, 00:58Z 11-04): carlos system status also shows a third box-1 row on canary at build 2fd703c6, 'behind -> v0.34.0', not part of this roll; if the console's floor check counts it, a stateless ship on canary may be refused until it updates. </paseo-system>
<task-notification> <task-id>a6fe475fd15707786</task-id> <tool-use-id>toolu_01CKWQBPqKopVsMuvL6kpohp</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/a6fe475fd15707786.output</output-file> <status>completed</status> <summary>Agent "Plan 1 dev smoke (stateless)" 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>**PARTIAL.** The stateless runtime works on an ordinary platform box. On a customer fleet box, where every rootfs app on dev has to run, a `--stateless` release never deploys. | Step | Result | What happened | |---|---|---| | 1. Stateful version | PASS | Fleet rootfs app s1 and box binary app b1 both served and wrote SQLite. Each had a database file, Litestream copies in S3 and a `lock.json` lease. | | 2. `--stateless` version | FAIL on fleet, PASS on box | **Fleet r10r box-1:** s2 never took over. Every 15 s the box logs `release attempt onto s2 abandoned: replicas: fenced`, so s1 kept serving and the instance read "rolling out" for 14 minutes. **dennis-stenciling:** b2 served, confirmed by a GET with `x-carlos-version: b2` and no `--db` argument. | | 3. Nothing stateful in use (box) | PASS | No `CARLOS_DB` in the process environment and nothing holds the database files. Litestream stopped, and `lock.json` was removed and not taken again. The old database bytes were identical at 01:14 and 01:19. | | 4. Exercises | PARTIAL | `carlos run` passed, and so did an interactive session (`run -it`, Ctrl-D, exit 0). Workers were not tested: binary apps have none and the fleet copy never started. `carlos restart` was refused for a box that isn't the console's box, so I killed the smoke app's own process instead; it came back on the next request, still stateless. The failed release was a build that fails its health check (binary apps have no release command); the deploy stopped and b2 kept serving. | | 5. Refusals | PASS | The v0.34.0 CLI has no `--copies` flag. The Plan 2 CLI, built from this branch into scratch and since deleted, got `not found: check --account and --app, and that your token's address is a member` because the v0.34.0 console has no copies route. No other app changed. | | 6. Cleanup | PASS | Both instances deleted and both apps trashed (purge 2026-12-04). Both hosts now answer 503 and no smoke processes are left. Scratch is deleted except the evidence file. Parked data dirs, empty slices and S3 prefixes stay until the purge, as for other trashed apps. | **Departures from the brief:** - An unregioned box app can't be made on dev: every new app gets a region, and IE is HA. So the box half ran in region uk (dennis-stenciling). - Rootfs apps can only run on fleets, so the rootfs half ran on fleet r10r box-1. - Both apps used a small Go program I wrote, because no existing Rails sample boots without a database. - All box evidence was gathered read-only over SSM, apart from killing the smoke app's own process. **Findings:** - **F1 (blocker):** A fleet box asks the console for its coordinator lease by posting to the tunnel host (`CARLOS_TUNNEL_URL` + `/api/fleet/replicas/...`; `internal/host/agent.go:605`, `internal/host/replicacoordinator.go:81`). On that hostname the edge only forwards `/store/` to the console. Everything else goes to the tunnel hub, which answers 404 (`internal/edge/edge.go` around 1917-1928). The box treats the 404 as `replicas.ErrFenced`. A test POST supports this: the tunnel host's 404 lacks the `x-carlos-version` header the console sends, and the console box (sophie-knitting) logged nothing. So no stateless rootfs app can deploy on v0.34.0, though the old build keeps serving. The fix is to forward that path on the tunnel host to the console, or give the box the console's address, plus a test that goes through the real edge. - **F1b:** The stuck rollout tells the owner nothing. Logs repeat "starting build s2" and the list says "rolling out", with no failure or reason. - **F2:** `carlos restart --host` only works for instances on the console's box. This predates stateless replicas. - **F3:** `apps set --size small` on a fleet app was refused by checking dennis-stenciling's memory, a box the app can't run on. - **F4:** `apps create --place fleet/...` printed "Region: Dublin (IE), from your timezone". - **F5:** `instances list` shows a database size for the stateless instance; it is counting the old stateful files. - **F6:** The copies refusal reads as a wrong app or account name rather than "this console doesn't support copies yet". - **F7:** A "wake failed: its build could not be installed" line was logged before the first install finished. **Not covered until F1 is fixed:** stateless workers, a release command succeeding and failing, an always-on restart with no request, and the rootfs stateful-to-stateless switch. **Incident:** a mistyped shell step overwrote `go.mod` in the stateless-replicas-2 worktree. I restored it straight away with `git checkout -- go.mod` and the worktree is clean. Nothing was committed or pushed. Evidence file: `/home/paulca/.cache/sr-plan1-smoke/evidence.md`</result> <usage><subagent_tokens>194943</subagent_tokens><tool_uses>105</tool_uses><duration_ms>1394425</duration_ms></usage> </task-notification>
<paseo-system version="1" kind="agent-message" source-agent-id="78223e69-0073-4772-bcd6-25641b472a31" message-id="ca9e8434-ab3b-42fa-ab4e-c824e0e0b61f" source-agent-title="Region HA P3a dev rollout (executing approved card)"> Region HA P3a dev window OPEN now (2026-11-04 ~07:50Z), executor 78223e6. Sequence: dev-only release v0.34.1 from main 38cda89 (dev boxes, then dev console), then the dev ingress NLB apply (new resources only), then CARLOS_GROUP_ADMISSION opt-in on leo then sophie with attended carlos-edge restarts (about 20-40 s of 503 + Retry-After on non-exempt tenant routes per box; the dev console is exempt but blips 1-2 s), then a short restart drill on each box. DEV CHANNEL FROZEN until I post "P3a window closed" on #421: please do not cut/promote any dev release, roll, restart carlos-edge, or edit host.env on sophie or leo until then. Log: ~/.cache/region-ha-next/p3a-log.md. Reply via paseo send 78223e6 if you have something in flight on dev. No action needed otherwise. </paseo-system>
Attributed to this commit: 60.9 g CO₂e (7,851,540 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-replicas-2-placement, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
README.mdLoading diff…
approved_stateless_replicas_copy_test.goLoading diff…
cmd/console/member.goLoading diff…
cmd/console/member_demo_test.goLoading diff…
docs/superpowers/notes/census-claims-stateless-coordinator-route.tsvLoading diff…
docs/superpowers/notes/census-proposal-region-ha-p3a.mdLoading diff…
docs/superpowers/notes/census-proposal-stateless-coordinator-route.mdLoading diff…
docs/superpowers/notes/census-proposal-stateless-replicas-2.mdLoading diff…
docs/superpowers/notes/census-region-ha-p3a-claims.tsvLoading diff…
docs/superpowers/plans/2026-11-01-region-ha-p3-group.mdLoading diff…
docs/superpowers/plans/2026-11-01-stateless-replicas-copy.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P3-R2.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P3-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P3-R2.mdLoading diff…
docs/superpowers/reviews/REVIEW-BRIEF-REGION-HA-P3A-BRANCH.mdLoading diff…
docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.mdLoading diff…
docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.mdLoading diff…
infra/modules/region-host/group_alarms.tfLoading diff…
infra/modules/region-host/ingress/alarms.tfLoading diff…
infra/modules/region-host/ingress/main.tfLoading diff…
infra/modules/region-host/ingress/outputs.tfLoading diff…
infra/modules/region-host/ingress/tests/fixed-targets/main.tfLoading diff…
infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hclLoading diff…
infra/modules/region-host/ingress/tests/fixed-targets/variables.tfLoading diff…
infra/modules/region-host/ingress/tests/fixed-targets/versions.tfLoading diff…
infra/modules/region-host/ingress/tests/group_ingress.tftest.hclLoading diff…
infra/modules/region-host/ingress/variables.tfLoading diff…
infra/modules/region-host/ingress/versions.tfLoading diff…
infra/modules/region-host/tests/fixed_state_unchanged.tftest.hclLoading diff…
infra/modules/region-host/tests/group_alarms.tftest.hclLoading diff…
instances_cli.goLoading diff…
instances_rollout_test.goLoading diff…
internal/activator/activator.goLoading diff…
internal/activator/backend_exec.goLoading diff…
internal/activator/backend_rootfs.goLoading diff…
internal/activator/claimwake.goLoading diff…
internal/activator/cmd.goLoading diff…
internal/activator/cmdunit.goLoading diff…
internal/activator/containment.goLoading diff…
internal/activator/genbackend.goLoading diff…
internal/activator/genservice.goLoading diff…
internal/activator/group_admission.goLoading diff…
internal/activator/group_admission_test.goLoading diff…
internal/activator/hawake.goLoading diff…
internal/activator/rootfsworkers.goLoading diff…
internal/activator/stateless_assignment_test.goLoading diff…
internal/activator/swap.goLoading diff…
internal/activator/swap_error_test.goLoading diff…
internal/activator/swapadmit.goLoading diff…
internal/activator/wakeplan.goLoading diff…
internal/activator/workerbuild.goLoading diff…
internal/boxroles/roles.goLoading diff…
internal/boxroles/roles_test.goLoading diff…
internal/console/apiplacements.goLoading diff…
internal/console/boxroles_test.goLoading diff…
internal/console/demo_members.goLoading diff…
internal/console/instancepage.goLoading diff…
internal/console/instancesplacement.goLoading diff…
internal/console/member_demo_test.goLoading diff…
internal/console/swapcopy_truth_test.goLoading diff…
internal/edge/admission_exact_test.goLoading diff…
internal/edge/admission_export_test.goLoading diff…
internal/edge/boxroles_test.goLoading diff…
internal/edge/edge.goLoading diff…
internal/edge/group_admission.goLoading diff…
internal/edge/group_admission_external_test.goLoading diff…
internal/edge/homemap.goLoading diff…
internal/edge/lbhealth.goLoading diff…
internal/edge/replicaconsole.goLoading diff…
internal/edge/replicaconsole_test.goLoading diff…
internal/edge/wakeplacement.goLoading diff…
internal/edge/wakeplacement_test.goLoading diff…
internal/edgesfile/admission.goLoading diff…
internal/edgesfile/admission_test.goLoading diff…
internal/edgesfile/edgesfile.goLoading diff…
internal/edgesfile/homeelect.goLoading diff…
internal/edgesfile/snapshot.goLoading diff…
internal/groupadmission/observation.goLoading diff…
internal/groupadmission/state.goLoading diff…
internal/groupadmission/state_test.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/booting_publication_test.goLoading diff…
internal/host/boxroles.goLoading diff…
internal/host/boxroles_config.goLoading diff…
internal/host/boxroles_config_linux.goLoading diff…
internal/host/boxroles_config_other.goLoading diff…
internal/host/boxroles_config_test.goLoading diff…
internal/host/boxroles_test.goLoading diff…
internal/host/edgesfile.goLoading diff…
internal/host/group_admission.goLoading diff…
internal/host/group_admission_fix_test.goLoading diff…
internal/host/group_admission_test.goLoading diff…
internal/host/group_metrics.goLoading diff…
internal/host/group_metrics_test.goLoading diff…
internal/host/memwatch.goLoading diff…
internal/host/replica_retirement_unreachable_test.goLoading diff…
internal/host/replicacoordinator.goLoading diff…
internal/host/replicacoordinator_test.goLoading diff…
internal/host/schedule_wiring.goLoading diff…
internal/host/startup_largebox_linux_test.goLoading diff…
internal/hostenv/boxroles_test.goLoading diff…
internal/hostenv/hostenv.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-stateless-coordinator-route.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsvLoading diff…
internal/release/boxroles_test.goLoading diff…
internal/release/changeindex.goLoading diff…
internal/replicas/types.goLoading diff…
internal/rollout/fake_test.goLoading diff…
internal/rollout/queue.goLoading diff…
internal/rollout/scheduler.goLoading diff…
internal/rollout/status.goLoading diff…
internal/rollout/status_test.goLoading diff…
scripts/check-region-group-plan.pyLoading diff…
scripts/check_region_group_plan_test.pyLoading diff…
scripts/group_alarm_plan_test.pyLoading diff…
scripts/testdata/region-group-plan/fixed-eip-reassociation.jsonLoading diff…
scripts/testdata/region-group-plan/fixed-identities.jsonLoading diff…
scripts/testdata/region-group-plan/fixed-identity-probes.jsonLoading diff…
scripts/testdata/region-group-plan/new-ingress.jsonLoading diff…
scripts/testdata/region-group-plan/regional-alarms.jsonLoading diff…
scripts/testdata/region-group-plan/targeted-fixed-user-data.jsonLoading diff…
scripts/testdata/region-group-plan/tofu-1.12-fixed-replace.jsonLoading diff…
scripts/testdata/region-group-plan/tofu-1.12-identity.jsonLoading diff…
scripts/testdata/region-group-plan/unchanged-move.jsonLoading diff…