carlos / platform Public

fix: keep stateful fallback classification and one identity hash

Restore wrapped fallback causes on all failed-too arms so an unproven good
build retains its serving lease. Keep the mode-change exception confined
to the not-started fallback arms.

Preserve the original storage projection through the post-lease check and
reuse the unplanned identity capture. Use the existing agent digest cache;
keep changed-copy and capture failures on the stateful start-error path.

Add lease-retention, under-lease replan, live-repoint, changed-copy and
actual-read hash-count witnesses. Task 3 tests, 149 selected regressions,
three mutation checks, root and record-write censuses, digest-cache tests
and darwin/windows/linux-arm64 builds pass. Correct the cumulative census
claims. Part 3b logic is unchanged; independent review remains with the
controller.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 124376a1d4b70759b27d59abf4aca9e760d3f5b1 parent 09189fd
9 files changed, +321 −38
  • docs/superpowers/notes/census-proposal-stateless-replicas-1.md +7 −5
  • internal/activator/activator.go +39 −17
  • internal/activator/backend_exec.go +5 −1
  • internal/activator/stateless_fix1_test.go +1 −1
  • internal/activator/stateless_fix2_linux_test.go +69 −0
  • internal/activator/stateless_fix2_test.go +184 −0
  • internal/activator/wakeplan.go +3 −3
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv +12 −10

CI failed — run details

Intent

Human

<task-notification> <task-id>b6irvum9v</task-id> <tool-use-id>toolu_01WF4LbkML8Po8fvaYL2AHfC</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/b6irvum9v.output</output-file> <status>completed</status> <summary>Background command "Wait for 3b fix round 1" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a0097f1f1657879c1</task-id> <tool-use-id>toolu_01FwtATWaRiPwjy5MXZ5bHp4</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/a0097f1f1657879c1.output</output-file> <status>completed</status> <summary>Agent "Re-review Task 3a fix round 1" 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>Five of the six findings are addressed. M1 is not: the fix turns one old `%w` into `%v`, which drops a safety classification on stateful fallback failures. I found two further Important problems in the fix diff. Everything below comes from reading the diff file and the source at 9fe9b0dc. I ran no tests and changed nothing in the worktree. Paths are under `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-replicas-1/`. The pre-Plan-1 baseline is 65420a4d. ## Per-finding verdicts **I1: ADDRESSED.** - `internal/activator/activator.go:2695-2700`: `AdmitConfig` is now called only in the stateless branch and wrapped as `markOwnershipRefusal(rt, err)`. - Stateful wakes are admitted only through `Acquire` again, with the existing wrap at `:2737`. That matches pre-Plan-1, where the only call was inside `ExecBackend.Acquire`. - Witnesses: `TestStatelessConfigAdmissionKeepsOwnershipClassification` injects the refusal through `AdmitConfig` itself (a backend whose `Acquire` calls it) and asserts one read. `TestStatelessStatefulConfigAdmittedOnce` covers the stateful single read. **I2: ADDRESSED.** - `internal/activator/stateless.go:32-47`: `statelessCurrent` now checks only the registry row (`Routes.Get` plus `leaseRouteChanged`), the observed row and the observation. It does no record read. - `stateless.go:264-317`: `statelessFinalRecord` does the one fresh read (`Fleet.Record` for a labelled wake, otherwise `cfg.Record`). `sync.OnceValue` at `:308` limits it to one read. It also checks the deploy ID, target and released phase. - `internal/activator/genbackend.go:109,172,184`: the check runs after the pending write in both seams. It is attached on every stateless launch (`internal/activator/swaphold.go:556`, `internal/activator/swap.go:471`), and `doStatelessWake` launches through `startPinnedAt`. - Read-count witnesses: `TestStatelessLabelledWakeReadsTheRecordOnce` and `TestStatelessSwapReadsTheRecordOnce`. - No moved-before-spawn window remains. `TestStatelessFinalRecordRefusesMoveDuringPreparation` changes the record while the release waits and expects one read and zero starts. `TestStatelessMovedBeforeSpawn` mutates the row inside `BeforeExec` (the pending write), so the post-write gate and final check refuse it. **I3a: ADDRESSED.** - `activator.go:2860-2914`: for stateful wakes, `checkPlan`, the unit-row stale-link check and `settleWakeIdentity` run after `Acquire` and `Restore` again, with `giveBack` on every error. - A replan happens before settle, so the pending generation is allocated once and cannot leak. The stale comment is replaced. - The pre-lease `checkPlan` (`:2684`) now runs only when the build is stateless. - Witnesses: `TestStatelessStatefulReplanStaysAfterRestore` (with `StorageDeclaration` set) and `TestStatelessStatefulPendingPublishedAfterRestore`. - New pre-lease reads remain on unplanned stateful wakes; see N3. **I3b: ADDRESSED.** - `internal/host/agent.go:3748-3772`: the store opens lazily under a mutex, only a successful handle is kept, and a failed open is retried on the next call. There is no new loop. - An open failure on a stateful route returns `(false, "", nil)`, which is the R18 fallback. A stateless route refuses. - Witness: `TestStatelessStorageDeclarationRetriesOpeningStore`. One minor point: the mutex is held during `open(ctx)`, so concurrent wakes queue behind one slow open. **I3c / R18: ADDRESSED for the stated cases. N2 is a residual hole.** - `internal/release/runtime_selection.go:20-50`: `CanonicalRuntimeSelection` gives the same results as `CanonicalDemand` on a missing or unreadable manifest, a missing artifact and a digest mismatch. The mismatch error text is less detailed (minor). - `stateless.go:96`: on a store error, `storageMode` falls back to stateful unless the route is stateless or the error is a digest mismatch. - Pin and generation projections are honoured: `activator.go` `declarationRoute`, and `swaphold.go:523-525`. - Rollout passes `rt.Stateless` (`internal/host/rollout.go`). - Tests: `TestStatelessSelectionKeepsCanonicalDemandFallback`, `TestStatelessSelectionPreservesStatefulRolloutFallback`, `TestStatelessStatefulMissingDeclarationKeepsWake`, `TestStatelessKnownGenerationRefusesMissingManifest`. **M1: NOT ADDRESSED. The fix regresses it.** - `internal/activator/wakeplan.go:961-966`: `fallbackWakeError` formats every non-mode-change fallback error with `%v`. It is used in all six arms (`:479`, `481`, `520`, `522`, `620`, `622`). - Pre-Plan-1 (65420a4d `wakeplan.go:480/521/621`), the "the good build %s failed too" arms used `%w`. Only the "not started" arms used `%v`. - See N1 for the consequence. ## New breakage in this fix diff **N1 (Important, with data-safety impact): the stateful fallback error loses `errGenUnproven`.** - At `wakeplan.go:474`, the case `fproc == nil &amp;&amp; genStartUnproven(ferr)` goes to the "failed too" arm (`:481`). Now that arm uses `%v`. - At `activator.go:3114`, `w.genUnproven = genStartUnproven(err)` is then false. With `proc == nil`, the wake no longer keeps the lease and runs `cleanupFailedWake` (P2-13). It can give the lease back while the good build's generation may still be running. - `legacyStartMayRun`, `*ReleaseError` and other `errors.As` checks on the "failed too" arms are lost the same way. - `TestStatelessFallbackWrapsOnlyModeChange` asserts this new behaviour, and the census rows claim "legacy text-only classification", which is wrong for these arms. - Fix: restore `%w` on the three "failed too" arms, and keep `%v` plus the mode-change wrap only on the "not started" arms. **N2 (Important, narrow race): the R18 fallback can run a route projected stateless with a database.** - `activator.go:2722` clears `rt.Stateless` before `Acquire`. The post-lease `storageMode(ctx, rt, id)` at `:2904` therefore treats the route as stateful. - Trigger: a route projected stateless whose build was verified stateful before the lease. Under the lease, `settleWakeIdentity` (`heldID == nil`, unplanned) captures the live link again. If the link was repointed to a build with a missing or unreadable manifest, `stateless.go:96` falls back to stateful, and the wake restores and runs with a database instead of refusing. - A replan under the lease to a boot outside `plan.Declarations` is a second, rarer way in. - Fix: pass the original projection (`declarationRoute`) to the post-lease `storageMode`, or settle the unplanned capture on `modeID`. **N3 (Important, wake latency; not a safety issue): unplanned stateful wakes now do extra reads before `Acquire`.** - `activator.go:2660-2671`: with `StorageDeclaration` wired (production), every unplanned, non-held stateful wake now does a readlink, then `BuildIdentity` (an uncached `FileSHA256` of the whole staged file), then `VerifyStaged` and the manifest GET, all before `Acquire`. - `LiveIdentity` then hashes the file again under the lease. Pre-Plan-1 hashed once, under the lease. The base commit 37f894e1 hashed once, before the lease. - A staged copy that changed on disk now refuses before the lease as `errStorageDeclaration` (SR-1-C07 text) instead of failing through settle. - Suggest reusing a single capture, or the cached digest. **Other checks came out clean:** - The lazy store open has no retry loop. - The final gate cannot be bypassed on stateless launches. - `AdmitConfig` runs once on stateful wakes. ## Out of scope (minor) - Before the lease, a planned stateful wake whose staged copy has changed refuses with `errStorageDeclaration` and gets no fallback. Pre-Plan-1 it failed under the lease and could fall back to the good build. This dates from the base commit, not this fix. - A stateless wake refuses until the reconcile snapshot holds the host (`replicaRecordFacts`, `agent.go:3738`). This is fine as designed but adds latency for an instance that has just been assigned. - The post-lease `checkPlan` error is not wrapped with `start &lt;host&gt;:`, as it was pre-Plan-1. Only the message differs. ## Census - `activator.go Service.doWakeOnce`: **escalate** (N2, N3). - `wakeplan.go Service.spawnPlanned`, `Service.spawnPlannedRelease`, `Service.spawnPlannedWorker`: **escalate**. The "legacy text-only" basis is false for the "failed too" arms (N1). - `stateless.go Service.statelessCurrent`: approve. - `swaphold.go Service.startPinnedAt`: approve. - `swap.go Service.spawnSuccessor` (5 whole-route sites): approve. - `host/agent.go runAgent`: approve. - The four `statelessRecordKey` reference entries in the record-write census: approve. They are context keys, not record writers. Verdict: open findings (M1 / N1, N2, N3).</result> <usage><subagent_tokens>136392</subagent_tokens><tool_uses>32</tool_uses><duration_ms>393312</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>ac26782355102af0f</task-id> <tool-use-id>toolu_018KPx142hE1Uu3xAtfoVbY7</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/ac26782355102af0f.output</output-file> <status>completed</status> <summary>Agent "Re-review Task 3b fix round 1" 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>**I1: ADDRESSED.** At `internal/provision/reconcile.go:2105-2108` a `StatelessBinding` error is now logged and the pass moves on. `pr.applied[rec.Host] = applied` (line 2110) is still recorded. The callback runs only when `applied &amp;&amp; existing.Stateless &amp;&amp; !DryRun`, and the publisher (`internal/host/fleetbind.go`, `statelessBindingPublisher.publish`) stores `published[host]` only after `writeFleetBinding` succeeds. So the next pass retries with nothing acknowledged too early. - Keeping `applied=true` on a binding failure feeds only `ReconcileReport.Complete` → `assetAuthority.recordsPass` (records-confirmed time). That is right: the records really were applied to the registry, and the binding is a separate, retried obligation. - The report notes that the old `return err` was inside the claim-install closure, so the blast radius was smaller than the review said. That doesn't change the verdict. - Witness: `TestStatelessBindingFailureContinuesReconcile`. **I2 / R20: ADDRESSED.** - `internal/activator/statelessrelease.go:41-43`: the matching `released` branch now calls `prepareStatelessEscrow`. - `internal/activator/escrow_authority.go:115-160`, in this order: - identity fence (`:117`); - `Held(id)` returns early without acquiring (`:120`); - `escrowReady` and `escrowConflict` refuse; - a raw `hostfiles.Load` with no publisher opened, where a complete `SealedRels` trio returns nil and so never acquires (`:136-145`); - only then `Coordination.Acquire` (`:149`), with a `CoordinatorHeldError` wrapped in `errStatelessSecretsWaiting` and `RetryAt` kept. - No mint or publish happens in this function. Minting stays behind the existing launch-time guard (`holdsEscrowAuthority`, then `escrowMintGuardWithAuthority`). - No loop or timer was added. The attempt rides on `prepareStateless` on the wake path. - `ExecBackend.Coordination` and `Service.Coordinator` are the same client (`internal/host/agent.go:603-604`), so `HeldForHost` sees the authority acquired here. - Witnesses: `TestStatelessEscrowRestartAfterFailedFirstPublish`, `TestStatelessEscrowInitializerContention`, `TestStatelessEscrowPublishedFollowerNeverAcquires`. **New breakage (Critical/Important): none.** - **Two boxes minting different trios:** not possible through this path. Acquire goes through the exclusive, assignment- and lifetime-checked coordinator term (`SetRecordCoordinator` or the console API). Acquiring grants nothing to mint by itself. The later launch preparation still re-reads the bucket under the escrow lock and keeps the Durability 3a bucket-knowledge, conflict, divergence and held-first-launch checks, none of which this diff touches. A box whose term expires mid-publish still fences through the existing `ErrFenced` path. A previous initializer that never published never served (its first launch was held), so a later initializer minting fresh secrets diverges from nothing that was served. - **A box that finds a published trio:** it never acquires. Both the `Held` and complete-trio branches return before `Acquire`. A failed read or a conflict refuses before `Acquire`. - **Contended box:** it does not reach the coordinator faster than `RetryAt`. `CoordinationClient.Acquire` returns the cached `CoordinatorHeldError` with no exchange (`coordinator.go:153-156`). No timer was added. - **Continuing after a binding error:** it skips no obligation. Mints, converges, `applied` and the removal phase all still run, and the binding is retried. - **Serving lease:** the I2 path takes none and needs none. It uses only the coordination client. `holdsEscrowAuthority` uses the coordinator for stateless routes and the serving lease only for stateful ones. **Out of scope (minor):** 1. `prepareStatelessEscrow` calls `hostfiles.Load` before checking the coordinator's retry cache. A box waiting before `RetryAt` therefore does one files-manifest GET on every wake attempt. That cost is driven by wakes, not timers, and is about what `followerEscrowEnv` did before. A follower whose trio is complete now pays one extra uncached GET per cold start, because this read bypasses the `prepRead` cache that `followerEscrowEnv` reuses. Checking the retry cache first, or caching this read, would remove both. 2. `SplitBackend.prepareStatelessEscrow` returns a bare `replicas.ErrFenced` for unit-backed routes (`BackingUnit`). A unit-backed stateless route at `released` now fails closed instead of returning nil, and without the SR-1-C06 waiting message. That is defensible but untested. 3. Acquire errors other than the "held" error (for example HTTP 5xx) set no retry time, so each wake attempt re-sends the request. This was already true before this diff. 4. I ran no tests. I had no specific doubt needing one, and the worktree is being changed by the parallel 3a fix round, so a run would not test this diff. **Census: approve.** - **`Reconcile`:** body only, changing `return` to a log. No read, writer or key change. The record-write inventory digest was re-pinned with a fitting note. - **`Service.PrepareStatelessRelease`:** one more `+whole:Route` because it passes `rt` through. No new registry read. - **New `ExecBackend.prepareStatelessEscrow`:** reads in-memory route fields (Account, App, Host ×4, Stateless, Route ×2). Its I/O is a files-manifest read and a coordinator acquire, with no registry read. - **New `SplitBackend.prepareStatelessEscrow`:** a pure forward. - Seal `b483be74…` matches the chain line, and both overlay counts went from 56 to 58. **Verdict: all addressed.**</result> <usage><subagent_tokens>106319</subagent_tokens><tool_uses>26</tool_uses><duration_ms>243792</duration_ms></usage> </task-notification>

