carlos / platform Public

feat: wire stateless release coordination into wakes

Partial Task 2e progress: allow a live successor coordinator to retake or
supersede pending deploys, while retaining releasing uncertainty and all
term, revision and target fences. Let release commands follow renewed
authority safety deadlines through the existing supervisor.

Add refusal and renewal regression tests and refresh census evidence.
Production agent wiring, the existing-read observation carrier and rollout
deploy-ID integration remain unfinished; this is not completion of Task 2e.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 0dd181b1aab664059341669ece41dcec94b49eea parent 9def7a7
8 files changed, +141 −15
  • docs/superpowers/notes/census-proposal-stateless-replicas-1.md +1 −1
  • internal/activator/statelessrelease.go +1 −4
  • internal/activator/statelessrelease_test.go +40 −0
  • internal/provision/replicadeploy.go +6 −4
  • internal/provision/replicadeploy_test.go +85 −0
  • internal/provision/stateless_replicas_census_test.go +3 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv +4 −4

CI failed — run details

Intent

Human

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

Human

<cross-session-message from="uds:/run/user/1001/cc-socks/3781367.sock" from-name="platform-72" from-mode="bypass"> Release heads-up from platform-72: Paul asked for a roll. I'm cutting v0.33.5 from main ceee7a67 (CI green): dev first, then flagship. Since v0.33.4 it carries b40f3bc8 (activity labels), b7802fd8 (probe-burst limit #491), 79d9d6a2 + 06bc3d73 (console styling and mobile nav), 65420a4d (#500), 21738194 + ceee7a67 (team-service design and prototype). If one of these is yours and it needs holding, a flagship step, or a specific check, reply within about 15 minutes. If it's not yours, no reply needed. </cross-session-message>

