carlos / platform Public

Merge origin/main into stateless-replicas-2-placement

Merge 6be08467's anonymous demos with replica placement at f96b76e9.
Preserve both parents' admission, placement and lifecycle behavior.

Resolve all thirteen conflicts:
- activator/wakeidentity.go: retain demo descriptor fences before replica
  wake returns, with the replica membership and lifetime recheck.
- console/apicli.go: retain demo mutation refusal and copies capture.
- console/fleetbox.go: refuse demo moves and retain verified stateless
  eligibility plus ordinary legacy Unit behavior.
- console/hostsused.go: retain the shared locked helper, demo reservation,
  copies admission and the admitted-record return value.
- console/lifetimes_create.go: retain demo reservation, copies name lock,
  lifetime precedence and pre-allocation admission.
- console/server.go: retain browser demo refusal and copies capture.
- console/store.go: preserve demo_id and both copies columns on rebuild.
- provision/forward.go: stamp and compare both descriptor families.
- provision/plan9_b8_census_test.go: retain both inventories and detectors,
  layering placement on main's demo inventory.
- provision/provision.go: retain Demo and ReplicaAssignment independently.
- provision/reconcile.go: retain demo identity and signed retirement rules
  beside replica projection, membership and legacy successor recovery.
- provision/testdata/plan14-root-reads-chain.tsv: keep main's chain in
  order and regenerate placement last, parented on the demo overlay.
- registry/registry.go: union 77 SQL columns, readers, writers and hashes;
  retain demo immutability and same-owner set preservation on upsert.

Refuse demo apps and fleets from multi-copy admission and placement.
Reject mixed demo/set records and routes at validation and set seeding.
Keep demo database leases without replication distinct from stateless
launches. Adapt demo create callers to the admitted-record signature.
Refresh only five changed record-write digests, each with a merge note,
and extend root-read claims for merged units. Add boundary regressions.