Attributed to this commit: 31.9 g CO₂e (3,894,486 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-replicas-1-runtime, 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.

diff --git a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
index 34094023a..b1e606eae 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
@@ -17,9 +17,9 @@ Ruling `census-ruling-stateless-replicas-1`. The independent reviewer approves o
| `internal/activator/maintenance.go` `Service.giveBackAfterStart` | body | unchanged (5) | Task 3a: A stateless generation with no lease records absent replica/lease obligations without calling Release; stateful/HA release and host-slice proofs remain unchanged. |
| `internal/activator/opset.go` `Service.reapUnprovenWake` | body | unchanged (3) | Task 3a: After the existing generation termination proof, discharge a stateless local obligation without inventing a lease or replica. No proof is weakened. |
| `internal/activator/swaphold.go` `Service.holdWakeLocked` | body | unchanged (2) | Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs. |
-| `internal/activator/wakeplan.go` `Service.spawnPlanned` | body | unchanged (12) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. |
-| `internal/activator/wakeplan.go` `Service.spawnPlannedRelease` | body | unchanged (2) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. |
-| `internal/activator/wakeplan.go` `Service.spawnPlannedWorker` | body | unchanged (4) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. |
+| `internal/activator/wakeplan.go` `Service.spawnPlanned` | body | unchanged (12) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. |
+| `internal/activator/wakeplan.go` `Service.spawnPlannedRelease` | body | unchanged (2) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. |
+| `internal/activator/wakeplan.go` `Service.spawnPlannedWorker` | body | unchanged (4) | Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. |
| `internal/host/agent.go` `fastConvergeLoop` | body | unchanged (2) | Hand the service coordinator's Tick to the existing fast tick; no timer or new read site. Task 3b: give the existing fast loop the existing full-pass signal even when the change index is disarmed, so a stateless wake requests reconciliation without a new timer or bucket poll. |
| `internal/host/agent.go` `fastTick` | body | unchanged (1) | Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. |
| `internal/host/agent.go` `haRecordFacts` | body | unchanged (3) | Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. |
@@ -32,6 +32,7 @@ Ruling `census-ruling-stateless-replicas-1`. The independent reviewer approves o
| `internal/rollout/failures.go` `OpenFailureBook` | body | unchanged (1) | Load the additive replica_releases carrier from the same existing failure-book ReadFile; unchanged schema acceptance, identity recovery, reconciliation and read site. No additional read. |
| `ship_check.go` `rootfsCheck.runArgs` | body | unchanged (2) | Stateless local checks mount only the run volume and omit the database mount; same probe read, no new read. |
| `internal/activator/activator.go` `Service.doWake` | sites | -registry:DBPath ×5, -registry:GoodVersion, -registry:Host ×8, -registry:Replication ×6, -registry:Seed, -registry:Socket ×4, -whole:Route ×59 | Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata. |
+| `internal/activator/backend_exec.go` `ExecBackend.LiveIdentity` | sites | +registry:Host | Fix 3a round 2 N3: resolve the same live-link chain and hash the captured path with the existing agent digest cache; later VerifyStaged calls reuse that digest for an unchanged settled file. Existing settle window, file-identity invalidation and root uncached verification stay intact. Host is read again only to retain the hash error context. No new path or exec authority. |
| `internal/activator/backend_exec.go` `ExecBackend.StartWorkerStaged` | sites | +whole:Route | Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. |
| `internal/activator/backend_exec.go` `ExecBackend.startSidecarChildFrom` | sites | +whole:Route | Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. |
| `internal/activator/backend_exec.go` `ExecBackend.startSidecarUnitFrom` | sites | +whole:Route | Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. |
@@ -82,6 +83,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/rollout/failures.go` `OpenFailureBook`: authority, task E1,E3,J1,J4. Basis: fix1-merge-review;basis=Loads schema-three durable generations and refuses unsafe identity recovery on entropy failure.
- `ship_check.go` `rootfsCheck.runArgs`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-1;basis=root-input (J4, as main's db.go units); the carlos CLI on a person's machine, as the person (no box unit): new (rootfs Plan 1), builds the docker or podman run argv for one check container; the scanner matches the word Command, here a field of release.Process (a process's argv), not os/exec; reads no file; decides nothing for root;rev3=census-ruling-rootfs-check-volumes;basis=R2 P1: the data and run volume mounts (-v) now carry :nocopy through rootfsCheck.volumeMount, so Docker and Podman never fill an empty check volume from the image directory at the mount point (which would reset the prepared owner and mode); same volumes, same paths, same probe mount, nothing else in the argv changed. Runs on the person's machine as the person; no box unit; no read added.
- `internal/activator/activator.go` `Service.doWake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.
+- `internal/activator/backend_exec.go` `ExecBackend.LiveIdentity`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
- `internal/activator/backend_exec.go` `ExecBackend.StartWorkerStaged`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-zddr3;basis=Census ruling zddr3: changed legacy row (comment-only change describing the shim placement); the same class as the accepted-legacy Manager.startIn and placementLive under fix1-merge-review (existing agent delegated-cgroup management remains legacy); no root decision; no registry, /data, release or claim reads. Boundary: the agent's own delegated cgroup subtree (including its scratch probe child), /proc/self, and pipes to and from its own parent, running as carlos.
- `internal/activator/backend_exec.go` `ExecBackend.startSidecarChildFrom`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1,J4;basis=route-and-input
- `internal/activator/backend_exec.go` `ExecBackend.startSidecarUnitFrom`: authority, task E2. Basis: E40: claim-enabled raw backend refuses unsupported direct, placed and legacy-control launches before spawn. Claims-off body unchanged. TestPlan14GenerationBackendDirectBoundary, TestPlan14GenerationBackendControlBoundary, TestPlan14GenerationBackendAuxiliaryBoundary; each guard has an independent behavioral mutation. Agent-side refusal is not root reservation or containment evidence.;rev3=census-ruling-rootfs-apps-2;basis=newUnitProc now returns an error, which closes the log listener and fails the start; the sidecar launch and its E40 guards are unchanged; no read added
@@ -100,7 +102,7 @@ Recorded dispositions, which each change must still satisfy:
New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
-- new `internal/activator/activator.go:Service.doWakeOnce`: reads +registry:DBPath ×5, +registry:GoodVersion, +registry:Host ×8, +registry:Replication ×6, +registry:Seed, +registry:Socket ×4, +registry:Stateless ×5, +whole:Route ×77; written legacy, accepted-legacy, frozen
+- new `internal/activator/activator.go:Service.doWakeOnce`: reads +registry:DBPath ×5, +registry:GoodVersion, +registry:Host ×8, +registry:Replication ×6, +registry:Seed, +registry:Socket ×4, +registry:Stateless ×8, +whole:Route ×76; written legacy, accepted-legacy, frozen
- new `internal/activator/escrow.go:ExecBackend.escrowMintGuardWithAuthority`: reads +registry:Host, +whole:Route ×7; written legacy, accepted-legacy, frozen
- new `internal/activator/escrow_authority.go:ExecBackend.followerEscrowEnv`: reads +registry:Host ×4, +whole:Route ×8; written legacy, accepted-legacy, frozen
- new `internal/activator/escrow_authority.go:ExecBackend.holdsEscrowAuthority`: reads +registry:Host ×2, +registry:Stateless; written legacy, accepted-legacy, frozen
@@ -159,6 +161,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/registry/runtime.go:Route.ActivatorOwned`: +registry:Stateless; keeps legacy, task accepted-legacy
- reads `internal/registry/runtime.go:Route.Resident`: +registry:Runtime, +registry:Stateless; keeps legacy, task accepted-legacy
-Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `b483be74268153f4598295152a80f9bf95610233911b373f144e233e2562de18`.
+Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `140a17425883c01fc36856760246a528eaa3cdb7a9d58119c61c0ed7ea5befc7`.
Overlay: `internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/activator/activator.go b/internal/activator/activator.go
index 4a8a2662b..bfaec6e2d 100644
--- a/internal/activator/activator.go
+++ b/internal/activator/activator.go
@@ -2649,7 +2649,13 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
ib := identityFor(a.backend, rt)
var id release.StagedIdentity
ctx = withDeclarations(ctx, rt, plan.Declarations)
+ declarationRoute := rt
+ if e.pin != nil && e.pin.Stateless {
+ declarationRoute.Stateless = true
+ }
var modeID release.StagedIdentity
+ var capturedID *release.StagedIdentity
+ var captureErr error
switch {
case plan.planned():
modeID = plan.Boot
@@ -2658,26 +2664,26 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
case heldID != nil:
modeID = *heldID
case ib != nil && (a.StorageDeclaration != nil || rt.Stateless):
- if rt.Stateless {
- var err error
- modeID, err = ib.LiveIdentity(ctx, rt)
- if err != nil {
- return w, err
+ if rt.Stateless || a.liveVersion(host) != "" {
+ modeID, captureErr = ib.LiveIdentity(ctx, rt)
+ if captureErr != nil && rt.Stateless {
+ return w, captureErr
}
- } else if bi, ok := a.backend.(buildIdentifier); ok {
- if version := a.liveVersion(host); version != "" {
- modeID, _ = bi.BuildIdentity(rt, version)
+ if captureErr == nil {
+ capturedID = &modeID
}
}
}
if modeID.StagedPath != "" {
- declarationRoute := rt
- if e.pin != nil && e.pin.Stateless {
- declarationRoute.Stateless = true
- }
mode, digest, modeErr := a.storageMode(ctx, declarationRoute, modeID)
if modeErr != nil {
- return w, modeErr
+ if !declarationRoute.Stateless && errors.Is(modeErr, release.ErrStagedCopyChanged) {
+ // Keep a changed stateful copy on the existing failed-start
+ // path, after Acquire and Restore.
+ mode, digest = false, ""
+ } else {
+ return w, modeErr
+ }
}
if mode && plan.planned() {
next, err := a.checkPlan(ctx, e, rt, plan)
@@ -2687,12 +2693,14 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
plan = next
ctx = withDeclarations(ctx, rt, plan.Declarations)
modeID = plan.Boot
- mode, digest, modeErr = a.storageMode(ctx, rt, modeID)
+ mode, digest, modeErr = a.storageMode(ctx, declarationRoute, modeID)
if modeErr != nil {
return w, modeErr
}
}
- ctx = withStorageMode(ctx, rt, modeID, mode, digest)
+ if modeErr == nil {
+ ctx = withStorageMode(ctx, rt, modeID, mode, digest)
+ }
if mode {
if g, ok := a.backend.(configAdmitter); ok {
if err := g.AdmitConfig(ctx, rt); err != nil {
@@ -2883,7 +2891,15 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
idErr error
wctx context.Context
)
- id, w.pend, wctx, idErr = a.settleWakeIdentity(ctx, ib, e, rt, held, heldID)
+ if captureErr != nil {
+ w.stopOutcome.leaseReleased = a.giveBack(ctx, host, lease)
+ return w, fmt.Errorf("start %s: %w", host, captureErr)
+ }
+ chosen := heldID
+ if capturedID != nil && !plan.planned() && e.pin == nil {
+ chosen = capturedID
+ }
+ id, w.pend, wctx, idErr = a.settleWakeIdentity(ctx, ib, e, rt, held, chosen)
if idErr != nil {
w.stopOutcome.leaseReleased = a.giveBack(ctx, host, lease)
return w, fmt.Errorf("start %s: %w", host, idErr)
@@ -2901,7 +2917,13 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
w.steps.mark(a.now(), "identity")
if id.StagedPath != "" {
- mode, digest, modeErr := a.storageMode(ctx, rt, id)
+ if !declarationRoute.Stateless && a.StorageDeclaration != nil {
+ if err := release.VerifyStaged(id); err != nil {
+ w.stopOutcome.leaseReleased = a.giveBack(ctx, host, lease)
+ return w, fmt.Errorf("start %s: %w", host, err)
+ }
+ }
+ mode, digest, modeErr := a.storageMode(ctx, declarationRoute, id)
if modeErr != nil {
w.stopOutcome.leaseReleased = a.giveBack(ctx, host, lease)
return w, modeErr
diff --git a/internal/activator/backend_exec.go b/internal/activator/backend_exec.go
index 47561a609..ddddf5433 100644
--- a/internal/activator/backend_exec.go
+++ b/internal/activator/backend_exec.go
@@ -1974,10 +1974,14 @@ func (b *ExecBackend) LiveIdentity(ctx context.Context, rt registry.Route) (rele
if err := b.ensureLiveLink(ctx, rt.Host); err != nil {
return release.StagedIdentity{}, err
}
- id, err := release.ResolveLive(b.OptDir, rt.Host)
+ id, err := release.ResolveLiveLink(b.OptDir, rt.Host)
if err != nil {
return release.StagedIdentity{}, fmt.Errorf("%s: %w", rt.Host, err)
}
+ id.Digest, err = release.FileSHA256Cached(id.StagedPath)
+ if err != nil {
+ return release.StagedIdentity{}, fmt.Errorf("%s: hash %s: %w", rt.Host, id.StagedPath, err)
+ }
return id, nil
}
diff --git a/internal/activator/stateless_fix1_test.go b/internal/activator/stateless_fix1_test.go
index 7b508a5f8..f8e1f6138 100644
--- a/internal/activator/stateless_fix1_test.go
+++ b/internal/activator/stateless_fix1_test.go
@@ -188,7 +188,7 @@ func TestStatelessStatefulMissingDeclarationKeepsWake(t *testing.T) {
func TestStatelessFallbackWrapsOnlyModeChange(t *testing.T) {
primary := errors.New("target failed")
- for _, fallback := range []error{ErrFenced, errShuttingDown, errSwapLeaseLost, context.Canceled} {
+ for _, fallback := range []error{ErrFenced, errShuttingDown, errSwapLeaseLost, context.Canceled, errGenUnproven, markLegacyStartUncertain(ErrFenced), &ReleaseError{Build: "v1", Exit: 1}} {
err := fallbackWakeError(primary, fallback, "the good build was not started")
if !errors.Is(err, primary) || errors.Is(err, fallback) || classifyStep(nil, err) != classifyStep(nil, primary) || residentFailure(err) != residentFailure(primary) {
t.Fatalf("fallback changed classification: %v", err)
diff --git a/internal/activator/stateless_fix2_linux_test.go b/internal/activator/stateless_fix2_linux_test.go
new file mode 100644
index 000000000..a626a8b5c
--- /dev/null
+++ b/internal/activator/stateless_fix2_linux_test.go
@@ -0,0 +1,69 @@
+package activator
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
+)
+
+func TestStatelessStatefulWakeHashesOneCapture(t *testing.T) {
+ r := newWakeRelRig(t)
+ r.rt.Runtime = ""
+ r.routes.set(r.rt)
+ r.a.Planner = nil
+ eb := &ExecBackend{OptDir: t.TempDir()}
+ path := release.VersionPath(eb.OptDir, r.rt.Account, "v1", r.rt.App)
+ if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
+ t.Fatal(err)
+ }
+ const size = 16 << 20
+ if err := os.WriteFile(path, bytes.Repeat([]byte("x"), size), 0755); err != nil {
+ t.Fatal(err)
+ }
+ repointLiveLink(t, eb, r.rt.Host, path)
+ r.a.liveVer = eb.LiveVersion
+ b := &capturedWakeBackend{wakeRelBackend: r.b, capture: eb.LiveIdentity}
+ r.a.backend = b
+ declarations := 0
+ r.a.StorageDeclaration = func(_ context.Context, _ registry.Route, id release.StagedIdentity) (bool, string, error) {
+ declarations++
+ return false, "manifest", release.VerifyStaged(id)
+ }
+ // Let the existing cache's two-second settle window pass. /proc counts
+ // actual read bytes, so an uncached hash cannot hide behind the OS cache.
+ time.Sleep(2100 * time.Millisecond)
+ readBytes := func() uint64 {
+ raw, err := os.ReadFile("/proc/self/io")
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, line := range strings.Split(string(raw), "\n") {
+ if strings.HasPrefix(line, "rchar:") {
+ var n uint64
+ if _, err := fmt.Sscanf(line, "rchar: %d", &n); err != nil {
+ t.Fatal(err)
+ }
+ return n
+ }
+ }
+ t.Fatal("missing rchar")
+ return 0
+ }
+ before := readBytes()
+ if err := waitErr(t, r.wake(r.a)); err != nil {
+ t.Fatal(err)
+ }
+ read := readBytes() - before
+ if b.captures != 1 || declarations != 1 || read < size || read >= 2*size {
+ t.Fatalf("captures=%d declarations=%d read=%d, want one %d-byte hash", b.captures, declarations, read, size)
+ }
+ t.Logf("one capture, one declaration, %d bytes read for a %d-byte build", read, size)
+}
diff --git a/internal/activator/stateless_fix2_test.go b/internal/activator/stateless_fix2_test.go
new file mode 100644
index 000000000..e851d6ab1
--- /dev/null
+++ b/internal/activator/stateless_fix2_test.go
@@ -0,0 +1,184 @@
+package activator
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
+)
+
+type fallbackUnprovenBackend struct {
+ *wakeRelBackend
+ proven bool
+}
+
+func (b *fallbackUnprovenBackend) StartStaged(ctx context.Context, rt registry.Route, g Gen) (Gen, Proc, error) {
+ if err := runExecGate(ctx); err != nil {
+ return g, nil, err
+ }
+ if g.Build == "v2" {
+ return g, nil, markStartUncertain(errStartedThenExited)
+ }
+ return g, nil, fmt.Errorf("good build start: %w", errGenUnproven)
+}
+
+func (b *fallbackUnprovenBackend) KillGen(ctx context.Context, rt registry.Route, n uint64) error {
+ if !b.proven {
+ return errGenUnproven
+ }
+ return b.wakeRelBackend.KillGen(ctx, rt, n)
+}
+
+func TestStatelessStatefulFallbackUnprovenKeepsLease(t *testing.T) {
+ for _, releaseFailed := range []bool{false, true} {
+ t.Run(fmt.Sprintf("release=%v", releaseFailed), func(t *testing.T) {
+ r := newWakeRelRig(t)
+ b := &fallbackUnprovenBackend{wakeRelBackend: r.b}
+ r.a.backend = b
+ t.Cleanup(func() { b.proven = true })
+ if !releaseFailed {
+ r.b.procs["v2"] = nil
+ }
+ ch := r.wake(r.a)
+ if releaseFailed {
+ r.nextUnit(t).done("exited", "1", "exit-code")
+ }
+ err := waitErr(t, ch)
+ if !genStartUnproven(err) {
+ t.Fatalf("fallback lost unproven start: %v", err)
+ }
+ r.a.mu.Lock()
+ u := r.a.unprovenWakes[r.rt.Host]
+ r.a.mu.Unlock()
+ if u == nil || r.b.leaseReleases() != 0 {
+ t.Fatalf("unproven wake=%+v releases=%d", u, r.b.leaseReleases())
+ }
+ if _, err := r.a.beginRequest(context.Background(), r.rt); !errors.Is(err, errWakeUnproven) {
+ t.Fatalf("second wake = %v", err)
+ }
+ })
+ }
+}
+
+type capturedWakeBackend struct {
+ *wakeRelBackend
+ capture func(context.Context, registry.Route) (release.StagedIdentity, error)
+ acquire func()
+ captures int
+}
+
+func (b *capturedWakeBackend) identityFor(registry.Route) identityBackend { return b }
+func (b *capturedWakeBackend) LiveIdentity(ctx context.Context, rt registry.Route) (release.StagedIdentity, error) {
+ b.captures++
+ return b.capture(ctx, rt)
+}
+func (b *capturedWakeBackend) Acquire(ctx context.Context, rt registry.Route) (Lease, error) {
+ if b.acquire != nil {
+ b.acquire()
+ }
+ return b.wakeRelBackend.Acquire(ctx, rt)
+}
+
+func TestStatelessProjectedReplanRequiresDeclarationUnderLease(t *testing.T) {
+ for _, cause := range []error{os.ErrNotExist, errors.New("store unavailable")} {
+ t.Run(cause.Error(), func(t *testing.T) {
+ r := newWakeRelRig(t)
+ r.rt.Stateless = true
+ r.b.setIdentity("v1")
+ r.routes.set(r.rt)
+ plans := 0
+ r.a.Planner = func(context.Context, registry.Route) WakePlan {
+ plans++
+ if plans == 1 {
+ return WakePlan{Boot: r.next, Mode: ModeOverlap, Check: func(string) error { return errors.New("replan") }}
+ }
+ return WakePlan{Boot: r.good, Mode: ModeOverlap}
+ }
+ r.a.StorageDeclaration = func(_ context.Context, rt registry.Route, id release.StagedIdentity) (bool, string, error) {
+ if id.Version == r.next.Version {
+ return false, "manifest", nil
+ }
+ return false, "", cause
+ }
+ err := waitErr(t, r.wake(r.a))
+ if !errors.Is(err, errStorageDeclaration) || len(r.b.started()) != 0 || r.b.leaseReleases() != 1 {
+ t.Fatalf("replan: err=%v starts=%v releases=%d", err, r.b.started(), r.b.leaseReleases())
+ }
+ })
+ }
+}
+
+func TestStatelessUnplannedCaptureSurvivesLiveRepoint(t *testing.T) {
+ r := newWakeRelRig(t)
+ r.rt.Stateless = true
+ r.routes.set(r.rt)
+ r.a.Planner = nil
+ r.b.setIdentity("v1")
+ live := r.good
+ b := &capturedWakeBackend{wakeRelBackend: r.b}
+ b.capture = func(context.Context, registry.Route) (release.StagedIdentity, error) { return live, nil }
+ b.acquire = func() { live = r.next }
+ r.a.backend = b
+ r.a.StorageDeclaration = func(_ context.Context, _ registry.Route, id release.StagedIdentity) (bool, string, error) {
+ if id.Version == r.good.Version {
+ return false, "manifest", nil
+ }
+ return false, "", os.ErrNotExist
+ }
+ if err := waitErr(t, r.wake(r.a)); err != nil {
+ t.Fatal(err)
+ }
+ r.b.mu.Lock()
+ started := r.b.ident.last
+ r.b.mu.Unlock()
+ if b.captures != 1 || started != r.good {
+ t.Fatalf("captures=%d started=%+v, want original %+v", b.captures, started, r.good)
+ }
+ sleepEntry(t, r.a, r.rt.Host)
+ if err := waitErr(t, r.wake(r.a)); !errors.Is(err, errStorageDeclaration) {
+ t.Fatalf("next wake on unreadable declaration: %v", err)
+ }
+}
+
+func TestStatelessStatefulChangedCopyKeepsStartClassification(t *testing.T) {
+ for _, when := range []string{"before declaration", "under lease", "capture error"} {
+ t.Run(when, func(t *testing.T) {
+ r := newWakeRelRig(t)
+ r.rt.Runtime = ""
+ r.routes.set(r.rt)
+ r.a.Planner = nil
+ r.b.setIdentity("v1")
+ change := func() {
+ if err := os.WriteFile(r.good.StagedPath, []byte("changed"), 0755); err != nil {
+ t.Error(err)
+ }
+ }
+ b := &capturedWakeBackend{wakeRelBackend: r.b}
+ b.capture = func(context.Context, registry.Route) (release.StagedIdentity, error) {
+ if when == "capture error" {
+ return release.StagedIdentity{}, release.ErrStagedCopyChanged
+ }
+ if when == "before declaration" {
+ change()
+ }
+ return r.good, nil
+ }
+ if when == "under lease" {
+ b.acquire = change
+ }
+ r.a.backend = b
+ r.a.StorageDeclaration = func(context.Context, registry.Route, release.StagedIdentity) (bool, string, error) {
+ return false, "manifest", nil
+ }
+ err := waitErr(t, r.wake(r.a))
+ acquire, restore, start := r.b.counts()
+ if !errors.Is(err, release.ErrStagedCopyChanged) || errors.Is(err, errStorageDeclaration) || acquire != 1 || restore != 1 || start != 0 || b.captures != 1 || r.b.leaseReleases() != 1 {
+ t.Fatalf("err=%v acquire=%d restore=%d start=%d captures=%d releases=%d", err, acquire, restore, start, b.captures, r.b.leaseReleases())
+ }
+ })
+ }
+}
diff --git a/internal/activator/wakeplan.go b/internal/activator/wakeplan.go
index 06c3da497..98734fd05 100644
--- a/internal/activator/wakeplan.go
+++ b/internal/activator/wakeplan.go
@@ -478,7 +478,7 @@ func (a *Service) spawnPlanned(ctx context.Context, e *actEntry, rt registry.Rou
// doWake's cleanup proves once more.
return proc, ver, g, fallbackWakeError(err, ferr, "the good build was not started")
}
- return fproc, fver, fg, fallbackWakeError(err, ferr, "the good build "+good.Version+" failed too")
+ return fproc, fver, fg, fmt.Errorf("%w; the good build %s failed too: %w", err, good.Version, ferr)
}
w.fellBack = true
return fproc, fver, withIdentity(fg, good), nil
@@ -519,7 +519,7 @@ func (a *Service) spawnPlannedRelease(ctx context.Context, e *actEntry, rt regis
if fproc == nil && !genStartUnproven(ferr) {
return nil, "", Gen{}, fallbackWakeError(err, ferr, "the good build was not started")
}
- return fproc, fver, fg, fallbackWakeError(err, ferr, "the good build "+good.Version+" failed too")
+ return fproc, fver, fg, fmt.Errorf("%w; the good build %s failed too: %w", err, good.Version, ferr)
}
w.fellBack = true
return fproc, fver, withIdentity(fg, good), nil
@@ -619,7 +619,7 @@ func (a *Service) spawnPlannedWorker(ctx context.Context, e *actEntry, rt regist
// and B's child, proven gone, is what doWake's cleanup proves.
return proc, id, fallbackWakeError(err, ferr, "the good build was not started")
}
- return fproc, fid, fallbackWakeError(err, ferr, "the good build "+plan.Fallback.Version+" failed too")
+ return fproc, fid, fmt.Errorf("%w; the good build %s failed too: %w", err, plan.Fallback.Version, ferr)
}
w.fellBack = true
return fproc, fid, nil
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 000e14d49..8e72be2dd 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -56,4 +56,4 @@ plan14-root-reads-fix-set-aside-exdev.tsv f9d3016cc6803338f9db19311f3f598e20c37c
plan14-root-reads-durability-3a-escrow.tsv 03a92257beb9b8aac421559e247d191bd69f28a0b26243397a1344a90d59fc2a
plan14-root-reads-rootfs-default-home.tsv 7a0a3da3d6fe7e3c77abb22676db000af2a276c3d13ccae0f038190f51287ed5
plan14-root-reads-probe-burst-limit.tsv 5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc
-plan14-root-reads-stateless-replicas-1.tsv b483be74268153f4598295152a80f9bf95610233911b373f144e233e2562de18
+plan14-root-reads-stateless-replicas-1.tsv 140a17425883c01fc36856760246a528eaa3cdb7a9d58119c61c0ed7ea5befc7
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
index cf176932f..c22b73d73 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
@@ -1,5 +1,5 @@
# Census overlay stateless-replicas-1, written by census-propose (#369). census-ruling-stateless-replicas-1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-replicas-1.md.
-# 27 body, 16 sites, 9 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 27 body, 17 sites, 9 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 58 new dispositions: 28 reads re-frozen at their disposition with the claim, 29 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
@legacy 8532ad0b6523e01bb6548e7a0ff565615b99e39a8921c338db522812368899a3 cli.go runShip legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-rootfs-apps-1;basis=rootfs Plan 1 Task 9: takes --rootfs, --processes, --hibernate, --jit and --check and hands a rootfs ship to runShipRootfs (ship_rootfs.go) before the binary path; the --notes-file ReadFile moved into shipNoteText (its own row, the same read of the file the person named) and the direct-mode version mint into mintDirectVersion; one read site fewer, none added; Task 12: the --hibernate flag help is RFS-1-C32's new text, the same reads;rev3=census-ruling-edge-asset-cache-1;basis=takes --assets (repeatable), checks the folders with checkShipAssets (release.ValidAssetPaths; refused on a static site) before the mode split, carries them into the API meta (sess.shipAssets) and the direct-mode manifest (shipAssetsBlock), and passes them to runShipRootfs (rootfsShipOpts.assets), which runs the same check and carries them the same two ways; after a direct-mode ship has stored a release declaring folders, directShipAssetGens runs the console ship door's backfill (provision.MintMissingAssetGens: lists the app's record keys and gives each record without an asset generation one, a CAS write in the deployment bucket as the person running the CLI) and fails naming any record it could not mint; read sites unchanged (2), none added;rev3=census-ruling-rootfs-apps-4;basis=adds the repeatable --env flag and refuses it before anything else unless --check is given (shipEnvRefusal, parseShipCheckEnv); the parsed values go into rootfsShipOpts.checkEnv. --env values reach the check's local container runtime as -e argv only, never root, never a box. No read added; read sites unchanged (2).;rev3=census-ruling-stateless-replicas-1;basis=Carry --stateless into binary/API and rootfs ship options; same two read sites, no new read. file:ReadFile@7899,file:ReadFile@8123 d6f244d2c3bcae95eb8ec0fa7e57c52e9b50c7e9e2e00dda85f930b643731a51
@legacy 1f47559b0957d7c9358e4b2356a4bbd3047410b8894c48a1391504dea17902e4 internal/activator/activator.go Service.BeginSidecarRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Read serving lease health through servingError: stateless generations use local lifecycle/process supervision, while stateful generations keep the existing lease checks. No new I/O. registry:Host@259,registry:Host@333 4413ca4112799b0fd5bf3e7bb90adf9b92ef0f1efd16c6e1f4164eff24882b9a
@@ -13,9 +13,9 @@
@legacy e076f4500ed355baa79ac99eb405469c56fd09efef9c11aabf80c0f5cba28b19 internal/activator/maintenance.go Service.giveBackAfterStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (final fix F1), the agent as carlos: a failed wake's release when its start left nothing for cleanupFailedWake to prove: a legacy lease goes back as before (giveBack); an HA one only when haHostEmpty reads the slice empty, else it logs, marks the stop uncertain and retains the wake (retainUnprovenWake, sliceOnly) so the reaper retries the slice; +registry:Host x2, +whole:Route x3; no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: A stateless generation with no lease records absent replica/lease obligations without calling Release; stateful/HA release and host-slice proofs remain unchanged. registry:Host@261,registry:Host@649,whole:Route@163,whole:Route@347,whole:Route@351 84d081b6f52fbc17ead557116c67e23c1bca63ff301ddf5c920b9f7eda48bef3
@legacy ee5662ea3e8bdc28a63e673a643b81c25fdf94641ec7861442cfdc0d9d9497d9 internal/activator/opset.go Service.reapUnprovenWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census ruling 292's body; when the retried proof holds for a retained legacy start and the host's stop history is uncertain only because of that start (owedBy), the uncertainty is discharged and the stages the failed wake never reached are recorded as held; any other uncertainty is kept through rememberStopLocked as before. Read sites unchanged; no new read and no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, the sweep's retry of a retained failed wake: a wake retained by giveBackAfterStart (sliceOnly) counts as proven by its process alone, and then, final fix F1, any retained HA wake (haHeld(u.lease, u.rep)) is proven only if haHostEmpty(u.rt) also reads the host slice empty (+whole:Route); unproven, it stays retained with its lease; the legacy and generation proofs are unchanged; only holds an HA release back;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: After the existing generation termination proof, discharge a stateless local obligation without inventing a lease or replica. No proof is weakened. whole:Route@485,whole:Route@539,whole:Route@750 1e0bc33b62e6f14253c4f59daba9879ba5a4c46916faa077ebf0fcd40e7b74b8
@legacy ddb3877d7e7d99ba909a2f44734c8ee62db25db1a9e0c3916b2964a598d694df internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs. whole:Route@127,whole:Route@136 801949c7ce0b25c1b88567019ff5006bf50fca22072988e87719a8617c605d55
-@legacy d968c35d327935cc93e61cbaa6c97f7bab44fe2661bd989174f7c979c0341e1b internal/activator/wakeplan.go Service.spawnPlanned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the first-wake budget and the health bound are the route's (firstWakeBudgetFor, healthBoundFor read Runtime: the rootfs bound for a rootfs row, the binary constants otherwise);rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: for a rootfs row, B's release runs first (runRelease under the wake's lease watch and the plan's gate, planGate); a release that did not pass goes to spawnPlannedRelease; after a passed release B's health window starts from now, not from the wake's start [pf R3.4]; w.bootRan is also true when the release ran. New sites +whole:Route x3 (rt to runRelease, spawnPlannedRelease and the second firstWakeBudgetFor); no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. registry:Host@2528,whole:Route@1156,whole:Route@1245,whole:Route@1617,whole:Route@1636,whole:Route@193,whole:Route@2784,whole:Route@5131,whole:Route@5454,whole:Route@574,whole:Route@706,whole:Route@945 4eed003b41a9cb9b764c59c9030ecde401a34ec2d2e0b9f042888fe6d3fe8872
-@legacy 777ccb3f7022c512f5581b74254f604ba7c980f2b39bc190556cbdf478d17b78 internal/activator/wakeplan.go Service.spawnPlannedRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3 [pf R3.2]: new; spawnPlanned's branch for a release of B that did not pass: only a *ReleaseError (unit proven gone) is B's failure (w.failed on a first wake) and, with a fallback, boots the good build through its own planGate as the existing fallback does; every other outcome records nothing of B and fails the wake; no file read; whole-branch review P2 (292b0b39): the proven release failure's reason is normalised through releaseFailureReason ("release: " / "release timed out: " prefixes, as overlap); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. registry:Host@241,whole:Route@800 9031624680d7b618566ffa86fa7202bba309d9bbd21204d4904566c0bab9c907
-@legacy 2dd7d868fd6de6d40e7984d5c96a46fd6a4b81240b81174d010c7ffe12aef9c0 internal/activator/wakeplan.go Service.spawnPlannedWorker legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. whole:Route@1191,whole:Route@1852,whole:Route@342,whole:Route@563 7d566597a29ae377cfdd0ba55c7c626acaae1b1fe3df2ac186497959cfe3332a
+@legacy a29fec0f7bd13f132088b514de0ae4248f42b83e0fc99a122653dfcf16e45d95 internal/activator/wakeplan.go Service.spawnPlanned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the first-wake budget and the health bound are the route's (firstWakeBudgetFor, healthBoundFor read Runtime: the rootfs bound for a rootfs row, the binary constants otherwise);rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: for a rootfs row, B's release runs first (runRelease under the wake's lease watch and the plan's gate, planGate); a release that did not pass goes to spawnPlannedRelease; after a passed release B's health window starts from now, not from the wake's start [pf R3.4]; w.bootRan is also true when the release ran. New sites +whole:Route x3 (rt to runRelease, spawnPlannedRelease and the second firstWakeBudgetFor); no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. registry:Host@2528,whole:Route@1156,whole:Route@1245,whole:Route@1617,whole:Route@1636,whole:Route@193,whole:Route@2784,whole:Route@5131,whole:Route@5454,whole:Route@574,whole:Route@706,whole:Route@945 422843300181eef6c1d52915c0579ad0d617e2b4ee5733330d980cec8e13a382
+@legacy 7c6305e376d861b2d897640e728af81cdd3155c15411285b61c27a4494ce95fe internal/activator/wakeplan.go Service.spawnPlannedRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3 [pf R3.2]: new; spawnPlanned's branch for a release of B that did not pass: only a *ReleaseError (unit proven gone) is B's failure (w.failed on a first wake) and, with a fallback, boots the good build through its own planGate as the existing fallback does; every other outcome records nothing of B and fails the wake; no file read; whole-branch review P2 (292b0b39): the proven release failure's reason is normalised through releaseFailureReason ("release: " / "release timed out: " prefixes, as overlap); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. registry:Host@241,whole:Route@800 899a604226df2b275f74371a33e3941c6a4cca8e608adb95f10729402d208447
+@legacy 4282fe21a302b9de71351dd3a3388a8b3c0482616bf97f6168f80140fb964234 internal/activator/wakeplan.go Service.spawnPlannedWorker legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. whole:Route@1191,whole:Route@1852,whole:Route@342,whole:Route@563 c474b4da0fd88d611917515d90257e4532fa790086d73c546bba877d6cc4522d
@legacy 33d60a8c0abaf72ce2a3f73d927dadd3c15f54beb0cb37e2f0753545b18d7f06 internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. registry:Host@4776 717574378829734fb3461a7ec0a4e4e9089466745685d39008ad51b571ddf993
@legacy f4edd209fd6fe7d50fd79c2f6ecf96bf255d5301f094ca86a5882acf5fe8ba20 internal/host/agent.go haRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos: activator.Config.Record, the closure the HA classification calls on a lifetime index miss: opens the deployment store once (openDeployStore, kept under a mutex) and reads the host's record through judgedRecord(store, judge, release.RouteAccount(rt), rt.App, rt.Host) (CI fix: provision.ReadRecordJudged under the box's lifetime judge, which also GETs the host's incarnation slot control/host-incarnations/<host>.json from the same deployment store; a record the slot no longer vouches for, or a tombstone, reads as os.ErrNotExist; a nil judge, host claims on, is provision.GetRecord exactly), turned into a lifetime entry by provision.LifetimeEntryOf; the reads are the row it is handed (registry:App, registry:Host, whole:Route); the record is the console-written deployment record the reconcile passes already read; an open or read error is returned and the wake fails closed; root never calls it;rev3=census-ruling-stateless-replicas-1;basis=Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. registry:App@596,registry:Host@604,whole:Route@591 db6d777c93afde9836873ce72b6cbb62a55567eb3fb01f85f7e1e12274e0c66d
@legacy e2d480482d14aee10d9a2451d91501d1960728889d9d6a9a4961fe97c56953b2 internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source. file:Exec@284,file:Open@188,file:Query@368,file:Query@5758,file:Query@6237,file:Query@7223,file:Query@7919,file:Query@8831,file:Query@9888,registry:ClaimIncarnation@1448,registry:ClaimIncarnation@4666,registry:ClaimIncarnation@4743,registry:ClaimOwner@1492,registry:ClaimOwner@4867,registry:ClaimOwner@4932,registry:ClaimRowID@1511,registry:ClaimRowID@4959,registry:ClaimRowID@5025,registry:ClaimStamp@1473,registry:ClaimStamp@4776,registry:ClaimStamp@4840,registry:Incarnation@1556,registry:Incarnation@5246,registry:Incarnation@5310,registry:ServingSeq@1575,registry:ServingSeq@5337,registry:ServingSeq@5400,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 20459fd46b63a9ec4eee58920a98ed4a2d01fdaad6a374d66654ba74650d847a
@@ -23,7 +23,7 @@
@legacy 3bbd906ea83bd2395f513d5dd4aba02ce12f14d63c95095c4a292d728f276881 internal/registry/registry.go Registry.SnapshotFingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with incarnation and serving_seq hashed, tagged, only when non-zero (snapshotPairCols), so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-region-ha-p1a;basis=hashes the new ha column only when it is set (non-empty and not "0"), tagged, so a registry with no born-HA row digests as before; the same twelve sites, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): fleet_assigned and fleet_label join snapshotWhenSetCols (hashed only when set), and fleet_moved is hashed like ha, only when non-zero. Read sites unchanged (12). Registry side, not root; rows without them hash as before.;rev3=census-ruling-stateless-replicas-1;basis=Hash the additive stateless boolean only when nonzero in the existing snapshot query; legacy false adds no bytes; no new read source. file:Exec@300,file:Open@204,file:Query@3742,file:Query@385,file:Query@4161,file:Query@4640,registry:Text@174,registry:path@223,registry:remote@63,registry:remote@95,whole:remoteClient@65,whole:remoteClient@97 5cada4b451741a41627d6df9310720ac68a7a1d3a8753d45442d9eae0034a91f
@legacy 76170452f5e7f9f2ac77aad1b3f24f461c2d72da1db0d621ec26061ee3d533c0 internal/registry/registry.go upsertRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-socket-follow-338;basis=#338: Upsert's unchanged statement moved into a helper so it can run on the database or inside a transaction;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2 (runtimeFixed in the registry): takes a guard appended to the ON CONFLICT WHERE (UpsertUnlessRootfs passes routes.runtime = ''); a stored row with a runtime keeps its region and hibernate unless the tenant changed; replication is cleared only when the effective runtime is empty; no new read source, same SQLite table;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: on a refused conflict, the forward check reads the host (+registry:Host) to answer ErrForwardRow; the statement carries kind <> 'forward'. A refusal only.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): the conflict arm gains fleet_assigned (the excluded value on a re-tenanted host, else kept when the writer carries '') and fleet_moved (excluded on a re-tenanted host, else MAX of stored and excluded). Read sites unchanged (3). The same statement guard (claim ownership, kind <> 'forward') applies.;rev3=census-ruling-stateless-replicas-1;basis=Persist the stateless projection in the existing guarded upsert; no new read. file:Exec@116,registry:Host@4720,whole:Route@4596 ebc718cda38d18914e19680c1e6b9ba68b4f8fd43318be417569951b78c578f5
@legacy 1e4efb560a06cb532c8d4caf719ff375c27a03a5651b26c59d81f271c70da628 ship_check.go rootfsCheck.runArgs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-1;basis=root-input (J4, as main's db.go units); the carlos CLI on a person's machine, as the person (no box unit): new (rootfs Plan 1), builds the docker or podman run argv for one check container; the scanner matches the word Command, here a field of release.Process (a process's argv), not os/exec; reads no file; decides nothing for root;rev3=census-ruling-rootfs-check-volumes;basis=R2 P1: the data and run volume mounts (-v) now carry :nocopy through rootfsCheck.volumeMount, so Docker and Podman never fill an empty check volume from the image directory at the mount point (which would reset the prepared owner and mode); same volumes, same paths, same probe mount, nothing else in the argv changed. Runs on the person's machine as the person; no box unit; no read added.;rev3=census-ruling-stateless-replicas-1;basis=Stateless local checks mount only the run volume and omit the database mount; same probe read, no new read. file:Command@887,file:Command@971 e684fd3273527a209460ed81e5bcd472a4282f46830fe580e5f07f0b0d876684
-@legacy fbc2fe68cf99af02ff338822c81bef880351191d720d623c7ce82bae0096ae85 internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: The former doWake body, not deleted logic: refresh/admit/fence/layout checks remain. Select and verify the actual staged identity before serving Acquire; use canonical mode to call doStatelessWake. Keep SQLite acquire/restore/seed/marker/replicate only in the stateful arm, with the post-acquisition selection recheck and existing cleanup proofs. Fix 3a round 1 I1/I3a: admit config directly only for stateless and mark runtime ownership refusals. Stateful Acquire/Restore precede selection and pending publication; canonical mode inspection is separate, replan precedes settlement. No new file path or database authority. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@31365,registry:GoodVersion@16906,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@581,registry:Host@6378,registry:Replication@15533,registry:Replication@15662,registry:Replication@15681,registry:Replication@15762,registry:Replication@31268,registry:Replication@31400,registry:Seed@20090,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11016,registry:Stateless@11070,registry:Stateless@9385,registry:Stateless@9405,registry:Stateless@9786,whole:Route@10009,whole:Route@10107,whole:Route@10198,whole:Route@10293,whole:Route@10412,whole:Route@10466,whole:Route@10738,whole:Route@10914,whole:Route@10918,whole:Route@11471,whole:Route@11772,whole:Route@13077,whole:Route@13754,whole:Route@14635,whole:Route@15513,whole:Route@15764,whole:Route@1630,whole:Route@17109,whole:Route@17700,whole:Route@17865,whole:Route@18546,whole:Route@19100,whole:Route@19361,whole:Route@20191,whole:Route@20262,whole:Route@2066,whole:Route@2071,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@22674,whole:Route@24532,whole:Route@25178,whole:Route@26485,whole:Route@26639,whole:Route@27138,whole:Route@27208,whole:Route@27795,whole:Route@28880,whole:Route@29311,whole:Route@29519,whole:Route@29573,whole:Route@30502,whole:Route@30687,whole:Route@31477,whole:Route@3156,whole:Route@31889,whole:Route@31938,whole:Route@32316,whole:Route@3250,whole:Route@3317,whole:Route@33538,whole:Route@33633,whole:Route@34474,whole:Route@361,whole:Route@4011,whole:Route@566,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7853,whole:Route@8836,whole:Route@9060,whole:Route@9124,whole:Route@9475,whole:Route@9664,whole:Route@9741,whole:Route@9870 01ea185cdb9e77db35da4dee1bbc911795269a5345d51a1c937302618cb22c3c
+@legacy b92d9f97edc49340b16b55473b4b042b3a2427d436505a3bc32c84c1543f8a00 internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: The former doWake body, not deleted logic: refresh/admit/fence/layout checks remain. Select and verify the actual staged identity before serving Acquire; use canonical mode to call doStatelessWake. Keep SQLite acquire/restore/seed/marker/replicate only in the stateful arm, with the post-acquisition selection recheck and existing cleanup proofs. Fix 3a round 1 I1/I3a: admit config directly only for stateless and mark runtime ownership refusals. Stateful Acquire/Restore precede selection and pending publication; canonical mode inspection is separate, replan precedes settlement. Fix round 2 N2/N3: retain the original route/pin projection for post-lease declaration checks; reuse the unplanned capture so a live-link repoint cannot change the selected build. Stateful capture and changed-copy errors remain start failures after Acquire/Restore. A failed preliminary verification supplies no cached mode observation. No new file path or database authority. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32159,registry:GoodVersion@17189,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@581,registry:Host@6378,registry:Replication@15816,registry:Replication@15945,registry:Replication@15964,registry:Replication@16045,registry:Replication@32062,registry:Replication@32194,registry:Seed@20884,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11299,registry:Stateless@11353,registry:Stateless@19598,registry:Stateless@9211,registry:Stateless@9548,registry:Stateless@9568,registry:Stateless@9688,registry:Stateless@9927,whole:Route@10251,whole:Route@10349,whole:Route@10440,whole:Route@10572,whole:Route@10695,whole:Route@10749,whole:Route@11021,whole:Route@11197,whole:Route@11201,whole:Route@11754,whole:Route@12055,whole:Route@13360,whole:Route@14037,whole:Route@14918,whole:Route@15796,whole:Route@16047,whole:Route@1630,whole:Route@17392,whole:Route@17983,whole:Route@18148,whole:Route@19084,whole:Route@19880,whole:Route@20155,whole:Route@2066,whole:Route@2071,whole:Route@20985,whole:Route@21056,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23468,whole:Route@25326,whole:Route@25972,whole:Route@27279,whole:Route@27433,whole:Route@27932,whole:Route@28002,whole:Route@28589,whole:Route@29674,whole:Route@30105,whole:Route@30313,whole:Route@30367,whole:Route@31296,whole:Route@31481,whole:Route@3156,whole:Route@32271,whole:Route@3250,whole:Route@32683,whole:Route@32732,whole:Route@33110,whole:Route@3317,whole:Route@34332,whole:Route@34427,whole:Route@35268,whole:Route@361,whole:Route@4011,whole:Route@566,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7853,whole:Route@8836,whole:Route@9060,whole:Route@9124,whole:Route@9168,whole:Route@9657,whole:Route@9872 301235a9a279ec4b9bb468401c32963a64ce0469e4b5f43a2fe0a603fa7f6215
@legacy 2453145296b8d8c65ae171bac8d202325b526b73af9e8142592b0129f7b9af08 internal/activator/escrow.go ExecBackend.escrowMintGuardWithAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: prior mint decision moved intact under the wrapper, except its authority test now selects by verified mode. Reads only the existing escrow bucket and local conflict marker via existing helpers; keyless, no-store and bucket-knowledge behavior unchanged for stateful. registry:Host@696,whole:Route@1082,whole:Route@138,whole:Route@222,whole:Route@304,whole:Route@540,whole:Route@779,whole:Route@916 571c358d71cfe03d93f1a3fa4c67465aebe4c139b92bf593e3646c45490c0f35
@legacy d972735920ad817ca9a53ddd5ebf07e7baca8e13231911313ff5a9c4df05e63d internal/activator/escrow_authority.go ExecBackend.followerEscrowEnv legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: require a readable complete sealed trio from the existing files manifest, restore missing local files through the existing beneath/no-replace helper, capture env and compare local trio/minted variables against escrow before returning it. Local reads remain under the classified host data directory with ReadBeneathLimit; same sealed bucket keys, no mint, publisher or remote write. Conflict refusal uses the existing marker. registry:Host@1065,registry:Host@1351,registry:Host@392,registry:Host@824,whole:Route@1185,whole:Route@1260,whole:Route@1695,whole:Route@1818,whole:Route@322,whole:Route@479,whole:Route@599,whole:Route@709 a91dc2bfff249c85803712c67aee834ef0dec73a15e58cd1744293f1ad34a749
@legacy 5de300e82a159500458789ade665f935e8f270a1dd2a7bb4370577d7da9a0900 internal/activator/escrow_authority.go ExecBackend.holdsEscrowAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: inspect verified route mode, use the existing held coordinator lookup with Err/Lost for stateless, otherwise the original holdsLease; no acquisition, I/O or process stop. registry:Host@111,registry:Host@153,registry:Stateless@74 b0494d2c2e374a7780705665f1d80e584aa7783a551ffc28f4d7d3e7b1afe8e4
@@ -80,6 +80,7 @@
@legacy 3189111bdce9af1ad57a8f5dea9a4ff20f5bb42252044a939fd7e1a46b3d0833 internal/registry/runtime.go Route.ActivatorOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator manages this instance: it hibernates or has any runtime; reads Kind, Hibernate, Runtime;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Include projected stateless binary instances in local lifecycle/residency selection. Launch still requires the selected build canonical declaration; this flag never bypasses database preparation by itself. registry:Hibernate@72,registry:Kind@47,registry:Runtime@87,registry:Stateless@106 3dbd1801c0a3c370a249b9108c2f56c6ef716ad482207245cbf1130ad5351d2b
@legacy b3d06fb2ce57397f32f2166621eb167cb89294fa7a8ebc462727592bd4d43deb internal/registry/runtime.go Route.Resident legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: an always-on rootfs instance (an instance with runtime rootfs-v1 that does not hibernate); reads Kind, Runtime, Hibernate;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Include projected stateless binary instances in local lifecycle/residency selection. Launch still requires the selected build canonical declaration; this flag never bypasses database preparation by itself. registry:Hibernate@118,registry:Kind@41,registry:Runtime@81,registry:Stateless@100 4d9d7df1e8cb21f72ee403391e29bbd1839f29cc8d259557f2ff02dbe20faa8d
@legacy 8c4a6dafdd650b56d9c1430b0a004c865930e8c33e2f8ca96efc0cd2abca1d30 internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata. whole:Route@423 942fe545a6b3bcd1f3dfc5469e8e6ef2850766046ab151f748075bfbc44feff2
+@legacy 33d11e53dbe99a54adf62993ac0bb436ea92a0d91ab0f924e25d97f2b81fb73b internal/activator/backend_exec.go ExecBackend.LiveIdentity legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 2 N3: resolve the same live-link chain and hash the captured path with the existing agent digest cache; later VerifyStaged calls reuse that digest for an unchanged settled file. Existing settle window, file-identity invalidation and root uncached verification stay intact. Host is read again only to retain the hash error context. No new path or exec authority. registry:Host@142,registry:Host@253,registry:Host@335,registry:Host@492 6fa387e677239e26bd87d9dadcc02f88688c634ba2f519b2873586e30d2220d7
@legacy fd9f21d35c7f8fa76f648360b176743426447653d151a412ab80f85545c8fa35 internal/activator/backend_exec.go ExecBackend.StartWorkerStaged legacy accepted-legacy accepted-legacy;rev3=census-ruling-zddr3;basis=Census ruling zddr3: changed legacy row (comment-only change describing the shim placement); the same class as the accepted-legacy Manager.startIn and placementLive under fix1-merge-review (existing agent delegated-cgroup management remains legacy); no root decision; no registry, /data, release or claim reads. Boundary: the agent's own delegated cgroup subtree (including its scratch probe child), /proc/self, and pipes to and from its own parent, running as carlos.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. file:Command@3507,registry:Args@227,registry:Args@378,registry:Host@1388,registry:Host@2610,registry:Host@3646,registry:Host@369,registry:Host@4532,registry:Host@473,registry:Host@589,registry:Host@685,whole:Route@1148,whole:Route@1692,whole:Route@2238,whole:Route@3459,whole:Route@3577,whole:Route@3607,whole:Route@4373,whole:Route@4463 064ad933d522ffbbf1cb335abafc545af7f81ee7b30a905425de32ca9a882aa2
@legacy 551465e5e10d030700cca3722ba5b84b83a063e071cdbfe5645f983b73881d80 internal/activator/backend_exec.go ExecBackend.startSidecarChildFrom legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. file:Command@886,registry:Host@1348,registry:Host@1407,whole:Route@1166,whole:Route@150,whole:Route@480,whole:Route@840,whole:Route@955 e1841fe5edbc5e9e6f8f4a440a1ffe8d799cf97c4502f152ac23b97841fc95c2
@legacy 5bd5f1321c588fb971e1eab323c55c66cf644cb171a9331a562e8b9a933e3038 internal/activator/escrow.go ExecBackend.EscrowSweep legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new, the agent as carlos (carlos-edge.service), no root caller, from escrowLoop: classifies each row against the rows handed in (Classify), keeps eligible rows known not HA from memory (haKnown, no read), and in host order from a round-robin cursor stats each escrowed file (stampAt) and publishes the changed ones, 8 at a time, at most 256 a sweep (sweepPublish); a box without a files store or key does nothing; opens nothing outside the rows' own data directories; writes only the hibernate bucket's files/0 prefix and the ledger Fix round 1: a host whose instance lease this box does not hold (holdsLease) is skipped, and one with a conflict marker counts as failing and is not published; the report is tallied through one lock (P1-4). Durability 3a Task 5: for each lease-held candidate, the host's held publisher (st.pub under the escrow lock) is handed to noteRawBaseline. Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host sites are rt.Host as the state key and the detector's argument.;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: use coordinator authority for stateless projections and the unchanged serving lease for stateful rows; followers are skipped without I/O; no new poll loop or file path. registry:Host@1009,registry:Host@1046,registry:Host@1136,registry:Host@1292,registry:Host@1311,registry:Host@1462,registry:Host@1995,registry:Host@2341,registry:Host@2598,registry:Host@2672,registry:Host@536,registry:Host@800,registry:Host@938,whole:Route@1193,whole:Route@1197,whole:Route@1214,whole:Route@1301,whole:Route@1320,whole:Route@1471,whole:Route@1789,whole:Route@1997,whole:Route@2227,whole:Route@2343,whole:Route@2600,whole:Route@2674,whole:Route@356,whole:Route@519,whole:Route@587,whole:Route@653,whole:Route@706,whole:Route@771 0e7b85ae702f5cf4ff2e961787d7d3a8170ca1b0fa06b0991d6dc1b54f17bfa1
@@ -106,9 +107,9 @@ internal/activator/maintenance.go Service.cleanupFailedWake legacy accepted-lega
internal/activator/maintenance.go Service.giveBackAfterStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (final fix F1), the agent as carlos: a failed wake's release when its start left nothing for cleanupFailedWake to prove: a legacy lease goes back as before (giveBack); an HA one only when haHostEmpty reads the slice empty, else it logs, marks the stop uncertain and retains the wake (retainUnprovenWake, sliceOnly) so the reaper retries the slice; +registry:Host x2, +whole:Route x3; no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: A stateless generation with no lease records absent replica/lease obligations without calling Release; stateful/HA release and host-slice proofs remain unchanged. registry:Host@261,registry:Host@649,whole:Route@163,whole:Route@347,whole:Route@351 84d081b6f52fbc17ead557116c67e23c1bca63ff301ddf5c920b9f7eda48bef3
internal/activator/opset.go Service.reapUnprovenWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census ruling 292's body; when the retried proof holds for a retained legacy start and the host's stop history is uncertain only because of that start (owedBy), the uncertainty is discharged and the stages the failed wake never reached are recorded as held; any other uncertainty is kept through rememberStopLocked as before. Read sites unchanged; no new read and no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, the sweep's retry of a retained failed wake: a wake retained by giveBackAfterStart (sliceOnly) counts as proven by its process alone, and then, final fix F1, any retained HA wake (haHeld(u.lease, u.rep)) is proven only if haHostEmpty(u.rt) also reads the host slice empty (+whole:Route); unproven, it stays retained with its lease; the legacy and generation proofs are unchanged; only holds an HA release back;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: After the existing generation termination proof, discharge a stateless local obligation without inventing a lease or replica. No proof is weakened. whole:Route@485,whole:Route@539,whole:Route@750 1e0bc33b62e6f14253c4f59daba9879ba5a4c46916faa077ebf0fcd40e7b74b8
internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs. whole:Route@127,whole:Route@136 801949c7ce0b25c1b88567019ff5006bf50fca22072988e87719a8617c605d55
-internal/activator/wakeplan.go Service.spawnPlanned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the first-wake budget and the health bound are the route's (firstWakeBudgetFor, healthBoundFor read Runtime: the rootfs bound for a rootfs row, the binary constants otherwise);rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: for a rootfs row, B's release runs first (runRelease under the wake's lease watch and the plan's gate, planGate); a release that did not pass goes to spawnPlannedRelease; after a passed release B's health window starts from now, not from the wake's start [pf R3.4]; w.bootRan is also true when the release ran. New sites +whole:Route x3 (rt to runRelease, spawnPlannedRelease and the second firstWakeBudgetFor); no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. registry:Host@2528,whole:Route@1156,whole:Route@1245,whole:Route@1617,whole:Route@1636,whole:Route@193,whole:Route@2784,whole:Route@5131,whole:Route@5454,whole:Route@574,whole:Route@706,whole:Route@945 4eed003b41a9cb9b764c59c9030ecde401a34ec2d2e0b9f042888fe6d3fe8872
-internal/activator/wakeplan.go Service.spawnPlannedRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3 [pf R3.2]: new; spawnPlanned's branch for a release of B that did not pass: only a *ReleaseError (unit proven gone) is B's failure (w.failed on a first wake) and, with a fallback, boots the good build through its own planGate as the existing fallback does; every other outcome records nothing of B and fails the wake; no file read; whole-branch review P2 (292b0b39): the proven release failure's reason is normalised through releaseFailureReason ("release: " / "release timed out: " prefixes, as overlap); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. registry:Host@241,whole:Route@800 9031624680d7b618566ffa86fa7202bba309d9bbd21204d4904566c0bab9c907
-internal/activator/wakeplan.go Service.spawnPlannedWorker legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 1 M1: fallbackWakeError wraps only wakeModeChange from the fallback; ordinary fallback errors keep legacy text-only classification while the primary failure remains wrapped. No new reads. whole:Route@1191,whole:Route@1852,whole:Route@342,whole:Route@563 7d566597a29ae377cfdd0ba55c7c626acaae1b1fe3df2ac186497959cfe3332a
+internal/activator/wakeplan.go Service.spawnPlanned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the first-wake budget and the health bound are the route's (firstWakeBudgetFor, healthBoundFor read Runtime: the rootfs bound for a rootfs row, the binary constants otherwise);rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: for a rootfs row, B's release runs first (runRelease under the wake's lease watch and the plan's gate, planGate); a release that did not pass goes to spawnPlannedRelease; after a passed release B's health window starts from now, not from the wake's start [pf R3.4]; w.bootRan is also true when the release ran. New sites +whole:Route x3 (rt to runRelease, spawnPlannedRelease and the second firstWakeBudgetFor); no file read;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. registry:Host@2528,whole:Route@1156,whole:Route@1245,whole:Route@1617,whole:Route@1636,whole:Route@193,whole:Route@2784,whole:Route@5131,whole:Route@5454,whole:Route@574,whole:Route@706,whole:Route@945 422843300181eef6c1d52915c0579ad0d617e2b4ee5733330d980cec8e13a382
+internal/activator/wakeplan.go Service.spawnPlannedRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3 [pf R3.2]: new; spawnPlanned's branch for a release of B that did not pass: only a *ReleaseError (unit proven gone) is B's failure (w.failed on a first wake) and, with a fallback, boots the good build through its own planGate as the existing fallback does; every other outcome records nothing of B and fails the wake; no file read; whole-branch review P2 (292b0b39): the proven release failure's reason is normalised through releaseFailureReason ("release: " / "release timed out: " prefixes, as overlap); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. registry:Host@241,whole:Route@800 899a604226df2b275f74371a33e3941c6a4cca8e608adb95f10729402d208447
+internal/activator/wakeplan.go Service.spawnPlannedWorker legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Preserve the typed fallback mode-change refusal through error wrapping so the complete wake path selects the fallback own database mode. Existing stop-before-fallback proof stays required. Fix 3a round 2 N1 supersedes M1: failed-too arms retain the pre-Plan-1 %w fallback cause, including unproven generation, legacy-start and ReleaseError classifications. Only not-started arms use text-only fallback errors with the typed wakeModeChange exception. Primary failure stays wrapped. No new reads. whole:Route@1191,whole:Route@1852,whole:Route@342,whole:Route@563 c474b4da0fd88d611917515d90257e4532fa790086d73c546bba877d6cc4522d
internal/host/agent.go fastConvergeLoop authority B3 rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): every pass context carries the box's lifetime judge (provision.WithLifetimes) and the reconcile config is boxProvisionConfig's; read sites unchanged, offsets moved; B3 authority retained;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 12: its pass config is now BoxProvisionConfig(reg, os.Getenv, judge, configure) (BoxProvisionConfig replaces boxProvisionConfig: the hub predicate hubArmed and, on the hub, ReconcileConfig.FleetOwners from hubFleetOwners); a call, no read site; read sites unchanged (2); B3 authority retained.;rev3=census-ruling-stateless-replicas-1;basis=Hand the service coordinator's Tick to the existing fast tick; no timer or new read site. Task 3b: give the existing fast loop the existing full-pass signal even when the change index is disarmed, so a stateless wake requests reconciliation without a new timer or bucket poll. whole:Route@7790,whole:Route@8353 6cc4029393c6b6394abe60eb2c6468264ed4c4fa063fc7888dc2ae5a88341c5d
internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. registry:Host@4776 717574378829734fb3461a7ec0a4e4e9089466745685d39008ad51b571ddf993
internal/host/agent.go haRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos: activator.Config.Record, the closure the HA classification calls on a lifetime index miss: opens the deployment store once (openDeployStore, kept under a mutex) and reads the host's record through judgedRecord(store, judge, release.RouteAccount(rt), rt.App, rt.Host) (CI fix: provision.ReadRecordJudged under the box's lifetime judge, which also GETs the host's incarnation slot control/host-incarnations/<host>.json from the same deployment store; a record the slot no longer vouches for, or a tombstone, reads as os.ErrNotExist; a nil judge, host claims on, is provision.GetRecord exactly), turned into a lifetime entry by provision.LifetimeEntryOf; the reads are the row it is handed (registry:App, registry:Host, whole:Route); the record is the console-written deployment record the reconcile passes already read; an open or read error is returned and the wake fails closed; root never calls it;rev3=census-ruling-stateless-replicas-1;basis=Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. registry:App@596,registry:Host@604,whole:Route@591 db6d777c93afde9836873ce72b6cbb62a55567eb3fb01f85f7e1e12274e0c66d
@@ -120,7 +121,7 @@ internal/registry/registry.go upsertRoute legacy accepted-legacy accepted-legacy
internal/rollout/failures.go FailureBook.saveLocked authority E3 rev3=PROPOSED-p3;run=8;identity=root adoption uid 0 or legacy rollout uid carlos;basis=root instance uses checked store writer; legacy instances retain the original atomic file writer and epoch semantics;rev3=census-ruling-stateless-replicas-1;basis=Persist the additive replica_releases selection carrier in the existing failure-book atomic write; no new path, record writer or authority. IDs are returned only after a successful save. 443cdc68cd2c5cae070a81e4b0d98bbd8551adba8de795e18f5b505f4a03f1d7
internal/rollout/failures.go OpenFailureBook authority E1,E3,J1,J4 fix1-merge-review;basis=Loads schema-three durable generations and refuses unsafe identity recovery on entropy failure.;rev3=census-ruling-stateless-replicas-1;basis=Load the additive replica_releases carrier from the same existing failure-book ReadFile; unchanged schema acceptance, identity recovery, reconciliation and read site. No additional read. file:ReadFile@136 b92f6a033f129bffb158e8768b1b14ee88e855f67c2f0da360c65c93d27d8cf8
ship_check.go rootfsCheck.runArgs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-1;basis=root-input (J4, as main's db.go units); the carlos CLI on a person's machine, as the person (no box unit): new (rootfs Plan 1), builds the docker or podman run argv for one check container; the scanner matches the word Command, here a field of release.Process (a process's argv), not os/exec; reads no file; decides nothing for root;rev3=census-ruling-rootfs-check-volumes;basis=R2 P1: the data and run volume mounts (-v) now carry :nocopy through rootfsCheck.volumeMount, so Docker and Podman never fill an empty check volume from the image directory at the mount point (which would reset the prepared owner and mode); same volumes, same paths, same probe mount, nothing else in the argv changed. Runs on the person's machine as the person; no box unit; no read added.;rev3=census-ruling-stateless-replicas-1;basis=Stateless local checks mount only the run volume and omit the database mount; same probe read, no new read. file:Command@887,file:Command@971 e684fd3273527a209460ed81e5bcd472a4282f46830fe580e5f07f0b0d876684
-internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: The former doWake body, not deleted logic: refresh/admit/fence/layout checks remain. Select and verify the actual staged identity before serving Acquire; use canonical mode to call doStatelessWake. Keep SQLite acquire/restore/seed/marker/replicate only in the stateful arm, with the post-acquisition selection recheck and existing cleanup proofs. Fix 3a round 1 I1/I3a: admit config directly only for stateless and mark runtime ownership refusals. Stateful Acquire/Restore precede selection and pending publication; canonical mode inspection is separate, replan precedes settlement. No new file path or database authority. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@31365,registry:GoodVersion@16906,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@581,registry:Host@6378,registry:Replication@15533,registry:Replication@15662,registry:Replication@15681,registry:Replication@15762,registry:Replication@31268,registry:Replication@31400,registry:Seed@20090,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11016,registry:Stateless@11070,registry:Stateless@9385,registry:Stateless@9405,registry:Stateless@9786,whole:Route@10009,whole:Route@10107,whole:Route@10198,whole:Route@10293,whole:Route@10412,whole:Route@10466,whole:Route@10738,whole:Route@10914,whole:Route@10918,whole:Route@11471,whole:Route@11772,whole:Route@13077,whole:Route@13754,whole:Route@14635,whole:Route@15513,whole:Route@15764,whole:Route@1630,whole:Route@17109,whole:Route@17700,whole:Route@17865,whole:Route@18546,whole:Route@19100,whole:Route@19361,whole:Route@20191,whole:Route@20262,whole:Route@2066,whole:Route@2071,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@22674,whole:Route@24532,whole:Route@25178,whole:Route@26485,whole:Route@26639,whole:Route@27138,whole:Route@27208,whole:Route@27795,whole:Route@28880,whole:Route@29311,whole:Route@29519,whole:Route@29573,whole:Route@30502,whole:Route@30687,whole:Route@31477,whole:Route@3156,whole:Route@31889,whole:Route@31938,whole:Route@32316,whole:Route@3250,whole:Route@3317,whole:Route@33538,whole:Route@33633,whole:Route@34474,whole:Route@361,whole:Route@4011,whole:Route@566,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7853,whole:Route@8836,whole:Route@9060,whole:Route@9124,whole:Route@9475,whole:Route@9664,whole:Route@9741,whole:Route@9870 01ea185cdb9e77db35da4dee1bbc911795269a5345d51a1c937302618cb22c3c
+internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: The former doWake body, not deleted logic: refresh/admit/fence/layout checks remain. Select and verify the actual staged identity before serving Acquire; use canonical mode to call doStatelessWake. Keep SQLite acquire/restore/seed/marker/replicate only in the stateful arm, with the post-acquisition selection recheck and existing cleanup proofs. Fix 3a round 1 I1/I3a: admit config directly only for stateless and mark runtime ownership refusals. Stateful Acquire/Restore precede selection and pending publication; canonical mode inspection is separate, replan precedes settlement. Fix round 2 N2/N3: retain the original route/pin projection for post-lease declaration checks; reuse the unplanned capture so a live-link repoint cannot change the selected build. Stateful capture and changed-copy errors remain start failures after Acquire/Restore. A failed preliminary verification supplies no cached mode observation. No new file path or database authority. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32159,registry:GoodVersion@17189,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@581,registry:Host@6378,registry:Replication@15816,registry:Replication@15945,registry:Replication@15964,registry:Replication@16045,registry:Replication@32062,registry:Replication@32194,registry:Seed@20884,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11299,registry:Stateless@11353,registry:Stateless@19598,registry:Stateless@9211,registry:Stateless@9548,registry:Stateless@9568,registry:Stateless@9688,registry:Stateless@9927,whole:Route@10251,whole:Route@10349,whole:Route@10440,whole:Route@10572,whole:Route@10695,whole:Route@10749,whole:Route@11021,whole:Route@11197,whole:Route@11201,whole:Route@11754,whole:Route@12055,whole:Route@13360,whole:Route@14037,whole:Route@14918,whole:Route@15796,whole:Route@16047,whole:Route@1630,whole:Route@17392,whole:Route@17983,whole:Route@18148,whole:Route@19084,whole:Route@19880,whole:Route@20155,whole:Route@2066,whole:Route@2071,whole:Route@20985,whole:Route@21056,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23468,whole:Route@25326,whole:Route@25972,whole:Route@27279,whole:Route@27433,whole:Route@27932,whole:Route@28002,whole:Route@28589,whole:Route@29674,whole:Route@30105,whole:Route@30313,whole:Route@30367,whole:Route@31296,whole:Route@31481,whole:Route@3156,whole:Route@32271,whole:Route@3250,whole:Route@32683,whole:Route@32732,whole:Route@33110,whole:Route@3317,whole:Route@34332,whole:Route@34427,whole:Route@35268,whole:Route@361,whole:Route@4011,whole:Route@566,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7853,whole:Route@8836,whole:Route@9060,whole:Route@9124,whole:Route@9168,whole:Route@9657,whole:Route@9872 301235a9a279ec4b9bb468401c32963a64ce0469e4b5f43a2fe0a603fa7f6215
internal/activator/escrow.go ExecBackend.escrowMintGuardWithAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: prior mint decision moved intact under the wrapper, except its authority test now selects by verified mode. Reads only the existing escrow bucket and local conflict marker via existing helpers; keyless, no-store and bucket-knowledge behavior unchanged for stateful. registry:Host@696,whole:Route@1082,whole:Route@138,whole:Route@222,whole:Route@304,whole:Route@540,whole:Route@779,whole:Route@916 571c358d71cfe03d93f1a3fa4c67465aebe4c139b92bf593e3646c45490c0f35
internal/activator/escrow_authority.go ExecBackend.followerEscrowEnv legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: require a readable complete sealed trio from the existing files manifest, restore missing local files through the existing beneath/no-replace helper, capture env and compare local trio/minted variables against escrow before returning it. Local reads remain under the classified host data directory with ReadBeneathLimit; same sealed bucket keys, no mint, publisher or remote write. Conflict refusal uses the existing marker. registry:Host@1065,registry:Host@1351,registry:Host@392,registry:Host@824,whole:Route@1185,whole:Route@1260,whole:Route@1695,whole:Route@1818,whole:Route@322,whole:Route@479,whole:Route@599,whole:Route@709 a91dc2bfff249c85803712c67aee834ef0dec73a15e58cd1744293f1ad34a749
internal/activator/escrow_authority.go ExecBackend.holdsEscrowAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: inspect verified route mode, use the existing held coordinator lookup with Err/Lost for stateless, otherwise the original holdsLease; no acquisition, I/O or process stop. registry:Host@111,registry:Host@153,registry:Stateless@74 b0494d2c2e374a7780705665f1d80e584aa7783a551ffc28f4d7d3e7b1afe8e4
@@ -178,6 +179,7 @@ internal/registry/registry.go scanRoute legacy accepted-legacy accepted-legacy;r
internal/registry/runtime.go Route.ActivatorOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator manages this instance: it hibernates or has any runtime; reads Kind, Hibernate, Runtime;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Include projected stateless binary instances in local lifecycle/residency selection. Launch still requires the selected build canonical declaration; this flag never bypasses database preparation by itself. registry:Hibernate@72,registry:Kind@47,registry:Runtime@87,registry:Stateless@106 3dbd1801c0a3c370a249b9108c2f56c6ef716ad482207245cbf1130ad5351d2b
internal/registry/runtime.go Route.Resident legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: an always-on rootfs instance (an instance with runtime rootfs-v1 that does not hibernate); reads Kind, Runtime, Hibernate;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Include projected stateless binary instances in local lifecycle/residency selection. Launch still requires the selected build canonical declaration; this flag never bypasses database preparation by itself. registry:Hibernate@118,registry:Kind@41,registry:Runtime@81,registry:Stateless@100 4d9d7df1e8cb21f72ee403391e29bbd1839f29cc8d259557f2ff02dbe20faa8d
internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata. whole:Route@423 942fe545a6b3bcd1f3dfc5469e8e6ef2850766046ab151f748075bfbc44feff2
+internal/activator/backend_exec.go ExecBackend.LiveIdentity legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 2 N3: resolve the same live-link chain and hash the captured path with the existing agent digest cache; later VerifyStaged calls reuse that digest for an unchanged settled file. Existing settle window, file-identity invalidation and root uncached verification stay intact. Host is read again only to retain the hash error context. No new path or exec authority. registry:Host@142,registry:Host@253,registry:Host@335,registry:Host@492 6fa387e677239e26bd87d9dadcc02f88688c634ba2f519b2873586e30d2220d7
internal/activator/backend_exec.go ExecBackend.StartWorkerStaged legacy accepted-legacy accepted-legacy;rev3=census-ruling-zddr3;basis=Census ruling zddr3: changed legacy row (comment-only change describing the shim placement); the same class as the accepted-legacy Manager.startIn and placementLive under fix1-merge-review (existing agent delegated-cgroup management remains legacy); no root decision; no registry, /data, release or claim reads. Boundary: the agent's own delegated cgroup subtree (including its scratch probe child), /proc/self, and pipes to and from its own parent, running as carlos.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. file:Command@3507,registry:Args@227,registry:Args@378,registry:Host@1388,registry:Host@2610,registry:Host@3646,registry:Host@369,registry:Host@4532,registry:Host@473,registry:Host@589,registry:Host@685,whole:Route@1148,whole:Route@1692,whole:Route@2238,whole:Route@3459,whole:Route@3577,whole:Route@3607,whole:Route@4373,whole:Route@4463 064ad933d522ffbbf1cb335abafc545af7f81ee7b30a905425de32ca9a882aa2
internal/activator/backend_exec.go ExecBackend.startSidecarChildFrom legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. file:Command@886,registry:Host@1348,registry:Host@1407,whole:Route@1166,whole:Route@150,whole:Route@480,whole:Route@840,whole:Route@955 e1841fe5edbc5e9e6f8f4a440a1ffe8d799cf97c4502f152ac23b97841fc95c2
internal/activator/backend_exec.go ExecBackend.startSidecarUnitFrom authority E2 E40: claim-enabled raw backend refuses unsupported direct, placed and legacy-control launches before spawn. Claims-off body unchanged. TestPlan14GenerationBackendDirectBoundary, TestPlan14GenerationBackendControlBoundary, TestPlan14GenerationBackendAuxiliaryBoundary; each guard has an independent behavioral mutation. Agent-side refusal is not root reservation or containment evidence.;rev3=census-ruling-rootfs-apps-2;basis=newUnitProc now returns an error, which closes the log listener and fails the start; the sidecar launch and its E40 guards are unchanged; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only. registry:Host@1073,registry:Host@1557,registry:Host@1632,registry:Host@1778,registry:Host@1891,registry:Host@1946,registry:Host@992,whole:Route@1109,whole:Route@1512,whole:Route@1673,whole:Route@1985,whole:Route@247,whole:Route@752,whole:Route@838,whole:Route@896 aa47e7c46fddcc3932930c59958286da83cb8910781c9f2c3e1d28539be6c0df
@@ -194,7 +196,7 @@ internal/registry/remote_dispatch.go Registry.dispatchRemote hint E2 rev3=census
internal/rollout/manager.go Manager.resolve legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry demand, artifact identity, stateless verdict and canonical digest from one verified RuntimeSelection into the attempt; unreadable selection refuses. registry:App@147,registry:GoodDemand@751,registry:GoodDemand@797,registry:GoodDigest@671,registry:GoodDigest@736,registry:GoodVersion@653,registry:Host@400,whole:Route@1212,whole:Route@142,whole:Route@897 a57af8f772817ec1f664c5bc53fc853132936a67d1848bc27d9b9f75fad608ba
internal/rollout/wakeplan.go Manager.planRow legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry each selection read by the existing planner on its WakePlan so wake uses that same canonical verdict/digest, including selected fallbacks. registry:App@164,registry:Host@1062,registry:Version@1221,whole:Route@115,whole:Route@1217,whole:Route@1459,whole:Route@1545,whole:Route@159,whole:Route@234,whole:Route@241,whole:Route@584,whole:Route@804 66e00b7558526beba1dcc97859c002f9c0cf34f1231dd4f9b752f53adcbaa517
@coverage . d8abf32baa39f05d1e9d4e9b8a24e7113c58f42f8735e7a62e217eb39e7a4bf7
-@coverage internal/activator 5f226e5b6a312e7479bc2ff82296b62db732c1e32a0e798c910d684ad44a8bc5
+@coverage internal/activator 7cfe4e5b813df08175581ec35097289895706e5e0c7d8c6d04b816c189dc74c5
@coverage internal/host 54ad894277d9e072cb1188c4ec61069f3dce22ea95a5f436d848c8a6680722bf
@coverage internal/ops 67289ea5b95d14e295bc19e855fab6b00ed240b822e75d4be42b9ded59662e4d
@coverage internal/provision 98d437ab5b9838a252b4e8b517926cac9a568571eae6dc817f94f7ed489e19db