Attributed to this commit: 8.19 g CO₂e (959,280 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 bfeab242b..f38c640d4 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
@@ -26,6 +26,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/activator/statelessrelease.go:Service.PrepareStatelessRelease`: reads +registry:Account, +registry:App, +registry:GoodDemand, +registry:GoodDigest, +registry:GoodVersion, +registry:Host ×7, +whole:Route ×5; written legacy, accepted-legacy, frozen
- new `internal/replicas/coordinator.go:ChangeCoordinator`: reads +file:Read; written legacy, accepted-legacy, frozen
-Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `1dea183001853f9cb251290ef442f1a7aa8675360615b7c3b68cdc2a156fc44e`.
+Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `8e7e5e02984c37e44814d7592d9b1c66b2940e336f786c4750fb36cdf337a26e`.
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/statelessrelease.go b/internal/activator/statelessrelease.go
index 1d6efdaef..8dd2a85d3 100644
--- a/internal/activator/statelessrelease.go
+++ b/internal/activator/statelessrelease.go
@@ -72,9 +72,6 @@ func (a *Service) PrepareStatelessRelease(ctx context.Context, rt registry.Route
if err := valid(); err != nil {
return err
}
- until, _ := held.SafeUntil()
- ctx, cancel := context.WithDeadline(ctx, until)
- defer cancel()
revision := uint64(0)
if old != nil {
revision = old.Revision
@@ -97,7 +94,7 @@ func (a *Service) PrepareStatelessRelease(ctx context.Context, rt registry.Route
}
revision = closed.Revision
}
- if old != nil && old.ID == deployID {
+ if old != nil && old.ID == deployID && old.Phase != "pending" {
return ErrReplicaReleaseUnknown
}
if _, err := change("begin"); err != nil {
diff --git a/internal/activator/statelessrelease_test.go b/internal/activator/statelessrelease_test.go
index c98616b07..a5710d8d9 100644
--- a/internal/activator/statelessrelease_test.go
+++ b/internal/activator/statelessrelease_test.go
@@ -317,3 +317,43 @@ func TestReplicaReleaseFailureAndObservation(t *testing.T) {
}
})
}
+
+func TestReplicaReleaseRenewalExtendsCommand(t *testing.T) {
+ shrinkRelease(t, 10*time.Millisecond, 5*time.Millisecond)
+ r, s := replicaReleaseRig(t)
+ first := time.Now().Add(time.Second)
+ s.held.setUntil(first)
+ done := prepareReplica(r, "deploy")
+ r.waitStarted(t)
+ s.held.setUntil(time.Now().Add(time.Hour))
+ // Keep the command running past the initial safety deadline.
+ timer := time.NewTimer(time.Until(first) + 40*time.Millisecond)
+ defer timer.Stop()
+ select {
+ case err := <-done:
+ t.Fatalf("renewed command ended at initial bound: %v", err)
+ case <-timer.C:
+ }
+ if len(r.b.unit.stopTimes()) != 0 {
+ t.Fatal("renewal stopped command")
+ }
+ s.held.lose(replicas.ErrFenced)
+ if err := replicaResult(t, done); !errors.Is(err, ErrReplicaReleaseUnknown) {
+ t.Fatalf("loss: %v", err)
+ }
+ if len(r.b.unit.stopTimes()) == 0 {
+ t.Fatal("loss did not stop command")
+ }
+}
+
+func TestReplicaReleasePendingRetake(t *testing.T) {
+ r, s := replicaReleaseRig(t)
+ s.d = &replicas.Deploy{ID: "deploy", Incarnation: "life", Target: replicas.Build{Version: r.id.Version, Digest: "canonical-manifest"}, Phase: "pending", Term: "dead-term", Revision: 1}
+ r.b.unit.done("1", "0", "success")
+ if err := r.a.PrepareStatelessRelease(context.Background(), r.rt, r.id, "deploy"); err != nil {
+ t.Fatal(err)
+ }
+ if s.snapshot().Phase != "released" || r.b.startCount() != 1 {
+ t.Fatal("pending not resumed")
+ }
+}
diff --git a/internal/provision/replicadeploy.go b/internal/provision/replicadeploy.go
index f7df4662b..461948b30 100644
--- a/internal/provision/replicadeploy.go
+++ b/internal/provision/replicadeploy.go
@@ -41,18 +41,20 @@ func SetRecordReplicaRelease(ctx context.Context, s release.Store, id replicas.I
return replicas.ErrFenced
}
if old == nil || old.ID != next.ID {
- if next.Phase != "pending" || (old != nil && old.Phase != "released" && old.Phase != "failed" && old.Phase != "unknown") {
+ if next.Phase != "pending" || (old != nil && old.Phase != "released" && old.Phase != "failed" && old.Phase != "unknown" && !(old.Phase == "pending" && old.Term != next.Term)) {
return replicas.ErrInvalid
}
} else {
if old.Incarnation != next.Incarnation || old.Target != next.Target || old.Previous != next.Previous {
return replicas.ErrFenced
}
- // A new coordinator can close uncertain work, but cannot rerun it.
- if old.Term != next.Term && !(old.Phase == "releasing" && next.Phase == "unknown") {
+ // Pending precedes command admission: a successor may retake it.
+ // Releasing may only be closed as unknown by a successor.
+ retake := old.Phase == "pending" && old.Term != next.Term && next.Phase == "pending"
+ if old.Term != next.Term && !retake && !(old.Phase == "releasing" && next.Phase == "unknown") {
return replicas.ErrFenced
}
- legal := old.Phase == "pending" && (next.Phase == "releasing" || next.Phase == "released" || next.Phase == "failed") || old.Phase == "releasing" && (next.Phase == "released" || next.Phase == "failed" || next.Phase == "unknown")
+ legal := retake || old.Phase == "pending" && (next.Phase == "releasing" || next.Phase == "released" || next.Phase == "failed") || old.Phase == "releasing" && (next.Phase == "released" || next.Phase == "failed" || next.Phase == "unknown")
if !legal {
return replicas.ErrInvalid
}
diff --git a/internal/provision/replicadeploy_test.go b/internal/provision/replicadeploy_test.go
index b007cd741..15b37e829 100644
--- a/internal/provision/replicadeploy_test.go
+++ b/internal/provision/replicadeploy_test.go
@@ -249,3 +249,88 @@ func TestReplicaReleaseLegalTransitions(t *testing.T) {
})
}
}
+
+func TestReplicaReleasePendingSuccessor(t *testing.T) {
+ for _, sameID := range []bool{true, false} {
+ t.Run(map[bool]string{true: "retake", false: "supersede"}[sameID], func(t *testing.T) {
+ ctx, id := replicaFixture(t)
+ s, rec := fleetBoxFixture(t)
+ id.Incarnation, _ = Incarnation(rec.Account, rec.App, rec.Host, rec.CreatedAt)
+ if err := SetRecordFleetBox(ctx, s, id.Account, id.App, id.Host, FleetBoxExpect{Region: rec.Region, CreatedAt: rec.CreatedAt}, "local", time.Now()); err != nil {
+ t.Fatal(err)
+ }
+ r, err := SetRecordCoordinator(ctx, s, id, replicas.CoordinatorChange{Op: "acquire", Box: "local", BootID: "boot"}, time.Now())
+ if err != nil {
+ t.Fatal(err)
+ }
+ d := replicas.Deploy{ID: "deploy", Incarnation: id.Incarnation, Term: r.Coordinator.Term, Target: replicas.Build{Version: "v1", Digest: "digest"}, Phase: "pending"}
+ r, err = SetRecordReplicaRelease(ctx, s, id, 0, d)
+ if err != nil {
+ t.Fatal(err)
+ }
+ next := d
+ if !sameID {
+ next.ID = "retry"
+ }
+ if _, err := SetRecordReplicaRelease(ctx, s, id, 1, next); err == nil {
+ t.Fatal("live pending replaced")
+ }
+ // Expire A without sleeping; only a coordinator acquisition can
+ // create the live successor term.
+ key := RecordKey(id.Account, id.App, id.Host)
+ raw, etag, err := s.Get(ctx, key)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var expired Record
+ if err := json.Unmarshal(raw, &expired); err != nil {
+ t.Fatal(err)
+ }
+ expired.Coordinator.ExpiresAt = time.Now().Add(-time.Second)
+ raw, err = json.Marshal(expired)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if _, err := s.Put(ctx, key, raw, etag); err != nil {
+ t.Fatal(err)
+ }
+ r, err = SetRecordCoordinator(ctx, s, id, replicas.CoordinatorChange{Op: "acquire", Box: "local", BootID: "boot"}, time.Now())
+ if err != nil {
+ t.Fatal(err)
+ }
+ next.Term = r.Coordinator.Term
+ if sameID {
+ changed := next
+ changed.Target.Digest = "other-digest"
+ if _, err := SetRecordReplicaRelease(ctx, s, id, 1, changed); err == nil {
+ t.Fatal("retake changed pinned target")
+ }
+ }
+ // A successor must first persist pending, never jump directly
+ // from the dead term's pending to successful evidence.
+ for _, phase := range []string{"released", "releasing"} {
+ bad := next
+ bad.Phase = phase
+ if _, err := SetRecordReplicaRelease(ctx, s, id, 1, bad); err == nil {
+ t.Fatal("successor skipped pending")
+ }
+ }
+ r, err = SetRecordReplicaRelease(ctx, s, id, 1, next)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if r.ReplicaDeploy.ID != next.ID || r.ReplicaDeploy.Term != next.Term || r.ReplicaDeploy.Revision != 2 {
+ t.Fatal("pending not retaken")
+ }
+ late := d
+ late.Phase = "releasing"
+ if _, err := SetRecordReplicaRelease(ctx, s, id, 2, late); err == nil {
+ t.Fatal("dead term executed")
+ }
+ next.Phase = "releasing"
+ if _, err := SetRecordReplicaRelease(ctx, s, id, 2, next); err != nil {
+ t.Fatal(err)
+ }
+ })
+ }
+}
diff --git a/internal/provision/stateless_replicas_census_test.go b/internal/provision/stateless_replicas_census_test.go
index db1d6a76d..d72dcd0c1 100644
--- a/internal/provision/stateless_replicas_census_test.go
+++ b/internal/provision/stateless_replicas_census_test.go
@@ -16,7 +16,9 @@ func statelessReplicasWriteCensusInventory() []censusEntry {
// Registration adds only the two fleet routes; the existing literal-only
// instances/sidecars classification and all existing route handlers stay fixed.
{"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "89c700b1b939a8c8bbd478a548efeabfa4fc888f1509b7e3c76ad91472219a29"},
- {"internal/provision/replicadeploy.go", "SetRecordReplicaRelease", "record-writer", "key:SetRecordReplicaRelease,key:updateRecord", "63d5985d8e05c174a34d13db6735c23307e0c241a70f8fd411eee7c333abea55"},
+ // R11 self-review: only a live successor term may retake or supersede
+ // pending; releasing remains unknown-only across terms. Same typed CAS.
+ {"internal/provision/replicadeploy.go", "SetRecordReplicaRelease", "record-writer", "key:SetRecordReplicaRelease,key:updateRecord", "465e4c445bd8f2781cca840aac94234d107b877d6d4b552030665d8c1877d933"},
{"internal/console/replicacoordinator.go", "Server.handleReplicaCoordinator", "record-writer", "key:SetRecordCoordinator", "8c36451d5cb57887117b346293b4deb46b8ec3aa06ffb9f8a8b97594c64133c8"},
{"internal/console/replicacoordinator.go", "Server.handleReplicaRelease", "record-writer", "key:SetRecordReplicaRelease", "6cc4eb4a564d3419b48928091d082d5e83c6159f37b8373f78eb07931e0ee39c"},
{"internal/provision/record_sequence.go", "WriteRecord", "record-primitive", "key:IsRecordKey,key:WriteRecord,key:preparedRecordKey,sel:Put", "6bcdf4c07e3c583c013c396c5d02770eab83459b0eb5256a1e8c68c4240f31e8"},
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 38291f8c0..6174107c4 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 1dea183001853f9cb251290ef442f1a7aa8675360615b7c3b68cdc2a156fc44e
+plan14-root-reads-stateless-replicas-1.tsv 8e7e5e02984c37e44814d7592d9b1c66b2940e336f786c4750fb36cdf337a26e
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 ec258ba7d..e83c40259 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
@@ -4,19 +4,19 @@
@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 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 bf907111a6526f31ed49ab718b90896b8f33a48ba63f26f47f3889a521e82bb9 internal/activator/rootfsrelease.go Service.runReleaseAdmitted legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Extract existing runner unchanged except optional pre-exec durable release transition after local admission and before any command; same staged process reads, stop/proof and exec gates, no new filesystem path. registry:Host@216,whole:Route@3085,whole:Route@3314,whole:Route@3802,whole:Route@3831,whole:Route@5879,whole:Route@621,whole:Route@6347,whole:Route@6624,whole:Route@7054,whole:Route@849,whole:Route@934 de8d9d6b31ac2b8cf2c34aaca32ecfbdd2c8966f75def906e3baef5bb409d109
-@legacy 33d992eb35addcdfb9c8049f082f7aa9559443e33ce3008e819db38b50b6bf36 internal/activator/statelessrelease.go Service.PrepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Read durable deploy evidence and canonical target via existing-record observation seam; use coordinator authority only for this path, persist releasing before exec and require proof plus SafeUntil before success; commandless binary verifies staged artifact separately; no new store polling or direct typed record writer callsite. registry:Account@544,registry:App@574,registry:GoodDemand@3040,registry:GoodDigest@3025,registry:GoodVersion@3009,registry:Host@1170,registry:Host@224,registry:Host@3096,registry:Host@3154,registry:Host@3370,registry:Host@3438,registry:Host@601,whole:Route@3163,whole:Route@3170,whole:Route@3722,whole:Route@4435,whole:Route@483 f0ace93030a592f4182099d5c7ca2d91eea88d2b521e5a039135977382e58c95
+@legacy c1cd70888a4676cd1878a9668111499b21f73e270a26a85a8fcec47da9283da4 internal/activator/statelessrelease.go Service.PrepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Read durable deploy evidence and canonical target via existing-record observation seam; use coordinator authority only for this path, persist releasing before exec and require proof plus SafeUntil before success; commandless binary verifies staged artifact separately; R11 lets the current term retake pending via the typed begin gate; R12 follows renewed SafeUntil through the existing command supervisor instead of a fixed initial context deadline; no new store polling or direct typed record writer callsite. registry:Account@544,registry:App@574,registry:GoodDemand@2971,registry:GoodDigest@2956,registry:GoodVersion@2940,registry:Host@1170,registry:Host@224,registry:Host@3027,registry:Host@3085,registry:Host@3301,registry:Host@3369,registry:Host@601,whole:Route@3094,whole:Route@3101,whole:Route@3653,whole:Route@4366,whole:Route@483 c18d125d320c4fdc5181c3977c1553af20268db59b4624e1a26deb459e55cf5b
@legacy 1861ee20fec27c99526b8095d2b82598367595db4fcdbf2bc47ba40a269ec37f internal/replicas/coordinator.go ChangeCoordinator legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Generate a fresh 128-bit coordinator term using crypto/rand.Read; no file path or process input added. file:Read@472 e50ce5a352b3022a1ee6375fbfee315a5d2fcaeb4f4a25f4e33a5a10e3000a67
@legacy e022f83d4f2fe0524efad7d2e7acc9cc44a0510f14016131edc162dc02242142 internal/activator/rootfsrelease.go Service.runRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1: new; the one place a release command runs. Refuses while any record of the host is open; skips the row's good build (releaseRan); reads the declared processes (declaredProcesses: the existing staged-manifest read) and refuses on a read error, never treating it as no release; runs only when releaseDue; needs a lease watch and a ReleaseBackend; its gate is the caller's plus the lease's Err and its safety deadline more than releaseStopLead (cmdStopBound, 2 min) away; creates the record under a.mu after releaseAdmitLocked; publishes the generations file and the build state (recordBuild) before anything runs; times out at the manifest's timeout_sec (default, capped at runs.MaxTimeout); ReleaseEnv; a supervisor stops the unit ahead of the lease's safety deadline; StartRelease under the exec gate; polls the unit (root's existing cmd status); stops and settles it (the existing cmd hold's stop, cmdStopBound); only a non-zero exit, a signal or the timeout with the unit proven gone is the build's failure (*ReleaseError); registry:Host sites are the record key and log lines;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 9: newCmdHold takes the hold's role; a release command's hold is instancectl.RoleCmd, the unit it runs in; nothing else changed, no read added;rev3=census-ruling-stateless-replicas-1;basis=Delegate unchanged stateful admission and stop/proof behavior to runReleaseAdmitted with no durable admission hook; reads moved to that method. whole:Route@212 45130d20bc0a8f9dcc30908479ce0189e39ee9e68d44e95a9aa6b8e84e0bc20f
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
internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. d79460f7b2128cc601a9d9149fcc0ce0baed0f4555e7d073848f099b197ea39e
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/rootfsrelease.go Service.runReleaseAdmitted legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Extract existing runner unchanged except optional pre-exec durable release transition after local admission and before any command; same staged process reads, stop/proof and exec gates, no new filesystem path. registry:Host@216,whole:Route@3085,whole:Route@3314,whole:Route@3802,whole:Route@3831,whole:Route@5879,whole:Route@621,whole:Route@6347,whole:Route@6624,whole:Route@7054,whole:Route@849,whole:Route@934 de8d9d6b31ac2b8cf2c34aaca32ecfbdd2c8966f75def906e3baef5bb409d109
-internal/activator/statelessrelease.go Service.PrepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Read durable deploy evidence and canonical target via existing-record observation seam; use coordinator authority only for this path, persist releasing before exec and require proof plus SafeUntil before success; commandless binary verifies staged artifact separately; no new store polling or direct typed record writer callsite. registry:Account@544,registry:App@574,registry:GoodDemand@3040,registry:GoodDigest@3025,registry:GoodVersion@3009,registry:Host@1170,registry:Host@224,registry:Host@3096,registry:Host@3154,registry:Host@3370,registry:Host@3438,registry:Host@601,whole:Route@3163,whole:Route@3170,whole:Route@3722,whole:Route@4435,whole:Route@483 f0ace93030a592f4182099d5c7ca2d91eea88d2b521e5a039135977382e58c95
+internal/activator/statelessrelease.go Service.PrepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Read durable deploy evidence and canonical target via existing-record observation seam; use coordinator authority only for this path, persist releasing before exec and require proof plus SafeUntil before success; commandless binary verifies staged artifact separately; R11 lets the current term retake pending via the typed begin gate; R12 follows renewed SafeUntil through the existing command supervisor instead of a fixed initial context deadline; no new store polling or direct typed record writer callsite. registry:Account@544,registry:App@574,registry:GoodDemand@2971,registry:GoodDigest@2956,registry:GoodVersion@2940,registry:Host@1170,registry:Host@224,registry:Host@3027,registry:Host@3085,registry:Host@3301,registry:Host@3369,registry:Host@601,whole:Route@3094,whole:Route@3101,whole:Route@3653,whole:Route@4366,whole:Route@483 c18d125d320c4fdc5181c3977c1553af20268db59b4624e1a26deb459e55cf5b
internal/replicas/coordinator.go ChangeCoordinator legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Generate a fresh 128-bit coordinator term using crypto/rand.Read; no file path or process input added. file:Read@472 e50ce5a352b3022a1ee6375fbfee315a5d2fcaeb4f4a25f4e33a5a10e3000a67
internal/activator/rootfsrelease.go Service.runRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1: new; the one place a release command runs. Refuses while any record of the host is open; skips the row's good build (releaseRan); reads the declared processes (declaredProcesses: the existing staged-manifest read) and refuses on a read error, never treating it as no release; runs only when releaseDue; needs a lease watch and a ReleaseBackend; its gate is the caller's plus the lease's Err and its safety deadline more than releaseStopLead (cmdStopBound, 2 min) away; creates the record under a.mu after releaseAdmitLocked; publishes the generations file and the build state (recordBuild) before anything runs; times out at the manifest's timeout_sec (default, capped at runs.MaxTimeout); ReleaseEnv; a supervisor stops the unit ahead of the lease's safety deadline; StartRelease under the exec gate; polls the unit (root's existing cmd status); stops and settles it (the existing cmd hold's stop, cmdStopBound); only a non-zero exit, a signal or the timeout with the unit proven gone is the build's failure (*ReleaseError); registry:Host sites are the record key and log lines;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 9: newCmdHold takes the hold's role; a release command's hold is instancectl.RoleCmd, the unit it runs in; nothing else changed, no read added;rev3=census-ruling-stateless-replicas-1;basis=Delegate unchanged stateful admission and stop/proof behavior to runReleaseAdmitted with no durable admission hook; reads moved to that method. whole:Route@212 45130d20bc0a8f9dcc30908479ce0189e39ee9e68d44e95a9aa6b8e84e0bc20f
@coverage . d8abf32baa39f05d1e9d4e9b8a24e7113c58f42f8735e7a62e217eb39e7a4bf7
-@coverage internal/activator 59ad9cf8c9e85110d977ffccc916ae27046e5b49ffaec41f1510d30d61707417
+@coverage internal/activator 9aa9e1a39dcc62920eb1bea0af0e8080c712cd61d8aff8c4ed23baabfee68454
@coverage internal/host 3739b405de9e625ae361d664dca7c61508b2d789cde71e4b33f6bf880d555b0f
-@coverage internal/provision 974d05f290939ef4e4eb8af398b230b1df780357c3077988a35054ce52109626
+@coverage internal/provision 80abfa28c9854d534818202aab9b1b4c09adb5d943b49a51e9efd77152d9a1ae
@coverage internal/release 261fde7e6e53d2b4d944df966be3f00208d4d7153aed2d19148cbfd403af9d52
@coverage internal/replicas 53b94eb040154539a0a977498b4b8bc1d53d82f67c1c6233667a0b823dd30d8a