Validation: full requested packages and demo, demobuild and instancectl;
host's 21 failures exactly match an isolated main archive (including all
subtest names), release has only the known private-mount permission
failure. Race, Darwin/Windows/Linux arm64 builds, native build, vet and
formatting pass. Scoped merge/census review remains controller-owned.
No push or live infrastructure change.
Co-Authored-By: Codex (gpt-6-astra) <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 35f932b93104f11273ea0d5ef80ea9c45e21f808 parent f96b76eparent 6be0846
206 files changed, +23,958 −203
  • README.md +41 −0
  • cmd/console/main.go +35 −4
  • docs/superpowers/notes/agent-start-demo-1-rulings.md +90 −0
  • docs/superpowers/notes/census-agent-start-demo-1-claims.md +99 −0
  • docs/superpowers/notes/census-proposal-agent-start-demo-1.md +150 −0
  • docs/superpowers/notes/census-proposal-stateless-replicas-2.md +13 −12
  • docs/superpowers/notes/copy-agent-start-demo-1.md +157 −0
  • docs/superpowers/plans/2026-11-02-agent-start-demo-1-anonymous-apps.md +387 −0
  • docs/superpowers/plans/CONTROLLER-BRIEF-agent-start-demo-1-build.md +126 −0
  • docs/superpowers/specs/2026-11-02-agent-start-demo-design.md +388 −0
  • docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md +34 −0
  • docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md +14 −0
  • docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md +139 −0
  • internal/activator/activator.go +23 −6
  • internal/activator/backend_exec.go +20 −1
  • internal/activator/demo_durability.go +228 −0
  • internal/activator/demo_durability_test.go +660 −0
  • internal/activator/demo_policy_test.go +18 −0
  • internal/activator/escrow.go +1 −1
  • internal/activator/hafiles.go +3 −0
  • internal/activator/hasecrets.go +3 −0
  • internal/activator/hawake.go +18 −0
  • internal/activator/rootfsdb.go +5 −0
  • internal/activator/size.go +4 −0
  • internal/activator/stateless.go +7 −2
  • internal/activator/stateless_assignment_test.go +7 −1
  • internal/activator/wakeidentity.go +6 −1
  • internal/apppolicy/apppolicy.go +12 −0
  • internal/apppolicy/demo_test.go +42 −0
  • internal/console/apicli.go +6 −0
  • internal/console/apidb.go +6 −1
  • internal/console/apidemo.go +726 −0
  • internal/console/apidemo_test.go +909 −0
  • internal/console/apidemobox.go +370 −0
  • internal/console/apiinstanceimport.go +5 −0
  • internal/console/apiinstancemove.go +5 −0
  • internal/console/apiinstances.go +8 −0
  • internal/console/apiinstanceseed.go +6 −0
  • internal/console/apiinteractive.go +4 −0
  • internal/console/apipolicy.go +11 −0
  • internal/console/apitemporary.go +5 −0
  • internal/console/appcopies.go +10 −2
  • internal/console/appcopies_test.go +28 −0
  • internal/console/appregionset.go +3 −0
  • internal/console/authcli.go +1 −0
  • internal/console/claim_invariant_test.go +6 −1
  • internal/console/copiespublication.go +2 −1
  • internal/console/demo_build_test.go +22 −0
  • internal/console/demo_data.go +12 −0
  • internal/console/demo_domains.go +46 −0
  • internal/console/demo_e2e_test.go +713 −0
  • internal/console/demo_expiry.go +346 −0
  • internal/console/demo_expiry_test.go +383 −0
  • internal/console/demo_finishing_test.go +18 −0
  • internal/console/demo_gate_test.go +61 −0
  • internal/console/demo_jobs.go +558 −0
  • internal/console/demo_jobs_test.go +1,371 −0
  • internal/console/demo_live_test.go +308 −0
  • internal/console/demo_move_test.go +77 −0
  • internal/console/demo_policy.go +59 −0
  • internal/console/demo_policy_test.go +45 −0
  • internal/console/demo_publish.go +520 −0
  • internal/console/demo_publish_test.go +424 −0
  • internal/console/demo_retirement_http_test.go +245 −0
  • internal/console/demo_review_test.go +434 −0
  • internal/console/demo_settlement_r2_test.go +334 −0
  • internal/console/demo_settlement_test.go +382 −0
  • internal/console/demo_spool.go +295 −0
  • internal/console/demo_spool_test.go +104 −0
  • internal/console/demo_store.go +418 −0
  • internal/console/demo_store_test.go +348 −0
  • internal/console/domainattach.go +3 −0
  • internal/console/domainpolicy.go +1 −1
  • internal/console/expirypass.go +10 −2
  • internal/console/fleetbox.go +1 −1
  • internal/console/fleetrelabel.go +3 −0
  • internal/console/fleets.go +6 −0
  • internal/console/hacreate.go +3 −0
  • internal/console/hostsused.go +8 −0
  • internal/console/hostsused_writers_test.go +1 −1
  • internal/console/lifetimes_create.go +3 −0
  • internal/console/lifetimes_cutover.go +1 −1
  • internal/console/lifetimes_purge.go +5 −2
  • internal/console/recordcreators_guard_test.go +11 −3
  • internal/console/replicaplacement.go +3 −0
  • internal/console/replicaplacement_test.go +11 −0
  • internal/console/server.go +79 −51
  • internal/console/settle.go +3 −0
  • internal/console/store.go +17 −5
  • internal/console/store_gate.go +11 −1
  • internal/console/temprefusal.go +3 −0
  • internal/console/tempstore.go +10 −9
  • internal/console/testdata/claim-authority-sites.txt +2 −0
  • internal/console/testdata/demo/go.mod +34 −0
  • internal/console/testdata/demo/go.sum +56 −0
  • internal/console/testdata/demo/main.go +40 −0
  • internal/demo/config.go +148 −0
  • internal/demo/config_test.go +132 −0
  • internal/demo/descriptor.go +59 −0
  • internal/demo/descriptor_test.go +37 −0
  • internal/demo/identity.go +59 −0
  • internal/demo/names.go +40 −0
  • internal/demobuild/bundle.go +151 −0
  • internal/demobuild/bundle_test.go +76 −0
  • internal/demobuild/demo_retry_test.go +27 −0
  • internal/demobuild/diagnostics.go +125 −0
  • internal/demobuild/diagnostics_test.go +84 −0
  • internal/demobuild/job.go +178 −0
  • internal/demobuild/job_test.go +100 −0
  • internal/demobuild/lock.go +207 −0
  • internal/demobuild/lock_generate_test.go +169 −0
  • internal/demobuild/lock_test.go +84 −0
  • internal/demobuild/probe.go +70 −0
  • internal/demobuild/purge.go +92 −0
  • internal/demobuild/retirement.go +62 −0
  • internal/demobuild/retirement_test.go +121 −0
  • internal/demobuild/runner.go +181 −0
  • internal/demobuild/runner_test.go +122 −0
  • internal/demobuild/security_linux.go +63 −0
  • internal/demobuild/security_other.go +10 −0
  • internal/demobuild/source.go +418 −0
  • internal/demobuild/source_test.go +369 −0
  • internal/demobuild/stdlib_linux_arm64.txt +175 −0
  • internal/demobuild/testdata/starter/go.mod +34 −0
  • internal/demobuild/testdata/starter/go.sum +56 −0
  • internal/demobuild/testdata/starter/main.go +5 −0
  • internal/demobuild/toolchain.lock.json +181 −0
  • internal/demobuild/unit.go +493 −0
  • internal/demobuild/unit_kernel_linux_test.go +321 −0
  • internal/demobuild/unit_test.go +168 −0
  • internal/demobuild/worker.go +335 −0
  • internal/demobuild/worker_test.go +322 −0
  • internal/domains/reconcile.go +5 −0
  • internal/edge/demo.go +87 −0
  • internal/edge/demo_test.go +139 −0
  • internal/edge/edge.go +8 −5
  • internal/edge/pending.go +1 −1
  • internal/edge/wildcard.go +1 −1
  • internal/host/agent.go +6 −3
  • internal/host/bootstrap.go +7 −0
  • internal/host/claimstop_registry_test.go +27 −0
  • internal/host/claimstop_run.go +48 −2
  • internal/host/claimunit.go +48 −3
  • internal/host/demo_build_linux_test.go +153 −0
  • internal/host/demo_cleanup.go +157 −0
  • internal/host/demo_cleanup_test.go +107 −0
  • internal/host/demo_dev_linux_test.go +138 −0
  • internal/host/demo_jobs.go +554 −0
  • internal/host/demo_jobs_test.go +402 −0
  • internal/host/demo_mounts_test.go +181 −0
  • internal/host/demo_policy.go +124 −0
  • internal/host/demo_policy_linux_test.go +485 −0
  • internal/host/demo_policy_test.go +375 −0
  • internal/host/demo_retirement_stream_test.go +284 −0
  • internal/host/demo_toolchain.go +8 −0
  • internal/host/demo_units/demo.conf +11 −0
  • internal/host/egress_source.go +5 −0
  • internal/host/egress_source_test.go +18 −0
  • internal/host/host_test.go +2 −0
  • internal/host/systemapply.go +14 −2
  • internal/host/systemunits.go +17 −3
  • internal/host/units/carlos-demo-build@.service +63 −0
  • internal/host/units/carlos-demo-builds.slice +9 −0
  • internal/hostenv/demo_test.go +11 −0
  • internal/instancectl/client.go +10 −3
  • internal/instancectl/client_test.go +34 −0
  • internal/instancectl/demo_build.go +152 −0
  • internal/instancectl/demo_build_test.go +159 −0
  • internal/instancectl/demo_cleanup.go +227 −0
  • internal/instancectl/demo_cleanup_http_test.go +73 −0
  • internal/instancectl/demo_cleanup_test.go +160 −0
  • internal/instancectl/demo_policy.go +140 −0
  • internal/instancectl/demo_policy_test.go +250 −0
  • internal/instancectl/demo_retry_test.go +52 −0
  • internal/instancectl/demo_versions.go +106 −0
  • internal/instancectl/egress.go +7 −0
  • internal/instancectl/gen.go +12 −0
  • internal/instancectl/rootfs.go +9 −2
  • internal/instancectl/server.go +102 −3
  • internal/instancectl/size.go +3 −0
  • internal/provision/apppolicy_reconcile.go +8 −0
  • internal/provision/demo_census_test.go +62 −0
  • internal/provision/demo_policy.go +108 −0
  • internal/provision/demo_policy_test.go +149 −0
  • internal/provision/demo_routing_test.go +110 −0
  • internal/provision/forward.go +2 −1
  • internal/provision/lifetime.go +1 −1
  • internal/provision/provision.go +6 −0
  • internal/provision/reconcile.go +17 −1
  • internal/provision/record_sequence.go +6 −0
  • internal/provision/replicaassignment.go +1 −1
  • internal/provision/replicaassignment_test.go +32 −0
  • internal/provision/stateless_placement_census_test.go +11 −6
  • internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv +192 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +2 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv +37 −37
  • internal/registry/demo.go +7 −0
  • internal/registry/demo_test.go +106 −0
  • internal/registry/forward.go +7 −1
  • internal/registry/registry.go +29 −11
  • internal/registry/replicas.go +2 −2
  • internal/registry/replicas_test.go +35 −0
  • internal/release/changeindex.go +1 −1
  • internal/release/changewatch.go +21 −0
  • internal/release/changewatch_test.go +47 −0
  • internal/release/trash.go +5 −2

