carlos / platform Public

fix: no bucket read on unplanned stateful wakes

Skip canonical declaration lookup on unplanned wakes without stateless
evidence. Use the staged sibling only as a discovery hint, requiring
canonical verification before a hinted stateless build can start.

Add real host declaration/counting-store witnesses across three cold
wakes, preserve stateless discovery and refusal coverage, and refresh
the root-read census proposal. Targeted, wake regression, race, census,
vet and three cross-platform build gates pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev a160186e35e698a9a4b18aa959d57bb66317c1de parent c696e01
8 files changed, +178 −10
  • docs/superpowers/notes/census-proposal-stateless-replicas-1.md +2 −2
  • internal/activator/activator.go +1 −0
  • internal/activator/stateless.go +14 −0
  • internal/activator/stateless_fix2_linux_test.go +2 −2
  • internal/activator/stateless_fix2_test.go +66 −0
  • internal/host/stateless_stateful_linux_test.go +87 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv +5 −5

CI failed — run details

Intent

Human

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

Human

<task-notification> <task-id>a55a5592b8805faac</task-id> <tool-use-id>toolu_01D8WQZuFhFN8U744uUq1k8f</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/412bbef6-9468-4e8d-b9fe-5343bad21de8/tasks/a55a5592b8805faac.output</output-file> <status>completed</status> <summary>Agent "Re-review final fix wave" 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>**C1: ADDRESSED for what R26 asks, but one gap remains open against the merge gate (see New breakage).** Nothing happens before the lease any more: no manifest GET, no uncached hash, no live-link read, no `ensureLiveLink` or `Materialize`. - **Planned recovery wake** (`wakeplan.go:86`, boot = good build with `GoodDigest`): `storageMode` returns early at `internal/activator/stateless.go:92` when the route is not stateless and the version and digest match the good build. There is no store call and no hash. - **Planned first wake:** the plan carries the rollout `Selection`, which `storageMode` uses at `stateless.go:77-89`. That planner read is the canonical-manifest read `CanonicalDemand` already made at 65420a4d. It now uses the cached hash. - **Unplanned wake:** the pre-lease capture in `activator.go:2668` now runs only when the route, Gen or pin says stateless. Stateful wakes have an empty mode identity and skip `storageMode` before the lease. They capture the live link after Acquire and Restore (`activator.go:2836-2862`), as at baseline. - **Swap:** `swap.go:355-357` goes through the same good-build early return for config and recovery attempts. Release-cause swaps use the declaration that `resolve` already read. - **Real `storageDeclaration`** (`internal/host/agent.go:3749-3795`): it checks the staged bytes through the cached digest and memoises only verified declarations. `CanonicalRuntimeSelection` now hashes through the cache (`runtime_selection.go:21`). - **R18 stateless detection still works.** A projected route (`rt.Stateless`) or a stateless Gen (`activator.go:2655`, carried through `storageProjectionKey`) turns off the early return and refuses on unreadable evidence. A first wake of an unknown build is found by the planned `Selection`, or by the under-lease `storageMode` and `wakeModeChange` when unplanned. - **"Baseline pre-exec hashing is preserved"** checks out. It means `internal/activator/staged.go` `verifyStaged`, the uncached hash just before exec under the lease. That file is unchanged since 65420a4d. The extra hash calls the fix added under the lease (`activator.go:2869`, and the ones inside `storageMode`) all use the cached digest. **I1: ADDRESSED.** `activator.go:2241` calls `SetServingMode` only for successful, non-worker wakes with a non-empty spawn version, and only when the generation is stateless or differs from the row. An ordinary stateful wake makes no call. **I2: ADDRESSED.** At `statelessrelease.go:151-158` only a `*ReleaseError` or `ErrStagedDigestMismatch` marks the deploy failed. Refusals before releasing return with the deploy left pending, because the console maps "begin" to "pending" (`internal/console/replicacoordinator.go:140`). A command cannot run twice: - `beforeExec` sets `releasing` before `StartRelease` (`rootfsrelease.go:466-490`). - If the "releasing" write commits but its response is lost, the next attempt sees "releasing" and returns unknown without running the command again (`statelessrelease.go:91-98`). **I3: ADDRESSED.** `fastTick` (`agent.go:2932`) only sends a non-blocking signal. Renewal runs on one worker goroutine (`coordinator.go:76-110`), started at `agent.go:603`. `Close` cancels it and waits for it to finish before releasing authorities. The `Tick` logic is unchanged, so renewal timing and fencing work as before. I found no leak or race. **R25: ADDRESSED.** `internal/console/rootfs.go:38-58` uses the memoised box reports from fresh boxes. A box that reports no channel counts as stable. It reads each followed channel's pointer, ignores channels no box follows, and refuses on incomplete or unreadable reports or an unreadable followed pointer. The assigned-fleet-box gate is kept. **New breakage** - **Important (open, merge gate):** unplanned stateful wakes still make a canonical manifest GET after the lease is taken. This affects apps without `--stateless` on boxes with `CARLOS_SWAP` off, which is the default (`internal/rollout/flag.go`). No planner runs there and no good digest is written, so after the lease `storageMode` (`activator.go:2874`) goes on to `storageDeclaration`, which calls `CanonicalRuntimeSelection`. Unmanaged rows with a staged path do the same. The memo stores only verified declarations, so: - an app whose canonical manifest is missing, unreadable or has no box artifact does one GET on every wake; - every other app does one GET per version each time the agent restarts. - At 65420a4d the activator read no manifest at all. - I confirmed it with a throwaway host test: real `storageDeclaration`, a counting store, no Planner, no good build. It showed 0 GETs before Acquire, then GETs 1, 2, 3 across three wakes. - The existing witness misses this because it only drives a planned recovery wake with `GoodDigest` set. - Suggested fix: skip the canonical lookup when the route is not stateless, has no stateless Gen and is unplanned. R26 already accepts the cost of discovering a never-woken stateless build some other way. Alternatively, memoise not-found and unverifiable results per (account, app, version, digest). - No other Critical or Important problems: - Unplanned stateful wakes always get their database, because they never reach `doStatelessWake`. - The renewal goroutine is joined on `Close` and does not renew past a fence. - A retaken pending deploy cannot run its command a second time. - The floor ignores no channel a platform box follows. **Out of scope (minor)** - `CanonicalRuntimeSelection` now uses the cached hash, so rollout adoption attempts no longer hash uncached the way `CanonicalDemand` did. Safety is unchanged because the exec-time `verifyStaged` is still uncached. - The floor passes when no box has a fresh report. R25 accepted that cost. - Boxes in managed fleets, which report under `fleets/`, are not counted for the floor. - `Tick` still holds `opMu` for N×30s on the worker, so stateless Acquire and ReleaseState calls can wait behind it during a console outage. This affects stateless apps only. - `storageMode` hashes through the cache up to three times under the lease. **Census:** approve all six changed root-scope units: `Service.doWakeOnce`, `Service.wake`, `Service.storageMode`, `Service.Swap`, `Service.PrepareStatelessRelease` and `storageDeclaration`. The agent's `fastTick`, `fastConvergeLoop` and `runAgent` only had their basis text updated. The new dispositions match the code. The `storageDeclaration` basis correctly says "missing evidence is never cached", which is exactly the source of the open finding. I re-ran the four census tests and they pass. **Verdict:** open findings (one Important, the under-lease manifest GET for unplanned stateful wakes). **Ready to merge (dormant, default-off)?** No. `StorageDeclaration` is wired whether or not any app uses `--stateless`, so the feature is not dormant on default `CARLOS_SWAP`-off boxes. The fix is small. If every production box runs `CARLOS_SWAP=overlap`, the effect is limited to unmanaged rows, and the controller could decide to accept that. I left the worktree clean: the throwaway test file and its scratch directory are deleted, and `git status` shows nothing.</result> <usage><subagent_tokens>139556</subagent_tokens><tool_uses>37</tool_uses><duration_ms>382618</duration_ms></usage> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="335399d5-3ec5-4e92-ae37-08e6aaae74c8" message-id="511bbb42-c6e7-469a-b0ba-02f13ad49f37"> From Paul (2026-11-02 ~08:10Z, relayed by platform-72): &apos;Yes&apos; to your recommendation on the Plan 1 residual. Make the one-commit fix: skip the canonical manifest lookup for unplanned non-stateless routes, or memoise not-found, so a default box&apos;s stateful wake does no new bucket GET. Then a scoped review, CI green on the tip with origin/main merged in, census if touched, then squash-merge Plan 1 via amadan (-squash -expect &lt;full sha&gt;). Record the go as a ledger ruling. </paseo-system>

