Merge origin/main into stateless-replicas-1-runtime
Keep main's app-list and region-HA record-write inventory beneath the stateless entries. Keep every main root-read chain entry and regenerate the stateless-replicas-1 overlay last, on top of region-ha-p1b3a. Preserve the branch's final-review census claims and record the merged runAgent wiring. Record-write digests are unchanged. Verification passes with the two HA fixture signature adaptations that follow in a separate commit. No push.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
approved_moves_copy_test.go+1 −0cmd/console/main.go+10 −0cmd/console/main_test.go+4 −0cmd/console/regioningress_test.go+30 −0cmd/console/stripesetup_script_test.go+620 −0deploy/billing/pricebook-2026-10-27-v1.json+23 −0deploy/billing/pricebook-2026-11-01-v1.json+23 −0deploy/billing/sponsored-unlimited.json+19 −0docs/site/cli.md+14 −0docs/superpowers/notes/census-proposal-region-ha-p1b3a.md+31 −0docs/superpowers/notes/census-proposal-stateless-replicas-1.md+4 −4docs/superpowers/notes/census-region-ha-p1b3a-claims.md+9 −0docs/superpowers/notes/region-ha-p1b3a-followups.md+18 −0docs/superpowers/plans/2026-10-06-moves-phase1-copy.md+1 −0docs/superpowers/plans/2026-10-27-plans-6c-stripe-setup.md+399 −0docs/superpowers/plans/2026-11-01-region-ha-p1b3-placement.md+364 −0docs/superpowers/plans/2026-11-01-region-ha-p2-console.md+374 −0docs/superpowers/plans/2026-11-01-team-service.md+56 −1docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R1.md+79 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R2.md+106 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R1.md+77 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R2.md+102 −0docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R3.md+97 −0docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R1.md+124 −0docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R2.md+77 −0docs/superpowers/plans/REVIEW-REGION-HA-P2-R1.md+112 −0docs/superpowers/plans/REVIEW-REGION-HA-P2-R2.md+119 −0docs/superpowers/plans/REVIEW-REGION-HA-P2-R3.md+80 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md+36 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R1.md+78 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R2.md+99 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R3-storage.md+85 −0docs/superpowers/reviews/REVIEW-BRIEF-region-ha-p2a-branch.md+46 −0docs/superpowers/reviews/region-ha-p2a-branch-review-r1.md+72 −0domains_cli_test.go+40 −0internal/activator/activator.go+4 −1internal/activator/awakeapps.go+19 −0internal/activator/awakeapps_test.go+67 −0internal/activator/hacache.go+186 −51internal/activator/haforward.go+65 −26internal/activator/haforward_test.go+17 −17internal/activator/haplacement.go+203 −0internal/activator/haplacement_peers.go+125 −0internal/activator/haplacement_test.go+786 −0internal/activator/hasuspect_test.go+18 −10internal/boxchoice/boxchoice.go+6 −5internal/boxchoice/coldwake.go+37 −0internal/boxchoice/coldwake_test.go+127 −0internal/boxchoice/policy.go+3 −3internal/console/apidomains.go+1 −1internal/console/apiinstanceimport.go+3 −3internal/console/apiinstancemove.go+10 −2internal/console/apiinstancemove_offline.go+5 −1internal/console/apiinstances.go+5 −0internal/console/apiplacements.go+95 −2internal/console/applist.go+303 −0internal/console/applist_test.go+427 −0internal/console/applistcopy.go+25 −0internal/console/applistview_test.go+91 −0internal/console/appsettings.go+11 −4internal/console/appstarcleanup_test.go+79 −0internal/console/claim_invariant_fixtures_test.go+22 −0internal/console/claim_invariant_probes_nonapp_test.go+18 −0internal/console/createleftovers.go+43 −8internal/console/fleets.go+16 −2internal/console/ha_born_test.go+11 −4internal/console/hacreate.go+54 −0internal/console/hacreate_test.go+656 −0internal/console/hap2_wiring_test.go+733 −0internal/console/hatransfers_test.go+482 −0internal/console/icons.go+4 −0internal/console/ownership.go+1 −0internal/console/plansponsor_file_test.go+41 −0internal/console/regioningress.go+31 −0internal/console/regioningress_test.go+504 −0internal/console/rootfs_test.go+1 −0internal/console/seedmove.go+25 −19internal/console/server.go+43 −11internal/console/server_test.go+2 −2internal/console/store.go+11 −0internal/console/store_gate.go+1 −0internal/console/templates/app_settings.html+17 −0internal/console/templates/apps.html+86 −17internal/console/testdata/claim-routes.txt+2 −0internal/console/view.go+15 −32internal/edge/forwardha.go+43 −7internal/edge/forwardha_test.go+77 −8internal/edge/haplacement_test.go+78 −0internal/edge/homemap.go+12 −1internal/edge/wakeplacement.go+176 −0internal/edge/wakeplacement_test.go+392 −0internal/host/agent.go+1 −0internal/host/edgesfile.go+3 −2internal/host/haawake_source.go+23 −0internal/host/haforward_wiring_test.go+1 −1internal/host/haplacement.go+19 −0internal/host/haplacement_budget_test.go+333 −0internal/host/haplacement_fold_test.go+93 −0internal/host/haplacement_root_linux_test.go+897 −0internal/host/haplacement_scenarios_root_linux_test.go+962 −0internal/host/haplacement_wiring_test.go+451 −0internal/host/headroom.go+1 −0internal/host/headroom_test.go+127 −0internal/provision/app_lists_census_test.go+33 −0internal/provision/region_ha_p2a_transfers_census_test.go+32 −0internal/provision/stateless_replicas_census_test.go+3 −1internal/provision/testdata/plan14-root-reads-chain.tsv+2 −1internal/provision/testdata/plan14-root-reads-region-ha-p1b3a.tsv+19 −0internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv+4 −4internal/sim/regionha/actions_test.go+245 −0internal/sim/regionha/invariants_test.go+6 −0internal/sim/regionha/rules_test.go+11 −0internal/sim/regionha/sim_test.go+1 −1internal/sim/regionha/witness_test.go+343 −0internal/sim/regionha/world_test.go+178 −21internal/team/actions.go+566 −0internal/team/actions_test.go+212 −0internal/team/authority.go+155 −0internal/team/budget.go+297 −0internal/team/budget_test.go+159 −0internal/team/clock.go+40 −0internal/team/commit_recovery_test.go+189 −0internal/team/evidence.go+523 −0internal/team/evidence_test.go+183 −0internal/team/fixture.go+671 −0internal/team/fixture_test.go+478 −0internal/team/harness_test.go+164 −0internal/team/jobs.go+548 −0internal/team/model.go+950 −0internal/team/policy.go+184 −0internal/team/recovery.go+200 −0internal/team/review_regression_test.go+336 −0internal/team/scheduler.go+434 −0internal/team/scheduler_test.go+272 −0internal/team/store.go+532 −0internal/team/store_test.go+200 −0internal/team/storeguard.go+68 −0internal/team/storelock_other.go+16 −0internal/team/storelock_unix.go+28 −0internal/team/storelock_windows.go+31 −0internal/teamcontract/authority_test.go+220 −0internal/teamcontract/policy_test.go+52 −0scripts/stripe-setup.sh+719 −0
Intent
<task-notification> <task-id>bmcz9e7pw</task-id> <tool-use-id>toolu_01Eo5pkkZn5U5BXskZgRwwYj</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/bmcz9e7pw.output</output-file> <status>completed</status> <summary>Background command "Wait for residual fix" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>a27f6a590acb3d65a</task-id> <tool-use-id>toolu_019YDiRNQHjSxRCYUXYogdtZ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/a27f6a590acb3d65a.output</output-file> <status>completed</status> <summary>Agent "Re-review residual fix" 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>**Residual verdict: ADDRESSED.** - **The gate:** `internal/activator/activator.go:2662` marks each wake attempt as unplanned or planned. `internal/activator/stateless.go:96-103` then runs for an unplanned wake on a route that isn't stateless-projected. It reads only the local `id.StagedPath + ".manifest.json"` sibling. If that file is missing, unreadable, not stateless, or for a different app or version, it returns stateful before the GoodDigest shortcut and before `a.StorageDeclaration`. So `storageDeclaration` (`internal/host/agent.go:3750`, wired at `agent.go:609`) is never called and the store is never opened. - **Both wake points use it:** the pre-lease call (`activator.go:2681`, reached for held or pinned identities) and the post-lease call for captured or unmanaged staged rows (`activator.go:2929`). Both share the same context, so a swap-off box (no planner, no good build) makes zero GETs on every wake. This doesn't depend on caching, and an agent restart doesn't bring the reads back. - **Witness:** `internal/host/stateless_stateful_linux_test.go:113` (`TestStatelessStatefulUnplannedRealDeclarationNoGETs`) uses the real `storageDeclaration` with a counting store. It has no Planner, generations off, and an empty GoodVersion and GoodDigest. Each of the three wakes per case gets a fresh service and cache, and it asserts the selected build started. The cases are missing, unreadable, no-box-artifact and stateful, and each asserts zero GETs. - **Ran it myself:** I ran the witness at the commit (a clean export in `$TMPDIR`, since removed) and it passed. The report's mutation (gate off gives GETs=3) is consistent with the code. - **Updated test:** `TestStatelessStatefulWakeHashesOneCapture` now expects zero declaration calls (`stateless_fix2_linux_test.go:65`). **Discovery path** - **First route:** adoption seeds the route's stateless projection from the staged manifest (`internal/release/adopt.go:1844-1848`). A projected wake keeps the existing stateless path with canonical verification. - **Second route, for unprojected builds:** a stateless sibling is only a hint. It sets `rt.Stateless=true`, which skips the GoodDigest shortcut, forces canonical verification with `knownStateless=true`, and refuses if the canonical evidence is missing or the digest doesn't match. `TestStatelessUnplannedSiblingDiscovery` covers the missing and mismatch cases, and it passed when I ran it at the commit. - **What happens after a stateless result:** after the lease, the wake returns `wakeModeChange` (`activator.go:2936`), and `doWake` (`activator.go:2396-2416`) retries as a planned wake. The retry's `storageDeclaration` call hits the memo, because the key is account, app, version and digest and only verified results are cached. So the retry adds no second GET. This retry machinery already existed at c696e01b; the commit only changes what triggers it. - **Stateful builds:** their sibling is either absent or says stateless=false, so discovery adds no bucket GET for them. The only new cost is one local file read. - **The DB window:** a stateless build can run with a database only when it has no projection and its sibling is missing, unreadable, or doesn't match the app or version. That is the window R18 and R26 accepted. - **Inherited, not new:** for an unprojected stateless build, Acquire and Restore still run before discovery, and the report says so. That was equally true at c696e01b. **New breakage (this diff): none Critical or Important.** Pinned wakes (`e.pin`, not planned) also take the gate. A stateful pin now skips a canonical GET it used to make, which is still stateful, and a stateless pin is projected so it bypasses the gate. The swap paths (`swap.go:357`, `swaphold.go:525`) run in their own context without the new marker. Outside the diff, but it affects merging: the worktree is in the middle of merging origin/main (MERGE_HEAD c59715e7, 143 files staged). In that merged tree, `internal/host` fails to build. `internal/host/haplacement_wiring_test.go:359` comes from main and passes a `func(...) (provision.LifetimeEntry, error)` where the branch now expects `activator.RecordFacts`. Git reports no conflict, but the merge won't compile, and R28's "CI green on the tip with origin/main merged in" will fail until it's fixed. The activator tests do pass in the merged tree. **Out of scope (minor)** - The sibling is read with `os.ReadFile`, while the release code reads siblings with `safefile.ReadFile`. The content can only demand canonical verification and can't grant stateless mode, so the impact is low. - The App and Version match is strict. A naming difference would silently fall into the R18 window rather than refuse. - The retry after discovery builds a synthetic planned plan on a box with no planner, so `publishBeforeExec` and `planGate` run on it. This existed before this commit. **Census:** consistent. Only `Service.storageMode` gained new reads (`+file:ReadFile`, `+registry:App`, `+registry:Stateless`). `Service.doWakeOnce` was re-hashed for a context-only change. Both dispositions carry an R28 basis that matches the code. The `internal/activator` coverage envelope was re-pinned, the chain seal updated from `2d02e01e…` to `8df3b252…`, and no record-write digest changed. Nothing gains root authority or writes. **Ready to merge (dormant, default-off)? Yes** for commit a160186e. First, though, the in-progress origin/main merge needs the `haplacement_wiring_test.go` type fix so `internal/host` builds and CI can go green.</result> <usage><subagent_tokens>78042</subagent_tokens><tool_uses>21</tool_uses><duration_ms>233700</duration_ms></usage> </task-notification>
approved_moves_copy_test.goLoading diff…
cmd/console/main.goLoading diff…
cmd/console/main_test.goLoading diff…
cmd/console/regioningress_test.goLoading diff…
cmd/console/stripesetup_script_test.goLoading diff…
deploy/billing/pricebook-2026-10-27-v1.jsonLoading diff…
deploy/billing/pricebook-2026-11-01-v1.jsonLoading diff…
deploy/billing/sponsored-unlimited.jsonLoading diff…
docs/site/cli.mdLoading diff…
docs/superpowers/notes/census-proposal-region-ha-p1b3a.mdLoading diff…
docs/superpowers/notes/census-proposal-stateless-replicas-1.mdLoading diff…
docs/superpowers/notes/census-region-ha-p1b3a-claims.mdLoading diff…
docs/superpowers/notes/region-ha-p1b3a-followups.mdLoading diff…
docs/superpowers/plans/2026-10-06-moves-phase1-copy.mdLoading diff…
docs/superpowers/plans/2026-10-27-plans-6c-stripe-setup.mdLoading diff…
docs/superpowers/plans/2026-11-01-region-ha-p1b3-placement.mdLoading diff…
docs/superpowers/plans/2026-11-01-region-ha-p2-console.mdLoading diff…
docs/superpowers/plans/2026-11-01-team-service.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P1B3-R2.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R2.mdLoading diff…
docs/superpowers/plans/REVIEW-BRIEF-REGION-HA-P2-R3.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P1B3-R2.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P2-R1.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P2-R2.mdLoading diff…
docs/superpowers/plans/REVIEW-REGION-HA-P2-R3.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R1.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-team-service-prototype-R3-storage.mdLoading diff…
docs/superpowers/reviews/REVIEW-BRIEF-region-ha-p2a-branch.mdLoading diff…
docs/superpowers/reviews/region-ha-p2a-branch-review-r1.mdLoading diff…
domains_cli_test.goLoading diff…
internal/activator/activator.goLoading diff…
internal/activator/awakeapps.goLoading diff…
internal/activator/awakeapps_test.goLoading diff…
internal/activator/hacache.goLoading diff…
internal/activator/haforward.goLoading diff…
internal/activator/haforward_test.goLoading diff…
internal/activator/haplacement.goLoading diff…
internal/activator/haplacement_peers.goLoading diff…
internal/activator/haplacement_test.goLoading diff…
internal/activator/hasuspect_test.goLoading diff…
internal/boxchoice/boxchoice.goLoading diff…
internal/boxchoice/coldwake.goLoading diff…
internal/boxchoice/coldwake_test.goLoading diff…
internal/boxchoice/policy.goLoading diff…
internal/console/apidomains.goLoading diff…
internal/console/apiinstanceimport.goLoading diff…
internal/console/apiinstancemove.goLoading diff…
internal/console/apiinstancemove_offline.goLoading diff…
internal/console/apiinstances.goLoading diff…
internal/console/apiplacements.goLoading diff…
internal/console/applist.goLoading diff…
internal/console/applist_test.goLoading diff…
internal/console/applistcopy.goLoading diff…
internal/console/applistview_test.goLoading diff…
internal/console/appsettings.goLoading diff…
internal/console/appstarcleanup_test.goLoading diff…
internal/console/claim_invariant_fixtures_test.goLoading diff…
internal/console/claim_invariant_probes_nonapp_test.goLoading diff…
internal/console/createleftovers.goLoading diff…
internal/console/fleets.goLoading diff…
internal/console/ha_born_test.goLoading diff…
internal/console/hacreate.goLoading diff…
internal/console/hacreate_test.goLoading diff…
internal/console/hap2_wiring_test.goLoading diff…
internal/console/hatransfers_test.goLoading diff…
internal/console/icons.goLoading diff…
internal/console/ownership.goLoading diff…
internal/console/plansponsor_file_test.goLoading diff…
internal/console/regioningress.goLoading diff…
internal/console/regioningress_test.goLoading diff…
internal/console/rootfs_test.goLoading diff…
internal/console/seedmove.goLoading diff…
internal/console/server.goLoading diff…
internal/console/server_test.goLoading diff…
internal/console/store.goLoading diff…
internal/console/store_gate.goLoading diff…
internal/console/templates/app_settings.htmlLoading diff…
internal/console/templates/apps.htmlLoading diff…
internal/console/testdata/claim-routes.txtLoading diff…
internal/console/view.goLoading diff…
internal/edge/forwardha.goLoading diff…
internal/edge/forwardha_test.goLoading diff…
internal/edge/haplacement_test.goLoading diff…
internal/edge/homemap.goLoading diff…
internal/edge/wakeplacement.goLoading diff…
internal/edge/wakeplacement_test.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/edgesfile.goLoading diff…
internal/host/haawake_source.goLoading diff…
internal/host/haforward_wiring_test.goLoading diff…
internal/host/haplacement.goLoading diff…
internal/host/haplacement_budget_test.goLoading diff…
internal/host/haplacement_fold_test.goLoading diff…
internal/host/haplacement_root_linux_test.goLoading diff…
internal/host/haplacement_scenarios_root_linux_test.goLoading diff…
internal/host/haplacement_wiring_test.goLoading diff…
internal/host/headroom.goLoading diff…
internal/host/headroom_test.goLoading diff…
internal/provision/app_lists_census_test.goLoading diff…
internal/provision/region_ha_p2a_transfers_census_test.goLoading diff…
internal/provision/stateless_replicas_census_test.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-region-ha-p1b3a.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsvLoading diff…
internal/sim/regionha/actions_test.goLoading diff…
internal/sim/regionha/invariants_test.goLoading diff…
internal/sim/regionha/rules_test.goLoading diff…
internal/sim/regionha/sim_test.goLoading diff…
internal/sim/regionha/witness_test.goLoading diff…
internal/sim/regionha/world_test.goLoading diff…
internal/team/actions.goLoading diff…
internal/team/actions_test.goLoading diff…
internal/team/authority.goLoading diff…
internal/team/budget.goLoading diff…
internal/team/budget_test.goLoading diff…
internal/team/clock.goLoading diff…
internal/team/commit_recovery_test.goLoading diff…
internal/team/evidence.goLoading diff…
internal/team/evidence_test.goLoading diff…
internal/team/fixture.goLoading diff…
internal/team/fixture_test.goLoading diff…
internal/team/harness_test.goLoading diff…
internal/team/jobs.goLoading diff…
internal/team/model.goLoading diff…
internal/team/policy.goLoading diff…
internal/team/recovery.goLoading diff…
internal/team/review_regression_test.goLoading diff…
internal/team/scheduler.goLoading diff…
internal/team/scheduler_test.goLoading diff…
internal/team/store.goLoading diff…
internal/team/store_test.goLoading diff…
internal/team/storeguard.goLoading diff…
internal/team/storelock_other.goLoading diff…
internal/team/storelock_unix.goLoading diff…
internal/team/storelock_windows.goLoading diff…
internal/teamcontract/authority_test.goLoading diff…
internal/teamcontract/policy_test.goLoading diff…
scripts/stripe-setup.shLoading diff…