CI passed — run details

Intent

Human

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

Human

<task-notification> <task-id>ab58dd4bde407c350</task-id> <tool-use-id>toolu_013hxrbdjgetuPZLCJVg5jc2</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/ab58dd4bde407c350.output</output-file> <status>completed</status> <summary>Agent "Census review final delta (#280)" 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>unit | class | verdict | reason (file:line) ---|---|---|--- internal/host/fleetbind.go:statelessBindingPublisher.publishCurrent | new (accepted-legacy) | APPROVE | This is the old `publish` body moved here unchanged. The gates (stateless/ready/host/account/app/assigned, fleet placement, coordinator box, held authority, projection fence) are the same, and the only write is the existing `writeFleetBinding` holding the authority (fleetbind.go:491-537, :529). The only change is that it returns `(published bool, err)`. No new input. internal/host/fleetbind.go:statelessBindingPublisher.publish | reads (keeps legacy) | APPROVE | It is now a wrapper that calls `publishCurrent` (fleetbind.go:486-489). The reads moved with the body and nothing new is opened or followed. internal/host/replicaplacement.go:replicaPlacementWorker.run | reads (keeps legacy) | APPROVE | A `done` flag replaces the delete (replicaplacement.go:93, :126, :134). `observe` resets it when the lifetime or revision changes (:56-60) and still drops records that no longer name this box (:48-50). A no-op publish now retries with backoff instead of being dropped. No new reads. internal/activator/startrule.go: establishAssignment / reconcileAssignment / startAllowed | reads (keeps legacy) | APPROVE | Comment-only change (startrule.go:176, :337, :391). The `rt.FleetBoxes != ""` → `ErrFenced` refusal is unchanged. internal/provision/reconcile.go:convergeOwned | reads (keeps legacy) | APPROVE | The guard for clearing a legacy record over a set row now checks Provisioned, same account/app/host, `existing.Incarnation &lt;= rec.Incarnation` and a FleetBox (reconcile.go:888). That replaces the old check that the incarnation derived from CreatedAt equals ReplicaIncarnation. It mirrors the already-approved `replicaRowLifetimeAllowed` (replicaassignment.go:225). The write is still `ClearReplicaAssignment`, which compares the exact observed row inside an immediate transaction and refuses platform, canary, hold, unit, backing, tunnel, an invalid projection, or a box not in the set (registry/replicas.go:166-187). It acts only on the record's own row. All reads are registry fields it already read, plus the record's own counter. internal/provision/reconcile.go:Reconcile | reads (keeps legacy) + key-site re-digest | APPROVE | A legacy record over a set row is now skipped only when the row's incarnation is newer than the record's. Otherwise it goes to the existing retire judgement: retiredWhy, journal, ownKey (reconcile.go:2380-2390). The ownership skip now applies only to records with an assignment. The removal writers and record keys are the same. Census entry at stateless_placement_census_test.go:38 keeps its class and kinds. internal/registry/remote_dispatch.go:Registry.dispatchRemote | reads (keeps hint E2), merge | APPROVE | The merged file is exactly main's delta plus the branch's already-approved replica cases (checked with a three-way delta compare). The claim keeps both rulings, census-ruling-stateless-replicas-2 and census-ruling-managed-fleets-2a. internal/provision/provision.go:SetRecordRegion | record-writer re-digest | APPROVE | Removes an unreachable `replicaAssignmentMoveRefusal`. Line 1047 already returns `ErrFleetBoxMoved` for any record with an assignment, and the removed helper only acts on an assignment (replicaassignment.go:174-183). It still goes through `updateRecord`, keyed by account/app/host and CAS'd on the ETag. It changes only Region, FleetBox and FleetBoxAt; every other field is kept (provision.go:1043-1065). Entry at stateless_placement_census_test.go:72. internal/console/authcli.go:Server.registerCLIRoutes | key-site re-digest, merge | APPROVE | The merged function is exactly main (0b3098cb) plus the branch's one copies route with `svcrole.Set{}` (authcli.go:1031). Main's managed-fleet routes and limiters are kept. No record writer is added. The entry at stateless_placement_census_test.go:85 overrides main's 4a26d98e entry with the same class and kinds. managed_fleets_2a_task5_census_test.go and the stateless chain base | inventory, merge | APPROVE | The file is identical to main's. The stateless inventory now builds on `managedFleets2aTask5WriteCensusInventory()` (stateless_placement_census_test.go:6), so main's entries are kept. console copiesRefusal / loadFleetViewRequiredAt | not root (console) | APPROVE | It tightens the check: the copies route now requires a complete view (appcopies.go:38, :235; fleetbox.go:286-309). It is outside root scope and not a record writer. @coverage `.`, internal/activator, internal/host, internal/provision, internal/registry, internal/release | envelope | APPROVE | Each pin moved only because of the fix files above or the merge. Every non-doc file the merge changed is either identical to 0b3098cb or exactly main's delta plus the branch's delta: fleets.go, remote_dispatch.go, and the console files. internal/release, compute, fleetstore, hostops and infra/region-host are byte-identical to main. Chain | chain | APPROVE | `plan14-root-reads-chain.tsv` at f96b76e9 is every line of 0b3098cb in order, with one line added last: `plan14-root-reads-stateless-replicas-2.tsv 94aded84…`. Its parent f85f8dab… is main's last overlay (managed-fleets-2a), and the card's seal matches. The managed-fleets-2a and region-host-store-deny overlays are byte-identical to main's. I found no root read that now opens, runs, queries or follows a path or input a tenant, an app or a box agent can create, write or name. I ran `TestPlan14RootReadCensus`, `TestPlan9B8RecordWriteCensus` and `TestCensusScopeIsTheRootBinary` at f96b76e9 and all three pass. Two fixture tests, `TestCensusScopeGuard` and `TestCensusLeftPackageIsAnApproval`, could not run because the Go build cache is read-only in this sandbox. They were not run, so CI needs to cover them. origin/main has moved to 6be08467 since 0b3098cb. I checked against 0b3098cb as the brief asked, so a rebase or re-merge would need a fresh chain check. Census: APPROVED at f96b76e9 (seal `f85f8dabebc725fa75b88853af634fa9ca08323721f879e220da44c1e3fdbc38` → `94aded84542669f6630a5edd540460c059acf81b49467c3276efea3f22154c54`)</result> <usage><subagent_tokens>89233</subagent_tokens><tool_uses>26</tool_uses><duration_ms>225044</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>a5e962c458ae91502</task-id> <tool-use-id>toolu_01HPJHftRS8kjv9aSoLfARKK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/a5e962c458ae91502.output</output-file> <status>completed</status> <summary>Agent "Re-review final fix wave + merge" 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>### Finding Verdicts - **I1: legacy successor rows unrecoverable after set removal** — ADDRESSED. `internal/provision/reconcile.go:2380-2390`: a legacy record (`rec.ReplicaAssignment == nil`) only `continue`s when `rt.Incarnation &gt; rec.Incarnation`; otherwise it falls through to the existing ownership/removal judgement (owner: in `recs` so `retiredWhy`/`ownKey` keep it; non-owner box B: skipped at `:1375`, then removed as record gone via the judge path `:2452`). `convergeOwned` `:887-895` now clears the four set columns via the exact-row `ClearReplicaAssignment` CAS when the row is provisioned, same account/app/host, `existing.Incarnation &lt;= rec.Incarnation` and `rec.FleetBox != ""`. The set-record guards (`replicaAssignmentAdmitted`/`replicaRowLifetimeAllowed`) are unchanged, so P11 holds. `TestReplicaReconcileLegacySuccessor` (`internal/provision/replicas_test.go:270-324`) covers A and B, judged and unjudged, older/installed/newer. - **I2: one-box fleet answered C06 instead of C03** — ADDRESSED. `internal/console/appcopies.go:235-250`: admission reads `loadFleetViewRequiredAt(..., true)` and refuses `unread()` only on `!v.Complete`; `replicasActive` (`:37-39`) keys on `Complete`, and capacity counts `replicaEligible` boxes. `internal/console/fleetbox.go:283-309`: the `&lt;2 boxes` early return is skipped only when `requireComplete`, so labelling callers keep their read budget. `TestCopiesSingleBoxCapacity` (`appcopies_test.go:160-188`) asserts 409/C03 with one eligible box and 503/C06 for a corrupt heartbeat. - **I3: coordinator entry retried at the 1-minute cap forever** — ADDRESSED. `internal/host/replicaplacement.go:23,133-134`: completed work keeps a `done` marker and `run` skips it (`:93`); `observe` (`:56-60`) clears it only on a changed `CreatedAt` or assignment revision. `internal/host/fleetbind.go:486-536`: `publishCurrent` returns `true` only when the matching state is already published or the authority-gated write landed; every skip path returns `false`, so acquisition alone never settles. `TestReplicaCoordinatorPlacementSettlesUntilRevisionChanges` (`replica_request_budget_test.go:182-247`) is bounded (10 s context, logical clock) and checks pending-before-coordinator, settle, no work past the cap, and re-arm on a new revision. - **M1: "bypass" comments** — ADDRESSED. `internal/activator/startrule.go:176,337,391` now say set projections are refused here; code unchanged (`ErrFenced`). - **M2: dead move refusal in SetRecordRegion** — ADDRESSED. `internal/provision/provision.go:1047-1052` keeps only the `ReplicaAssignment != nil` → `ErrFleetBoxMoved` check. `replicaAssignmentMoveRefusal` is still live in `internal/provision/fleetbox.go:64`, so no orphaned function. - **M3: SR-2-C14/C15 under carlos ship** — ADDRESSED. `docs/site/cli.md:235-237`: both paragraphs sit in `### carlos apps` immediately after the `carlos apps set --instance-control` discussion and before `### carlos ship` (`:258`); the ship section no longer carries them. There is no separate `### carlos apps set` heading in the file, so this is the right home. Placement survived the merge. ### New Breakage in the Fix Diff or the Merge None found. - Fix diff: the stored `review-e14030d7..558bd8b0.diff` is byte-identical to `git diff e14030d7 558bd8b0` apart from a 24-line header. Retired work (`retired` branch) now also stays `done` instead of being deleted and re-queued on the next unchanged observation; that is a quieter behaviour, not a regression. - Merge `f96b76e9` (`--remerge-diff`): only six files carry resolution edits. `svcroutes_test.go` closed-door count 85+1 = 86 with the copies door named; `plan9_b8_census_test.go` keeps `statelessPlacementWriteCensusInventory` as effective inventory and `stateless_placement_census_test.go:6` rebases it on `managedFleets2aTask5WriteCensusInventory`, so both record-write inventories apply; `registerCLIRoutes` re-digested; root-reads chain keeps main's region-host and managed-fleets-2a overlays and re-seals the branch overlay last (`f85f8d…` → `94aded…`). No content from either side was dropped. - Managed fleets 2a vs this branch: main's managed code writes only fleet-table rows (`registry/fleets.go`: `AddManagedFleetBox` as active with `draining_since`, `ClearFleetBoxDraining`, `SetManagedFleetBucket`, `DeleteEmptyManagedFleet`) and one `SetFleetBoxStatus(..., "detached")` (`internal/console/managedworker.go:663`). It writes no instance records, labels or `FleetBinding`s, so none of the branch's fences (`replicaFieldsFixed` at `record_sequence.go:143`, the `SetRecordFleetBox` set refusal at `fleetbox.go:61`, the registry route inventory, the record-write census) are hit or bypassed. From the branch's side, managed boxes reach the placement pass only via `ListFleetBoxes` active rows: a joining managed box is active+draining, `fleetBoxViewOf` (`fleetbox.go:80-86`) marks it `Draining`, and `destinationFor` (`:120-125`) excludes draining boxes, so it is neither a replica spare nor counted toward C03 capacity until `ClearFleetBoxDraining` on ready; a managed detach drops it from `v.Boxes` and the pass reassigns exactly as for a BYO detach. The merged `drainBox` orders cleanly: managed readiness check → branch's replica-row skip in the plan loop → `finishManagedDrain` → `SetFleetBoxDraining` → `reconcileReplicaFleet` → relabels. Reachability today: managed needs `cfg.ManagedCompute`/`ManagedStorage` wired (`managedapi.go:271`, worker guards), and copies needs a per-app `--copies` config; both are off, and with no copies config and no assignment every branch path is the pre-existing one, so the merge gate "inert for existing apps" holds and no managed/replica interaction is reachable. ### Out-of-Scope Observations - Non-coordinator members of an assignment never reach a `done` branch in `run` (`replicaplacement.go:116-127`), so their entries keep retrying at the 1-minute cap; each retry is one local `reg.Get`, no network. Pre-existing, cheap, but worth a later tidy. - A fieldless legacy record (`Incarnation 0`) facing a judged set row (`Incarnation &gt; 0`) is left alone on both boxes by the new `rt.Incarnation &gt; rec.Incarnation` rule. That is the P11 ruling applied literally; just noting the shape is possible. - The report's census pass is self-consistent but the two re-digested record writers (`Reconcile`, `SetRecordRegion`) still need the controller's independent census approval, as the report says. ### Verdict **Ready to merge?** Yes, pending the controller's independent census approval of the two re-digested writers; all six findings are fixed with tests, the merge resolution drops nothing, and managed fleets 2a touches no path this branch fences.</result> <usage><subagent_tokens>115012</subagent_tokens><tool_uses>17</tool_uses><duration_ms>309523</duration_ms></usage> </task-notification>