Attributed to this commit: 23.4 g CO₂e (2,986,151 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 d170782ff..a9e770384 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
@@ -120,7 +120,7 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/activator/stateless.go:Service.statelessCurrent`: reads +registry:Args ×2, +registry:Caps ×2, +registry:Channel ×2, +registry:CreatedAt ×2, +registry:Environment ×2, +registry:Host, +registry:Stateless ×2, +whole:Route ×7; written legacy, accepted-legacy, frozen
- new `internal/activator/stateless.go:Service.statelessFinalRecord`: reads +registry:Channel, +registry:Environment, +registry:Region, +registry:Runtime, +whole:Route ×5; written legacy, accepted-legacy, frozen
- new `internal/activator/stateless.go:Service.statelessObservation`: reads +whole:Route ×6; written legacy, accepted-legacy, frozen
-- new `internal/activator/stateless.go:Service.storageMode`: reads +registry:Account ×2, +registry:App ×2, +registry:GoodDigest ×2, +registry:GoodVersion, +registry:Stateless ×7, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/stateless.go:Service.storageMode`: reads +file:ReadFile, +registry:Account ×2, +registry:App ×3, +registry:GoodDigest ×2, +registry:GoodVersion, +registry:Stateless ×9, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/activator/stateless.go:Service.withStatelessFinalCheck`: reads +whole:Route ×3; written legacy, accepted-legacy, frozen
- new `internal/activator/stateless.go:carryStatelessPreparation`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/activator/stateless.go:storageVars`: reads +registry:Stateless; written legacy, accepted-legacy, frozen
@@ -166,6 +166,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/registry/runtime.go:Route.Resident`: +registry:Runtime, +registry:Stateless; keeps legacy, task accepted-legacy
- reads `internal/release/adopt.go:adoptHost`: +registry:Backing, +registry:GoodVersion, +registry:Kind, +registry:ServingVersion, +registry:Socket, +registry:Stateless ×2, +registry:Tunnel, +whole:Route; keeps authority, task B3,E1,E2,E3,E4,J1
-Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `2d02e01e9c9f3c1cbc854dd1397c8fba6b88d4f124e3be963df3a9dbf2d0e4ed`.
+Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `8df3b252229577cc1d7ec2bb9e506bd3ff51393eb46b9974d7760574d19aced4`.
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 f69d3b711..b34d4c5eb 100644
--- a/internal/activator/activator.go
+++ b/internal/activator/activator.go
@@ -2656,6 +2656,7 @@ func (a *Service) doWakeOnce(ctx context.Context, e *actEntry) (*wokenInstance,
declarationRoute.Stateless = true
}
ctx = context.WithValue(ctx, storageProjectionKey{}, declarationRoute.Stateless)
+ ctx = context.WithValue(ctx, unplannedStorageKey{}, !plan.planned())
var modeID release.StagedIdentity
var capturedID *release.StagedIdentity
var captureErr error
diff --git a/internal/activator/stateless.go b/internal/activator/stateless.go
index 35e50d815..b00e5b0d7 100644
--- a/internal/activator/stateless.go
+++ b/internal/activator/stateless.go
@@ -2,8 +2,10 @@ package activator
import (
"context"
+ "encoding/json"
"errors"
"fmt"
+ "os"
"sync"
"time"
@@ -60,6 +62,7 @@ var errStatelessSecretsWaiting = errors.New("the new copy is waiting for the ins
var errStorageDeclaration = errors.New("could not verify this build's storage declaration, so it was not started")
type storageProjectionKey struct{}
+type unplannedStorageKey struct{}
func (a *Service) storageMode(ctx context.Context, rt registry.Route, id release.StagedIdentity) (bool, string, error) {
if projected, _ := ctx.Value(storageProjectionKey{}).(bool); projected {
@@ -87,6 +90,17 @@ func (a *Service) storageMode(ctx context.Context, rt registry.Route, id release
}
}
}
+ // Swap-off wakes discover stateless builds from the staged sibling.
+ // It is only a hint: canonical verification still decides the mode.
+ // Missing local evidence keeps the legacy stateful path (R18, R26).
+ if unplanned, _ := ctx.Value(unplannedStorageKey{}).(bool); unplanned && !rt.Stateless {
+ raw, err := os.ReadFile(id.StagedPath + ".manifest.json")
+ var hint release.Manifest
+ if err != nil || json.Unmarshal(raw, &hint) != nil || !hint.Stateless || hint.App != rt.App || hint.Version != id.Version {
+ return false, "", nil
+ }
+ rt.Stateless = true
+ }
// A retained good stateful build needs no new declaration read. Its
// staged bytes are still verified by the existing start path.
if !rt.Stateless && rt.GoodVersion == id.Version && rt.GoodDigest != "" && rt.GoodDigest == id.Digest {
diff --git a/internal/activator/stateless_fix2_linux_test.go b/internal/activator/stateless_fix2_linux_test.go
index a626a8b5c..5a4dd2ee9 100644
--- a/internal/activator/stateless_fix2_linux_test.go
+++ b/internal/activator/stateless_fix2_linux_test.go
@@ -62,8 +62,8 @@ func TestStatelessStatefulWakeHashesOneCapture(t *testing.T) {
t.Fatal(err)
}
read := readBytes() - before
- if b.captures != 1 || declarations != 1 || read < size || read >= 2*size {
+ if b.captures != 1 || declarations != 0 || 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)
+ t.Logf("one capture, no declaration lookup, %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
index cdc68bbe5..e6497448d 100644
--- a/internal/activator/stateless_fix2_test.go
+++ b/internal/activator/stateless_fix2_test.go
@@ -2,9 +2,11 @@ package activator
import (
"context"
+ "encoding/json"
"errors"
"fmt"
"os"
+ "runtime"
"testing"
"github.com/carlosframework/platform/internal/registry"
@@ -212,3 +214,67 @@ func TestStatelessStatefulUnplannedCapturesAfterRestore(t *testing.T) {
t.Fatalf("captures=%d started=%+v, want post-acquire %+v", b.captures, started, r.next)
}
}
+
+func TestStatelessUnplannedSiblingDiscovery(t *testing.T) {
+ for _, canonical := range []string{"stateless", "missing", "mismatch"} {
+ t.Run(canonical, func(t *testing.T) {
+ r := newWakeRelRig(t)
+ wireStatelessRig(r)
+ r.rt.Runtime, r.rt.GoodVersion, r.rt.GoodDigest = "", "", ""
+ r.a.gens = false
+ r.routes.set(r.rt)
+ r.a.Planner = nil
+ b := &capturedWakeBackend{wakeRelBackend: r.b}
+ b.capture = func(context.Context, registry.Route) (release.StagedIdentity, error) { return r.next, nil }
+ r.a.backend = b
+ store := release.NewDirStore(t.TempDir())
+ platform := runtime.GOOS + "-" + runtime.GOARCH
+ m := release.Manifest{Schema: 1, App: r.rt.App, Version: r.next.Version, Kind: "binary", Stateless: true, Artifacts: map[string]release.Artifact{platform: {File: r.rt.App, SHA256: r.next.Digest}}}
+ raw, err := json.Marshal(m)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(r.next.StagedPath+".manifest.json", raw, 0600); err != nil {
+ t.Fatal(err)
+ }
+ if canonical == "mismatch" {
+ m.Artifacts[platform] = release.Artifact{File: r.rt.App, SHA256: r.good.Digest}
+ raw, err = json.Marshal(m)
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
+ if canonical != "missing" {
+ if _, err := store.Put(t.Context(), release.ManifestKey(r.rt.Account, r.rt.App, r.next.Version), raw, ""); err != nil {
+ t.Fatal(err)
+ }
+ }
+ reads := 0
+ r.a.StorageDeclaration = func(ctx context.Context, rt registry.Route, id release.StagedIdentity) (bool, string, error) {
+ reads++
+ selection, err := release.CanonicalRuntimeSelection(ctx, store, rt.Account, rt.App, id.Version, id.StagedPath, rt.Stateless)
+ return selection.Stateless, selection.ManifestDigest, err
+ }
+ err = waitErr(t, r.wake(r.a))
+ if canonical != "stateless" {
+ if !errors.Is(err, errStorageDeclaration) || len(r.b.started()) != 0 {
+ t.Fatalf("hint bypassed canonical verification: err=%v starts=%v", err, r.b.started())
+ }
+ return
+ }
+ if err != nil {
+ t.Fatal(err)
+ }
+ entry := r.a.awakeEntry(r.rt.Host)
+ if reads == 0 || entry == nil || !entry.gen.Stateless || entry.rep != nil {
+ t.Fatalf("unplanned stateless build not discovered without DB ownership: reads=%d entry=%+v", reads, entry)
+ }
+ if _, err := os.Stat(r.rt.DBPath); !os.IsNotExist(err) {
+ t.Fatalf("stateless discovery created DB: %v", err)
+ }
+ if len(r.b.started()) != 1 {
+ t.Fatalf("starts=%v", r.b.started())
+ }
+ })
+ }
+}
diff --git a/internal/host/stateless_stateful_linux_test.go b/internal/host/stateless_stateful_linux_test.go
index 352583641..b4e88593e 100644
--- a/internal/host/stateless_stateful_linux_test.go
+++ b/internal/host/stateless_stateful_linux_test.go
@@ -3,10 +3,13 @@ package host
import (
"bytes"
"context"
+ "encoding/json"
+ "errors"
"fmt"
"net/http"
"os"
"path/filepath"
+ "runtime"
"strings"
"testing"
"time"
@@ -106,3 +109,87 @@ func (b *statefulDeclarationBackend) Acquire(ctx context.Context, rt registry.Ro
}
return b.plannedBackend.Acquire(ctx, rt)
}
+
+func TestStatelessStatefulUnplannedRealDeclarationNoGETs(t *testing.T) {
+ prev := activator.GenerationsEnabled()
+ activator.SetGenerations(false)
+ defer activator.SetGenerations(prev)
+ for _, canonical := range []string{"missing", "unreadable", "no-box-artifact", "stateful"} {
+ t.Run(canonical, func(t *testing.T) {
+ _, _, reg := testBuildStates(t)
+ defer reg.Close()
+ id := plannedStaged(t, t.TempDir(), "v1")
+ base := release.NewDirStore(t.TempDir())
+ platform := runtime.GOOS + "-" + runtime.GOARCH
+ m := release.Manifest{Schema: 1, App: "km", Version: id.Version, Kind: "binary", Artifacts: map[string]release.Artifact{platform: {File: "km", SHA256: id.Digest}}}
+ if canonical == "no-box-artifact" {
+ m.Artifacts = nil
+ }
+ raw, err := json.Marshal(m)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if canonical != "missing" {
+ if _, err := base.Put(t.Context(), release.ManifestKey(release.OpsAccount, m.App, m.Version), raw, ""); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(id.StagedPath+".manifest.json", raw, 0600); err != nil {
+ t.Fatal(err)
+ }
+ }
+ store := &unplannedDeclarationStore{statefulDeclarationStore: statefulDeclarationStore{Store: base}, unreadable: canonical == "unreadable"}
+ for wake := 0; wake < 3; wake++ {
+ rt, err := reg.Get(astraHost)
+ if err != nil || rt == nil {
+ t.Fatalf("route: %v", err)
+ }
+ if rt.Stateless || rt.GoodVersion != "" || rt.GoodDigest != "" {
+ t.Fatalf("not an unknown stateful wake: %+v", rt)
+ }
+ be := &unplannedDeclarationBackend{plannedBackend: &plannedBackend{socket: healthySocket(t), live: id.Version}, id: id}
+ svc := activator.New(activator.Config{Bucket: "hib", Idle: time.Hour}, be, reg)
+ svc.StorageDeclaration = storageDeclaration(func(context.Context) (release.Store, error) { return store, nil })
+ if svc.Planner != nil {
+ t.Fatal("unexpected planner")
+ }
+ response := serve(t, svc, reg)
+ svc.Shutdown(context.Background())
+ if response.Code != http.StatusOK {
+ t.Fatalf("wake %d: %d %s", wake, response.Code, response.Body.String())
+ }
+ if len(be.builds()) != 1 || be.builds()[0] != id.Version {
+ t.Fatalf("wake %d did not start selected build", wake)
+ }
+ }
+ if store.gets != 0 {
+ t.Fatalf("three unplanned stateful wakes: GETs=%d, want 0", store.gets)
+ }
+ })
+ }
+}
+
+type unplannedDeclarationStore struct {
+ statefulDeclarationStore
+ unreadable bool
+}
+
+func (s *unplannedDeclarationStore) Get(ctx context.Context, key string) ([]byte, string, error) {
+ if s.unreadable {
+ s.gets++
+ return nil, "", errors.New("store unavailable")
+ }
+ return s.statefulDeclarationStore.Get(ctx, key)
+}
+
+type unplannedDeclarationBackend struct {
+ *plannedBackend
+ id release.StagedIdentity
+}
+
+func (b *unplannedDeclarationBackend) LiveIdentity(context.Context, registry.Route) (release.StagedIdentity, error) {
+ return b.id, nil
+}
+func (b *unplannedDeclarationBackend) StartGenExe(ctx context.Context, rt registry.Route, n uint64, _ bool, id release.StagedIdentity) (activator.Proc, activator.Gen, error) {
+ g, p, err := b.StartStaged(ctx, rt, activator.Gen{N: n, Build: id.Version, StagedPath: id.StagedPath, Digest: id.Digest})
+ return p, g, err
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 0c3da3015..00e70977f 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 2d02e01e9c9f3c1cbc854dd1397c8fba6b88d4f124e3be963df3a9dbf2d0e4ed
+plan14-root-reads-stateless-replicas-1.tsv 8df3b252229577cc1d7ec2bb9e506bd3ff51393eb46b9974d7760574d19aced4
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 b05ac8396..5adf61f28 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
@@ -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 aa82c49adfeae2c9c7cb8ea52a0c32eb779fe28f0f07c3df2b1e985bf0d91e9f 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. Final review C1/R26: unprojected stateful wakes capture and materialize the live link only after Acquire and Restore. Retain original route/generation/pin stateless evidence on the context across fallback, so missing stateless evidence cannot take stateful recovery inference. Known good stateful identity skips canonical declaration lookup. Existing pre-exec verification remains. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32137,registry:GoodVersion@17167,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@15794,registry:Replication@15923,registry:Replication@15942,registry:Replication@16023,registry:Replication@32040,registry:Replication@32172,registry:Seed@20862,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11277,registry:Stateless@11331,registry:Stateless@19576,registry:Stateless@9232,registry:Stateless@9323,registry:Stateless@9619,registry:Stateless@9905,whole:Route@10229,whole:Route@10327,whole:Route@10418,whole:Route@10550,whole:Route@10673,whole:Route@10727,whole:Route@10999,whole:Route@11175,whole:Route@11179,whole:Route@11732,whole:Route@12033,whole:Route@13338,whole:Route@14015,whole:Route@14896,whole:Route@15774,whole:Route@16025,whole:Route@1630,whole:Route@17370,whole:Route@17961,whole:Route@18126,whole:Route@19062,whole:Route@19858,whole:Route@20133,whole:Route@2066,whole:Route@2071,whole:Route@20963,whole:Route@21034,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23446,whole:Route@25304,whole:Route@25950,whole:Route@27257,whole:Route@27411,whole:Route@27910,whole:Route@27980,whole:Route@28567,whole:Route@29652,whole:Route@30083,whole:Route@30291,whole:Route@30345,whole:Route@31274,whole:Route@31459,whole:Route@3156,whole:Route@32249,whole:Route@3250,whole:Route@32661,whole:Route@32710,whole:Route@33088,whole:Route@3317,whole:Route@34310,whole:Route@34405,whole:Route@35246,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@9691,whole:Route@9850 90cb80c6b37f84ec75d1b338bd1c1df2a14237eb827f5dea6690825439db239c
+@legacy 9245e6a0c8eb785be050145df18fa1ef63643120516092ee1c75202da01a4164 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. Final review C1/R26: unprojected stateful wakes capture and materialize the live link only after Acquire and Restore. Retain original route/generation/pin stateless evidence on the context across fallback, so missing stateless evidence cannot take stateful recovery inference. Known good stateful identity skips canonical declaration lookup. Existing pre-exec verification remains. R28 final fix 2: carry whether this wake has a plan in attempt-local context; no new read here; route, generation and pin stateless projection remains intact. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32207,registry:GoodVersion@17237,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@15864,registry:Replication@15993,registry:Replication@16012,registry:Replication@16093,registry:Replication@32110,registry:Replication@32242,registry:Seed@20932,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11347,registry:Stateless@11401,registry:Stateless@19646,registry:Stateless@9232,registry:Stateless@9323,registry:Stateless@9689,registry:Stateless@9975,whole:Route@10299,whole:Route@10397,whole:Route@10488,whole:Route@10620,whole:Route@10743,whole:Route@10797,whole:Route@11069,whole:Route@11245,whole:Route@11249,whole:Route@11802,whole:Route@12103,whole:Route@13408,whole:Route@14085,whole:Route@14966,whole:Route@15844,whole:Route@16095,whole:Route@1630,whole:Route@17440,whole:Route@18031,whole:Route@18196,whole:Route@19132,whole:Route@19928,whole:Route@20203,whole:Route@2066,whole:Route@2071,whole:Route@21033,whole:Route@21104,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23516,whole:Route@25374,whole:Route@26020,whole:Route@27327,whole:Route@27481,whole:Route@27980,whole:Route@28050,whole:Route@28637,whole:Route@29722,whole:Route@30153,whole:Route@30361,whole:Route@30415,whole:Route@31344,whole:Route@31529,whole:Route@3156,whole:Route@32319,whole:Route@3250,whole:Route@32731,whole:Route@32780,whole:Route@33158,whole:Route@3317,whole:Route@34380,whole:Route@34475,whole:Route@35316,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@9761,whole:Route@9920 20e74c3e9d904e465b3a197c193ef6ecbdbc43cdcf7670db4d6a199e968b1888
@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
@@ -39,7 +39,7 @@
@legacy 23e76f71c6bfac582ee831299dd4aa84d230eb27ccb3baa2bc95c79f25b2073f internal/activator/stateless.go Service.statelessCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Recheck current registry launch inputs and fresh record lifetime against the attempt observation without a serving lease; refuse changed configuration or missing evidence. No writes; runtime caller remains to be wired. Fix 3a round 1 I2: repeated gates inspect only the current registry row and attempt-local observation. Fresh record validation moved, not removed: statelessFinalRecord at final backend exec gate. All launch-shape and lifecycle row checks retained. registry:Args@467,registry:Args@478,registry:Caps@444,registry:Caps@455,registry:Channel@378,registry:Channel@392,registry:CreatedAt@490,registry:CreatedAt@506,registry:Environment@407,registry:Environment@425,registry:Host@204,registry:Stateless@523,registry:Stateless@539,whole:Route@275,whole:Route@279,whole:Route@348,whole:Route@370,whole:Route@654,whole:Route@666,whole:Route@737 2c53844f1a0b9096941e559725a38b6f9ebeae8354a471e6f94e6733f03aa46a
@legacy 268c417fb9f517a33a2c0785a516d764667ba08e84c3467d4d141a2271e5e0d3 internal/activator/stateless.go Service.statelessFinalRecord legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: one fresh record read at final exec, after pending write and release/escrow preparation. Reuse Fleet.Record result or cfg.Record, never both. Validate placement/config/lifetime and prepared deploy ID/target/released phase; registry checks before and after. registry:Channel@398,registry:Environment@431,registry:Region@492,registry:Runtime@464,whole:Route@1157,whole:Route@122,whole:Route@208,whole:Route@285,whole:Route@629 5f7b9739fc3ec2f82651994a61b0301f804d1a45aeb8211c53ec084d36351669
@legacy 68084b2347b4de7f60d144521ccab1c6da768a3920068bf32759ae3e99ab8202 internal/activator/stateless.go Service.statelessObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry the current attempt record facts and canonical target into the existing immutable observation carrier. Reuse a matching carrier, never lifetime-index or process-global release evidence. Fix 3a round 1 I2: obtain preparation facts from the existing reconcile snapshot, not another bucket read. Freeze the observation for this attempt; no snapshot grants launch permission. The final backend gate freshly validates record placement, identity and released deploy. whole:Route@201,whole:Route@337,whole:Route@389,whole:Route@491,whole:Route@709,whole:Route@760 3636a28194896125e2465d30e12de2c022fab1766d1f6cd9933fedc9b8ebc016
-@legacy 3788b139b8c0e0397b3b6d7e5f35385b62a395016daafbf173bdc1067f2f53f1 internal/activator/stateless.go Service.storageMode legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Consume only the attempt-local verified selection for this account/app/identity or the configured canonical reader; reverify retained bytes. Unreadable evidence refuses with SR-1-C07; the registry projection is not launch permission. Legacy test backends without the optional reader retain their old mode. Fix 3a round 1 R18: preserve stateful missing/unreadable manifest fallback, but reject a known stateless projection/generation without a declaration and reject staged/canonical mismatch. Reverify staged bytes and carry attempt-local observations. Final review C1/R26: use original stateless projection retained on context; after carried declaration checks, a stateful projection and matching nonempty GoodVersion/GoodDigest allow stateful recovery without a canonical read. Existing spawn verification remains; projected/stateless/unknown selections retain canonical verification and R18 behavior. registry:Account@341,registry:Account@754,registry:App@371,registry:App@786,registry:GoodDigest@1375,registry:GoodDigest@1398,registry:GoodVersion@1343,registry:Stateless@1014,registry:Stateless@1327,registry:Stateless@1493,registry:Stateless@1783,registry:Stateless@1955,registry:Stateless@197,registry:Stateless@510,whole:Route@1752 6bdbf14b284f47f86e438a68c32768cf06fb2022128e7f5565f252201fc98fc9
+@legacy aa3c82064594349785de29969d713a2e18789de0614811f5865ae145fcb1edd2 internal/activator/stateless.go Service.storageMode legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Consume only the attempt-local verified selection for this account/app/identity or the configured canonical reader; reverify retained bytes. Unreadable evidence refuses with SR-1-C07; the registry projection is not launch permission. Legacy test backends without the optional reader retain their old mode. Fix 3a round 1 R18: preserve stateful missing/unreadable manifest fallback, but reject a known stateless projection/generation without a declaration and reject staged/canonical mismatch. Reverify staged bytes and carry attempt-local observations. Final review C1/R26: use original stateless projection retained on context; after carried declaration checks, a stateful projection and matching nonempty GoodVersion/GoodDigest allow stateful recovery without a canonical read. Existing spawn verification remains; projected/stateless/unknown selections retain canonical verification and R18 behavior. R28 final fix 2: an unplanned wake without stateless projection reads only the staged executable sibling at id.StagedPath + .manifest.json as a hint. Missing, unreadable, non-stateless or wrong-identity hints return stateful without opening the deployment store. A matching stateless hint requires canonical verification with knownStateless=true, so missing canonical evidence or digest mismatch refuses. Planned selections and projected stateless generation/pin checks remain. New os.ReadFile of the staged sibling and registry App/Stateless reads; no new root authority or write. file:ReadFile@1502,registry:Account@341,registry:Account@754,registry:App@1663,registry:App@371,registry:App@786,registry:GoodDigest@1943,registry:GoodDigest@1966,registry:GoodVersion@1911,registry:Stateless@1014,registry:Stateless@1473,registry:Stateless@1733,registry:Stateless@1895,registry:Stateless@197,registry:Stateless@2061,registry:Stateless@2351,registry:Stateless@2523,registry:Stateless@510,whole:Route@2320 f8811a7267802a748f0b7dd0270bf8142c8e617e2833cbdc829e02852cefd28b
@legacy 8e1905b513d4a0eca3783f6cc9831757c067aa2c3675c501b4173c28843b81bb internal/activator/stateless.go Service.withStatelessFinalCheck legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: attach one fresh validation per web launch; repeated backend gates reuse its result and still recheck local lifecycle ownership. Preserve original route projection from prepared context. whole:Route@186,whole:Route@200,whole:Route@284 09500eae69ab428a8aab3dbb843f207fe27f6a3720fe3cc2185240e4b26c7eb9
@legacy e4d2f54423c4cc259d73c4efb6a7b46c876eebfe87bfc89c3dc72c73ad1352a5 internal/activator/stateless.go carryStatelessPreparation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry verified storage or successful preparation facts only within one identity/account/app attempt. Pure context values, no store read, polling, authority acquisition or global cache. whole:Route@156 dc5104da275c7bc4223fbfdb34a170e432ffecf3602c098885e644780381184c
@legacy a510c931a6497df71418333b6cf801a183616dadcf90409c1f1d7daa5786ae6b internal/activator/stateless.go storageVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Delete CARLOS_DB after user environment merges for a launch whose actual verified generation is stateless; preserve every other environment variable. registry:Stateless@83 80d538cdee331a4afcdea36daf2ce253c299b9ef1aa5a1b1ed8ec0219c2d1054
@@ -124,7 +124,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. 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. Final review C1/R26: unprojected stateful wakes capture and materialize the live link only after Acquire and Restore. Retain original route/generation/pin stateless evidence on the context across fallback, so missing stateless evidence cannot take stateful recovery inference. Known good stateful identity skips canonical declaration lookup. Existing pre-exec verification remains. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32137,registry:GoodVersion@17167,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@15794,registry:Replication@15923,registry:Replication@15942,registry:Replication@16023,registry:Replication@32040,registry:Replication@32172,registry:Seed@20862,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11277,registry:Stateless@11331,registry:Stateless@19576,registry:Stateless@9232,registry:Stateless@9323,registry:Stateless@9619,registry:Stateless@9905,whole:Route@10229,whole:Route@10327,whole:Route@10418,whole:Route@10550,whole:Route@10673,whole:Route@10727,whole:Route@10999,whole:Route@11175,whole:Route@11179,whole:Route@11732,whole:Route@12033,whole:Route@13338,whole:Route@14015,whole:Route@14896,whole:Route@15774,whole:Route@16025,whole:Route@1630,whole:Route@17370,whole:Route@17961,whole:Route@18126,whole:Route@19062,whole:Route@19858,whole:Route@20133,whole:Route@2066,whole:Route@2071,whole:Route@20963,whole:Route@21034,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23446,whole:Route@25304,whole:Route@25950,whole:Route@27257,whole:Route@27411,whole:Route@27910,whole:Route@27980,whole:Route@28567,whole:Route@29652,whole:Route@30083,whole:Route@30291,whole:Route@30345,whole:Route@31274,whole:Route@31459,whole:Route@3156,whole:Route@32249,whole:Route@3250,whole:Route@32661,whole:Route@32710,whole:Route@33088,whole:Route@3317,whole:Route@34310,whole:Route@34405,whole:Route@35246,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@9691,whole:Route@9850 90cb80c6b37f84ec75d1b338bd1c1df2a14237eb827f5dea6690825439db239c
+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. Final review C1/R26: unprojected stateful wakes capture and materialize the live link only after Acquire and Restore. Retain original route/generation/pin stateless evidence on the context across fallback, so missing stateless evidence cannot take stateful recovery inference. Known good stateful identity skips canonical declaration lookup. Existing pre-exec verification remains. R28 final fix 2: carry whether this wake has a plan in attempt-local context; no new read here; route, generation and pin stateless projection remains intact. registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@32207,registry:GoodVersion@17237,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@15864,registry:Replication@15993,registry:Replication@16012,registry:Replication@16093,registry:Replication@32110,registry:Replication@32242,registry:Seed@20932,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,registry:Stateless@11347,registry:Stateless@11401,registry:Stateless@19646,registry:Stateless@9232,registry:Stateless@9323,registry:Stateless@9689,registry:Stateless@9975,whole:Route@10299,whole:Route@10397,whole:Route@10488,whole:Route@10620,whole:Route@10743,whole:Route@10797,whole:Route@11069,whole:Route@11245,whole:Route@11249,whole:Route@11802,whole:Route@12103,whole:Route@13408,whole:Route@14085,whole:Route@14966,whole:Route@15844,whole:Route@16095,whole:Route@1630,whole:Route@17440,whole:Route@18031,whole:Route@18196,whole:Route@19132,whole:Route@19928,whole:Route@20203,whole:Route@2066,whole:Route@2071,whole:Route@21033,whole:Route@21104,whole:Route@2125,whole:Route@2131,whole:Route@2197,whole:Route@2205,whole:Route@23516,whole:Route@25374,whole:Route@26020,whole:Route@27327,whole:Route@27481,whole:Route@27980,whole:Route@28050,whole:Route@28637,whole:Route@29722,whole:Route@30153,whole:Route@30361,whole:Route@30415,whole:Route@31344,whole:Route@31529,whole:Route@3156,whole:Route@32319,whole:Route@3250,whole:Route@32731,whole:Route@32780,whole:Route@33158,whole:Route@3317,whole:Route@34380,whole:Route@34475,whole:Route@35316,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@9761,whole:Route@9920 20e74c3e9d904e465b3a197c193ef6ecbdbc43cdcf7670db4d6a199e968b1888
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
@@ -140,7 +140,7 @@ internal/activator/stateless.go Service.prepareStateless legacy accepted-legacy
internal/activator/stateless.go Service.statelessCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Recheck current registry launch inputs and fresh record lifetime against the attempt observation without a serving lease; refuse changed configuration or missing evidence. No writes; runtime caller remains to be wired. Fix 3a round 1 I2: repeated gates inspect only the current registry row and attempt-local observation. Fresh record validation moved, not removed: statelessFinalRecord at final backend exec gate. All launch-shape and lifecycle row checks retained. registry:Args@467,registry:Args@478,registry:Caps@444,registry:Caps@455,registry:Channel@378,registry:Channel@392,registry:CreatedAt@490,registry:CreatedAt@506,registry:Environment@407,registry:Environment@425,registry:Host@204,registry:Stateless@523,registry:Stateless@539,whole:Route@275,whole:Route@279,whole:Route@348,whole:Route@370,whole:Route@654,whole:Route@666,whole:Route@737 2c53844f1a0b9096941e559725a38b6f9ebeae8354a471e6f94e6733f03aa46a
internal/activator/stateless.go Service.statelessFinalRecord legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: one fresh record read at final exec, after pending write and release/escrow preparation. Reuse Fleet.Record result or cfg.Record, never both. Validate placement/config/lifetime and prepared deploy ID/target/released phase; registry checks before and after. registry:Channel@398,registry:Environment@431,registry:Region@492,registry:Runtime@464,whole:Route@1157,whole:Route@122,whole:Route@208,whole:Route@285,whole:Route@629 5f7b9739fc3ec2f82651994a61b0301f804d1a45aeb8211c53ec084d36351669
internal/activator/stateless.go Service.statelessObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry the current attempt record facts and canonical target into the existing immutable observation carrier. Reuse a matching carrier, never lifetime-index or process-global release evidence. Fix 3a round 1 I2: obtain preparation facts from the existing reconcile snapshot, not another bucket read. Freeze the observation for this attempt; no snapshot grants launch permission. The final backend gate freshly validates record placement, identity and released deploy. whole:Route@201,whole:Route@337,whole:Route@389,whole:Route@491,whole:Route@709,whole:Route@760 3636a28194896125e2465d30e12de2c022fab1766d1f6cd9933fedc9b8ebc016
-internal/activator/stateless.go Service.storageMode legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Consume only the attempt-local verified selection for this account/app/identity or the configured canonical reader; reverify retained bytes. Unreadable evidence refuses with SR-1-C07; the registry projection is not launch permission. Legacy test backends without the optional reader retain their old mode. Fix 3a round 1 R18: preserve stateful missing/unreadable manifest fallback, but reject a known stateless projection/generation without a declaration and reject staged/canonical mismatch. Reverify staged bytes and carry attempt-local observations. Final review C1/R26: use original stateless projection retained on context; after carried declaration checks, a stateful projection and matching nonempty GoodVersion/GoodDigest allow stateful recovery without a canonical read. Existing spawn verification remains; projected/stateless/unknown selections retain canonical verification and R18 behavior. registry:Account@341,registry:Account@754,registry:App@371,registry:App@786,registry:GoodDigest@1375,registry:GoodDigest@1398,registry:GoodVersion@1343,registry:Stateless@1014,registry:Stateless@1327,registry:Stateless@1493,registry:Stateless@1783,registry:Stateless@1955,registry:Stateless@197,registry:Stateless@510,whole:Route@1752 6bdbf14b284f47f86e438a68c32768cf06fb2022128e7f5565f252201fc98fc9
+internal/activator/stateless.go Service.storageMode legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Consume only the attempt-local verified selection for this account/app/identity or the configured canonical reader; reverify retained bytes. Unreadable evidence refuses with SR-1-C07; the registry projection is not launch permission. Legacy test backends without the optional reader retain their old mode. Fix 3a round 1 R18: preserve stateful missing/unreadable manifest fallback, but reject a known stateless projection/generation without a declaration and reject staged/canonical mismatch. Reverify staged bytes and carry attempt-local observations. Final review C1/R26: use original stateless projection retained on context; after carried declaration checks, a stateful projection and matching nonempty GoodVersion/GoodDigest allow stateful recovery without a canonical read. Existing spawn verification remains; projected/stateless/unknown selections retain canonical verification and R18 behavior. R28 final fix 2: an unplanned wake without stateless projection reads only the staged executable sibling at id.StagedPath + .manifest.json as a hint. Missing, unreadable, non-stateless or wrong-identity hints return stateful without opening the deployment store. A matching stateless hint requires canonical verification with knownStateless=true, so missing canonical evidence or digest mismatch refuses. Planned selections and projected stateless generation/pin checks remain. New os.ReadFile of the staged sibling and registry App/Stateless reads; no new root authority or write. file:ReadFile@1502,registry:Account@341,registry:Account@754,registry:App@1663,registry:App@371,registry:App@786,registry:GoodDigest@1943,registry:GoodDigest@1966,registry:GoodVersion@1911,registry:Stateless@1014,registry:Stateless@1473,registry:Stateless@1733,registry:Stateless@1895,registry:Stateless@197,registry:Stateless@2061,registry:Stateless@2351,registry:Stateless@2523,registry:Stateless@510,whole:Route@2320 f8811a7267802a748f0b7dd0270bf8142c8e617e2833cbdc829e02852cefd28b
internal/activator/stateless.go Service.withStatelessFinalCheck legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: attach one fresh validation per web launch; repeated backend gates reuse its result and still recheck local lifecycle ownership. Preserve original route projection from prepared context. whole:Route@186,whole:Route@200,whole:Route@284 09500eae69ab428a8aab3dbb843f207fe27f6a3720fe3cc2185240e4b26c7eb9
internal/activator/stateless.go carryStatelessPreparation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry verified storage or successful preparation facts only within one identity/account/app attempt. Pure context values, no store read, polling, authority acquisition or global cache. whole:Route@156 dc5104da275c7bc4223fbfdb34a170e432ffecf3602c098885e644780381184c
internal/activator/stateless.go storageVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Delete CARLOS_DB after user environment merges for a launch whose actual verified generation is stateless; preserve every other environment variable. registry:Stateless@83 80d538cdee331a4afcdea36daf2ce253c299b9ef1aa5a1b1ed8ec0219c2d1054
@@ -203,7 +203,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 19bd96dc8654e3009fc480f3539eb938ca8a54a577256b1d958bde76173eb719
+@coverage internal/activator 6cc4d14f713dfe274d1ee09e9a0e217f83a03803d3a19bb035b47cc1032e93a2
@coverage internal/host 5058fc069e972aedb7ab2089405ba675735698d31c49a5ef50a5b4b68e873292
@coverage internal/ops 67289ea5b95d14e295bc19e855fab6b00ed240b822e75d4be42b9ded59662e4d
@coverage internal/provision 98d437ab5b9838a252b4e8b517926cac9a568571eae6dc817f94f7ed489e19db