Human

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

Attributed to this commit: 79.6 g CO₂e (5,462,769 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.md

Loading diff…

cmd/console/main.go

Loading diff…

docs/superpowers/notes/agent-start-demo-1-rulings.md

Loading diff…

docs/superpowers/notes/census-agent-start-demo-1-claims.md

Loading diff…

docs/superpowers/notes/census-proposal-agent-start-demo-1.md

Loading diff…

docs/superpowers/notes/census-proposal-stateless-replicas-2.md

Loading diff…

docs/superpowers/notes/copy-agent-start-demo-1.md

Loading diff…

docs/superpowers/plans/2026-11-02-agent-start-demo-1-anonymous-apps.md

Loading diff…

docs/superpowers/plans/CONTROLLER-BRIEF-agent-start-demo-1-build.md

Loading diff…

docs/superpowers/specs/2026-11-02-agent-start-demo-design.md

Loading diff…

docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md

Loading diff…

docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md

Loading diff…

docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md

Loading diff…

internal/activator/activator.go

Loading diff…

internal/activator/backend_exec.go

Loading diff…

internal/activator/demo_durability.go

Loading diff…

internal/activator/demo_durability_test.go

Loading diff…

internal/activator/demo_policy_test.go

Loading diff…

internal/activator/escrow.go

Loading diff…

internal/activator/hafiles.go

Loading diff…

internal/activator/hasecrets.go

Loading diff…

internal/activator/hawake.go

Loading diff…

internal/activator/rootfsdb.go

Loading diff…

internal/activator/size.go

Loading diff…

internal/activator/stateless.go

Loading diff…

internal/activator/stateless_assignment_test.go

Loading diff…

internal/activator/wakeidentity.go

Loading diff…

internal/apppolicy/apppolicy.go

Loading diff…

internal/apppolicy/demo_test.go

Loading diff…

internal/console/apicli.go

Loading diff…

internal/console/apidb.go

Loading diff…

internal/console/apidemo.go

Loading diff…

internal/console/apidemo_test.go

Loading diff…

internal/console/apidemobox.go

Loading diff…

internal/console/apiinstanceimport.go

Loading diff…

internal/console/apiinstancemove.go

Loading diff…

internal/console/apiinstances.go

Loading diff…

internal/console/apiinstanceseed.go

Loading diff…

internal/console/apiinteractive.go

Loading diff…

internal/console/apipolicy.go

Loading diff…

internal/console/apitemporary.go

Loading diff…

internal/console/appcopies.go

Loading diff…

internal/console/appcopies_test.go

Loading diff…

internal/console/appregionset.go

Loading diff…

internal/console/authcli.go

Loading diff…

internal/console/claim_invariant_test.go

Loading diff…

internal/console/copiespublication.go

Loading diff…

internal/console/demo_build_test.go

Loading diff…

internal/console/demo_data.go

Loading diff…

internal/console/demo_domains.go

Loading diff…

internal/console/demo_e2e_test.go

Loading diff…

internal/console/demo_expiry.go

Loading diff…

internal/console/demo_expiry_test.go

Loading diff…

internal/console/demo_finishing_test.go

Loading diff…

internal/console/demo_gate_test.go

Loading diff…

internal/console/demo_jobs.go

Loading diff…

internal/console/demo_jobs_test.go

Loading diff…

internal/console/demo_live_test.go

Loading diff…

internal/console/demo_move_test.go

Loading diff…

internal/console/demo_policy.go

Loading diff…

internal/console/demo_policy_test.go

Loading diff…

internal/console/demo_publish.go

Loading diff…

internal/console/demo_publish_test.go

Loading diff…

internal/console/demo_retirement_http_test.go

Loading diff…

internal/console/demo_review_test.go

Loading diff…

internal/console/demo_settlement_r2_test.go

Loading diff…

internal/console/demo_settlement_test.go

Loading diff…

internal/console/demo_spool.go

Loading diff…

internal/console/demo_spool_test.go

Loading diff…

internal/console/demo_store.go

Loading diff…

internal/console/demo_store_test.go

Loading diff…

internal/console/domainattach.go

Loading diff…

internal/console/domainpolicy.go

Loading diff…

internal/console/expirypass.go

Loading diff…

internal/console/fleetbox.go

Loading diff…

internal/console/fleetrelabel.go

Loading diff…

internal/console/fleets.go

Loading diff…

internal/console/hacreate.go

Loading diff…

internal/console/hostsused.go

Loading diff…

internal/console/hostsused_writers_test.go

Loading diff…

internal/console/lifetimes_create.go

Loading diff…

internal/console/lifetimes_cutover.go

Loading diff…

internal/console/lifetimes_purge.go

Loading diff…

internal/console/recordcreators_guard_test.go

Loading diff…

internal/console/replicaplacement.go

Loading diff…

internal/console/replicaplacement_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/settle.go

Loading diff…

internal/console/store.go

Loading diff…

internal/console/store_gate.go

Loading diff…

internal/console/temprefusal.go

Loading diff…

internal/console/tempstore.go

Loading diff…

internal/console/testdata/claim-authority-sites.txt

Loading diff…

internal/console/testdata/demo/go.mod

Loading diff…

internal/console/testdata/demo/go.sum

Loading diff…

internal/console/testdata/demo/main.go

Loading diff…

internal/demo/config.go

Loading diff…

internal/demo/config_test.go

Loading diff…

internal/demo/descriptor.go

Loading diff…

internal/demo/descriptor_test.go

Loading diff…

internal/demo/identity.go

Loading diff…

internal/demo/names.go

Loading diff…

internal/demobuild/bundle.go

Loading diff…

internal/demobuild/bundle_test.go

Loading diff…

internal/demobuild/demo_retry_test.go

Loading diff…

internal/demobuild/diagnostics.go

Loading diff…

internal/demobuild/diagnostics_test.go

Loading diff…

internal/demobuild/job.go

Loading diff…

internal/demobuild/job_test.go

Loading diff…

internal/demobuild/lock.go

Loading diff…

internal/demobuild/lock_generate_test.go

Loading diff…

internal/demobuild/lock_test.go

Loading diff…

internal/demobuild/probe.go

Loading diff…

internal/demobuild/purge.go

Loading diff…

internal/demobuild/retirement.go

Loading diff…

internal/demobuild/retirement_test.go

Loading diff…

internal/demobuild/runner.go

Loading diff…

internal/demobuild/runner_test.go

Loading diff…

internal/demobuild/security_linux.go

Loading diff…

internal/demobuild/security_other.go

Loading diff…

internal/demobuild/source.go

Loading diff…

internal/demobuild/source_test.go

Loading diff…

internal/demobuild/stdlib_linux_arm64.txt

Loading diff…

internal/demobuild/testdata/starter/go.mod

Loading diff…

internal/demobuild/testdata/starter/go.sum

Loading diff…

internal/demobuild/testdata/starter/main.go

Loading diff…

internal/demobuild/toolchain.lock.json

Loading diff…

internal/demobuild/unit.go

Loading diff…

internal/demobuild/unit_kernel_linux_test.go

Loading diff…

internal/demobuild/unit_test.go

Loading diff…

internal/demobuild/worker.go

Loading diff…

internal/demobuild/worker_test.go

Loading diff…

internal/domains/reconcile.go

Loading diff…

internal/edge/demo.go

Loading diff…

internal/edge/demo_test.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/pending.go

Loading diff…

internal/edge/wildcard.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/bootstrap.go

Loading diff…

internal/host/claimstop_registry_test.go

Loading diff…

internal/host/claimstop_run.go

Loading diff…

internal/host/claimunit.go

Loading diff…

internal/host/demo_build_linux_test.go

Loading diff…

internal/host/demo_cleanup.go

Loading diff…

internal/host/demo_cleanup_test.go

Loading diff…

internal/host/demo_dev_linux_test.go

Loading diff…

internal/host/demo_jobs.go

Loading diff…

internal/host/demo_jobs_test.go

Loading diff…

internal/host/demo_mounts_test.go

Loading diff…

internal/host/demo_policy.go

Loading diff…

internal/host/demo_policy_linux_test.go

Loading diff…

internal/host/demo_policy_test.go

Loading diff…

internal/host/demo_retirement_stream_test.go

Loading diff…

internal/host/demo_toolchain.go

Loading diff…

internal/host/demo_units/demo.conf

Loading diff…

internal/host/egress_source.go

Loading diff…

internal/host/egress_source_test.go

Loading diff…

internal/host/host_test.go

Loading diff…

internal/host/systemapply.go

Loading diff…

internal/host/systemunits.go

Loading diff…

internal/host/units/carlos-demo-build@.service

Loading diff…

internal/host/units/carlos-demo-builds.slice

Loading diff…

internal/hostenv/demo_test.go

Loading diff…

internal/instancectl/client.go

Loading diff…

internal/instancectl/client_test.go

Loading diff…

internal/instancectl/demo_build.go

Loading diff…

internal/instancectl/demo_build_test.go

Loading diff…

internal/instancectl/demo_cleanup.go

Loading diff…

internal/instancectl/demo_cleanup_http_test.go

Loading diff…

internal/instancectl/demo_cleanup_test.go

Loading diff…

internal/instancectl/demo_policy.go

Loading diff…

internal/instancectl/demo_policy_test.go

Loading diff…

internal/instancectl/demo_retry_test.go

Loading diff…

internal/instancectl/demo_versions.go

Loading diff…

internal/instancectl/egress.go

Loading diff…

internal/instancectl/gen.go

Loading diff…

internal/instancectl/rootfs.go

Loading diff…

internal/instancectl/server.go

Loading diff…

internal/instancectl/size.go

Loading diff…

internal/provision/apppolicy_reconcile.go

Loading diff…

internal/provision/demo_census_test.go

Loading diff…

internal/provision/demo_policy.go

Loading diff…

internal/provision/demo_policy_test.go

Loading diff…

internal/provision/demo_routing_test.go

Loading diff…

internal/provision/forward.go

Loading diff…

internal/provision/lifetime.go

Loading diff…

internal/provision/provision.go

Loading diff…

internal/provision/reconcile.go

Loading diff…

internal/provision/record_sequence.go

Loading diff…

internal/provision/replicaassignment.go

Loading diff…

internal/provision/replicaassignment_test.go

Loading diff…

internal/provision/stateless_placement_census_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv

Loading diff…

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

Loading diff…

internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv

Loading diff…

internal/registry/demo.go

Loading diff…

internal/registry/demo_test.go

Loading diff…

internal/registry/forward.go

Loading diff…

internal/registry/registry.go

Loading diff…

internal/registry/replicas.go

Loading diff…

internal/registry/replicas_test.go

Loading diff…

internal/release/changeindex.go

Loading diff…

internal/release/changewatch.go

Loading diff…

internal/release/changewatch_test.go

Loading diff…

internal/release/trash.go

Loading diff…