carlos / platform Public

fix: say only what is known when a release step fails (#511 F11 r2)

Fix round 2 of Task 3F, after the Astra and Fable re-reviews.

- The close of a stale releasing observation that does not go through
  no longer reads as an unknown result: a lost term reads as
  errReplicaTermLost, a lost reply or an older console's bare 409 as
  errReplicaStepUnconfirmed, and a writer refusal still adopts. A failed
  releasing write before the exec maps the same way. None counts toward
  resident backoff. ErrReplicaReleaseUnknown stays only where a release
  command's result is unknown.
- An unreachable console keeps its own error, so a resident's retries
  against it back off as they did before this task.
- SR-4-C58 says only that the route row no longer matches the one the
  start was prepared against.

Census overlay stateless-replicas-4-task3f re-proposed over all rounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev fa314626296a3b9c867961e4910a576f6e20214e parent 0abaa0c
7 files changed, +118 −23
  • docs/superpowers/notes/census-proposal-stateless-replicas-4-task3f.md +2 −2
  • docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md +2 −2
  • internal/activator/stateless.go +1 −1
  • internal/activator/stateless_holdwake_test.go +79 −0
  • internal/activator/statelessrelease.go +28 −12
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv +5 −5

CI failed — run details

Intent

Human

<task-notification> <task-id>a5315a07ea5309511</task-id> <tool-use-id>toolu_012ruAbUUxRUY1nGQMqXwcRh</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/a5315a07ea5309511.output</output-file> <status>completed</status> <summary>Agent "Implement Plan 4 Task 3F (F11)" 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>- **Status:** DONE_WITH_CONCERNS - **Commits:** `8e0e9eab` (round 0) and `0abaa0c0 fix: adopt the record on a refused release step (#511 F11 round 1)`. Both local, not pushed. - **What round 1 changed:** - The pinned wake now moves its preparation onto the row it re-read only when `Incarnation`, `ServingSeq`, `HoldOp` and `Version` match. A refused step comes back with the record's attempt, and the box adopts it, with no extra bucket call. - Steps that ran nothing no longer count toward backoff. - Each refused step now says only what is known, using provisional copy rows SR-4-C55 to C58. The request loop now stops through `t.Cleanup`. - **Tests:** - The switch witness failed against the round-0 activator and passes now: a crash in the stale window restarts C with no reconcile pass and no second release. - New unit cases (4 rebase negatives, stale nil/pending/releasing adoption, ran-nothing wording, no backoff growth) and adapter tests (host store, host API, console 409) pass. The unit cases do not compile against round-0 code, so there is no behavioural RED for them. - Targeted activator, host, console and root tests pass, as do the grouproll and region HA guards, all three cross-builds, vet and both censuses. - I ran no new mutations this round, because round 0 used the task's cap of 5. - **Census:** I replaced round 0's `task3f` overlay with one covering both rounds. The seal moved bd253671 → a1073d6c, and `make census-card` reports clean. - **Concerns:** - If the close of an observed releasing attempt fails for any reason other than a writer refusal (a lost reply, or the term lost locally), it still reports "unknown". Ruling 4 named only the begin. - A console older than this build sends no record with its 409, so the box falls back to "did not confirm" and waits for the next reconcile pass until the console is updated. - The 409 body now returns the record's `ReplicaDeploy` to the fleet box. I believe that exposes nothing new; please confirm. - SR-4-C55 to C58 need Paul's copy review. - A test temp dir, `/tmp/g/TestStatelessObservedUnknownReleaseIsHeld3479152804`, appeared during my activator test run. I left it, because I can't confirm I created it. - **Report:** `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-replicas-4/.superpowers/sdd/2026-11-01-stateless-replicas-4-deploy-and-drill/task-3F-report.md` (fix round 1 appended)</result> <usage><subagent_tokens>398012</subagent_tokens><tool_uses>42</tool_uses><duration_ms>1872819</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>b5e33q905</task-id> <tool-use-id>toolu_01LixdGk6oJ2cnF2CAt8mUXV</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/b5e33q905.output</output-file> <status>completed</status> <summary>Background command "Astra re-review of F11 round 1" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bop5sq3gv</task-id> <tool-use-id>toolu_01WZiQsfjH5mnjGLGew8tCz7</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/bop5sq3gv.output</output-file> <status>completed</status> <summary>Background command "Fable re-review of F11 round 1" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 19.3 g CO₂e (2,425,305 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-replicas-4, 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-4-task3f.md b/docs/superpowers/notes/census-proposal-stateless-replicas-4-task3f.md
index ad5956afb..925d0beef 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-4-task3f.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-4-task3f.md
@@ -6,7 +6,7 @@ Ruling `census-ruling-stateless-replicas-4-task3f`. The independent reviewer app
|---|---|---|---|
| `internal/activator/stateless.go` `Service.statelessCurrent` | body | unchanged (20) | Task 3F fix round 1 (#511 F11): its two route refusals return errStatelessRowChanged (SR-4-C58), a value that is ErrFenced to every errors.Is caller but names no fence. Same reads and comparisons; refusal text only. |
| `internal/activator/stateless.go` `Service.prepareStateless` | sites | +whole:Route ×8 | Task 3F (#511 F11): a hold's pinned wake carrying the swap's preparation, when the row it re-read differs from the prepared row, moves the preparation onto the wake's row only if the prepared row passes statelessCurrent against the registry, the two rows have the same Incarnation, ServingSeq, HoldOp and Version (sameRowLifetime, fix round 1), and the wake's row then passes statelessCurrent; otherwise it refuses with errStatelessRowChanged. The added sites are whole-Route comparisons and copies of the handed and prepared routes. No store read or write added; no new authority. |
-| `internal/activator/statelessrelease.go` `Service.prepareStatelessRelease` | sites | +whole:Route ×2 | Task 3F fix round 1 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that the writer refuses with replicas.ReleaseRefused re-runs adoptDurable once on the record attempt that refusal carries (read by the adapter in the same call), with no read of its own; the exec's fresh record check stays the final gate. Other step failures map to errReplicaRecordRefused, errReplicaTermLost or errReplicaStepUnconfirmed (SR-4-C55 to C57), all ran-nothing refusals. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. |
+| `internal/activator/statelessrelease.go` `Service.prepareStatelessRelease` | sites | +whole:Route ×2 | Task 3F fix rounds 1-2 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that does not go through goes to refusedStep: a writer refusal (replicas.ReleaseRefused, record read by the adapter in the same call) re-runs adoptDurable once with no read of its own; anything else maps through stepError. A failed releasing write before the exec maps through stepError too. ErrReplicaReleaseUnknown stays only where a release command's result is unknown (an open release record, a successful close of this attempt, and the post-exec paths). The exec's fresh record check stays the final gate. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. |
Envelopes re-pinned: `internal/activator`, `internal/host`, `internal/replicas`.
@@ -24,6 +24,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/activator/statelessrelease.go:Service.adoptDurable`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/activator/statelessrelease.go:Service.refusedStep`: reads +whole:Route; written legacy, accepted-legacy, frozen
-Seal: `bd25367161555e8a9c5b0df079ad2d8eb648ebaeae3f407e6c638f2f7f01605b` → `a1073d6c41fbe29eb8068fa6665fa3c5aab9ae0a90423a53e781403bdbd575ac`.
+Seal: `bd25367161555e8a9c5b0df079ad2d8eb648ebaeae3f407e6c638f2f7f01605b` → `8c7ae110ab94e18c6689533cc7fd43eec337fd78adb88c4f203ec24fda740d85`.
Overlay: `internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
index f8f1fd56a..ea95c6fd7 100644
--- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
+++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
@@ -128,5 +128,5 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text.
| SR-4-C54 | internal/console/templates/app_overview.html | <unknown> of <desired> copies unknown; <running> known running | pending (added by Plan 4 Task 3 fix round 1: the overview count when any copy has no live reading, so an unread copy is never counted as stopped; awaiting Paul's copy review) |
| SR-4-C55 | internal/activator/statelessrelease.go | the deploy record did not accept this release step, so nothing started | pending (added by Plan 4 Task 3F for F11: a release step the record's writer refused, whose record holds no attempt this box adopts; fix round 1 replaced the first draft, which named a cause that was not always known; awaiting Paul's copy review) |
| SR-4-C56 | internal/activator/statelessrelease.go | this box is no longer coordinating this deploy, so nothing started | pending (added by Plan 4 Task 3F fix round 1: a release step this box did not send because it no longer held the coordinator term, or was shutting down; awaiting Paul's copy review) |
-| SR-4-C57 | internal/activator/statelessrelease.go | the deploy record did not confirm this release step, so nothing started. the next start tries again | pending (added by Plan 4 Task 3F fix round 1: a release step whose answer was lost or did not match, which used to read as an unknown command result; awaiting Paul's copy review) |
-| SR-4-C58 | internal/activator/stateless.go | the instance's settings changed while this start was prepared, so nothing started | pending (added by Plan 4 Task 3F fix round 1: a stateless start whose route row changed after its preparation, which used to read as "maintenance fence active"; awaiting Paul's copy review) |
+| SR-4-C57 | internal/activator/statelessrelease.go | the deploy record did not confirm this release step, so nothing started. the next start tries again | pending (added by Plan 4 Task 3F fix round 1: a release step whose answer was lost or did not match, which used to read as an unknown command result; fix round 2 also uses it for a close of a stale releasing observation whose outcome is not established; awaiting Paul's copy review) |
+| SR-4-C58 | internal/activator/stateless.go | the instance's route row no longer matches the one this start was prepared against, so nothing started | pending (added by Plan 4 Task 3F fix round 1: a stateless start whose route row changed after its preparation, which used to read as "maintenance fence active"; fix round 2 narrowed it from "settings changed" to what is known; awaiting Paul's copy review) |
diff --git a/internal/activator/stateless.go b/internal/activator/stateless.go
index 96ac8f3b4..6ff7a4af1 100644
--- a/internal/activator/stateless.go
+++ b/internal/activator/stateless.go
@@ -57,7 +57,7 @@ type statelessRecordKey struct{}
type statelessRowChanged struct{}
func (statelessRowChanged) Error() string {
- return "the instance's settings changed while this start was prepared, so nothing started"
+ return "the instance's route row no longer matches the one this start was prepared against, so nothing started"
}
func (statelessRowChanged) Is(target error) bool { return target == ErrFenced }
diff --git a/internal/activator/stateless_holdwake_test.go b/internal/activator/stateless_holdwake_test.go
index f1950d908..af6875be1 100644
--- a/internal/activator/stateless_holdwake_test.go
+++ b/internal/activator/stateless_holdwake_test.go
@@ -214,3 +214,82 @@ func TestReplicaStepRefusalNoBackoff(t *testing.T) {
}
}
}
+
+// failingStep is replicaReleaseStore whose answer to one release op is err,
+// sent before the store sees the step (a lost term, a lost reply, an older
+// console's bare refusal, an unreachable console).
+type failingStep struct {
+ *replicaReleaseStore
+ op string
+ err error
+}
+
+func (f failingStep) ReleaseState(ctx context.Context, id replicas.Identity, c replicas.ReleaseChange) (replicas.Deploy, error) {
+ if c.Op == f.op {
+ return replicas.Deploy{}, f.err
+ }
+ return f.replicaReleaseStore.ReleaseState(ctx, id, c)
+}
+
+// TestReplicaReleaseStepFailuresSayWhatIsKnown is #511 F11 fix round 2:
+// the close of a stale releasing observation, and the releasing write
+// before the exec, say only what is known when they do not go through.
+// None claims an unknown result, a stopped deploy, a serving build or a
+// needed redeploy, and none grows a resident's backoff. An unreachable
+// console is paced by the backoff as before.
+func TestReplicaReleaseStepFailuresSayWhatIsKnown(t *testing.T) {
+ rt := testRoute("shop.example.com")
+ rt.Hibernate, rt.Runtime = false, registry.RuntimeRootfsV1
+ now := time.Unix(1000, 0)
+ failures := func(err error) int {
+ a := &Service{now: func() time.Time { return now }}
+ e := &actEntry{host: rt.Host, route: rt}
+ a.mu.Lock()
+ defer a.mu.Unlock()
+ for i := 0; i < 3; i++ {
+ a.noteResidentWakeLocked(e, err)
+ }
+ return a.residents[rt.Host].failures
+ }
+ releasing := func(r *releaseRig) *replicas.Deploy {
+ return &replicas.Deploy{ID: "deploy", Incarnation: "life", Term: "other", Target: replicas.Build{Version: r.id.Version, Digest: "canonical-manifest"}, Phase: "releasing", Revision: 2}
+ }
+ for _, tc := range []struct {
+ name string
+ op string
+ err error
+ observed func(*releaseRig) *replicas.Deploy
+ want error
+ backoff bool
+ }{
+ {"term lost on the close", "unknown", errReleaseTermNotHeld, releasing, errReplicaTermLost, false},
+ {"lost close reply", "unknown", context.DeadlineExceeded, releasing, errReplicaStepUnconfirmed, false},
+ {"older console refuses the close", "unknown", replicas.ErrFenced, releasing, errReplicaStepUnconfirmed, false},
+ {"lost releasing reply", "releasing", context.DeadlineExceeded, nil, errReplicaStepUnconfirmed, false},
+ {"console unreachable on the begin", "begin", replicas.ErrConsoleUnreachable, nil, replicas.ErrConsoleUnreachable, true},
+ } {
+ t.Run(tc.name, func(t *testing.T) {
+ r, s := replicaReleaseRig(t)
+ r.a.Coordinator = failingStep{s, tc.op, tc.err}
+ if tc.observed != nil {
+ old := tc.observed(r)
+ s.d = old
+ r.a.ObserveReplicaRelease = func(context.Context, registry.Route) (replicas.Identity, replicas.Build, *replicas.Deploy, error) {
+ return replicas.Identity{Account: r.rt.Account, App: r.rt.App, Host: r.rt.Host, Incarnation: "life"}, old.Target, old, nil
+ }
+ }
+ err := r.a.PrepareStatelessRelease(context.Background(), r.rt, r.id, "deploy")
+ if !errors.Is(err, tc.want) || errors.Is(err, ErrReplicaReleaseUnknown) || r.b.startCount() != 0 {
+ t.Fatalf("%v, starts=%d", err, r.b.startCount())
+ }
+ for _, claim := range []string{"unknown", "deploy stopped", "keeps serving", "deploy again"} {
+ if strings.Contains(err.Error(), claim) {
+ t.Fatalf("%q claims %q", err, claim)
+ }
+ }
+ if got := failures(err); (got != 0) != tc.backoff {
+ t.Fatalf("%v: resident failures %d, backoff %v", err, got, tc.backoff)
+ }
+ })
+ }
+}
diff --git a/internal/activator/statelessrelease.go b/internal/activator/statelessrelease.go
index 64d7bb766..a82d04863 100644
--- a/internal/activator/statelessrelease.go
+++ b/internal/activator/statelessrelease.go
@@ -59,19 +59,32 @@ func (a *Service) adoptDurable(ctx context.Context, rt registry.Route, identity
// writer's refusal carries the record's attempt as the writer's caller read
// it: adoption runs on it once, with no read of this box's own, and the
// exec's fresh record check stays the final gate. Anything else ran nothing
-// and says which kind of answer it was.
+// and says which kind of answer it was (stepError).
func (a *Service) refusedStep(ctx context.Context, rt registry.Route, identity replicas.Identity, target replicas.Build, deployID string, err error) (string, error) {
var refused *replicas.ReleaseRefused
- switch {
- case errors.As(err, &refused):
+ if errors.As(err, &refused) {
if id, aerr, ok := a.adoptDurable(ctx, rt, identity, target, refused.Current); ok {
return id, aerr
}
- return deployID, errReplicaRecordRefused
+ }
+ return deployID, stepError(err)
+}
+
+// stepError is a release step that did not go through, before any release
+// command of it ran on this box, said as known. Only an unreachable
+// console keeps its own error: it is no refusal, so a resident's retries
+// against it back off as they did before #511 F11 (residentFailure).
+func stepError(err error) error {
+ var refused *replicas.ReleaseRefused
+ switch {
+ case errors.As(err, &refused):
+ return errReplicaRecordRefused
case errors.Is(err, errReleaseTermNotHeld):
- return deployID, errReplicaTermLost
+ return errReplicaTermLost
+ case errors.Is(err, replicas.ErrConsoleUnreachable):
+ return err
}
- return deployID, errReplicaStepUnconfirmed
+ return errReplicaStepUnconfirmed
}
// PrepareStatelessRelease runs one release attempt named deployID. The
@@ -179,13 +192,15 @@ func (a *Service) prepareStatelessRelease(ctx context.Context, rt registry.Route
// A releasing observation is never permission to execute, even when
// this client still holds its term after a lost begin/exec response.
closed, closeErr := a.Coordinator.ReleaseState(ctx, identity, replicas.ReleaseChange{Op: "unknown", ID: old.ID, Target: old.Target, Revision: old.Revision})
- var refused *replicas.ReleaseRefused
- if errors.As(closeErr, &refused) {
- // The record moved past the observed releasing attempt: the
- // observation was stale (#511 F11), and the record decides.
+ if closeErr != nil {
+ // The close did not go through, and nothing ran here. A refusal
+ // means the record moved past the observed releasing attempt
+ // (#511 F11), so the record decides; a lost term or answer is
+ // said as such. None of these establishes the deploy's outcome.
return a.refusedStep(ctx, rt, identity, target, deployID, closeErr)
}
- if closeErr != nil || old.ID == deployID {
+ if old.ID == deployID {
+ // The record now durably holds this attempt's result as unknown.
return deployID, ErrReplicaReleaseUnknown
}
revision = closed.Revision
@@ -236,7 +251,8 @@ func (a *Service) prepareStatelessRelease(ctx context.Context, rt registry.Route
}
return a.runReleaseAdmitted(ctx, e, rt, id, watchOf(held), gate, func() error {
if _, err := change("releasing"); err != nil {
- return ErrReplicaReleaseUnknown
+ // Before the command's exec: nothing ran (#511 F11).
+ return stepError(err)
}
releasing = true
return nil
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index d73a0825e..9f259b0bf 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -177,4 +177,4 @@ plan14-root-reads-stateless-replicas-4-task2-fix1.tsv 1a0605f79ac62c776bccc1ae8d
plan14-root-reads-stateless-replicas-4-task2-fix2.tsv 5f83de2e018b47543789a8dbe2cccb86b2d644fbe9ee5771e5d621704ae46e0b
plan14-root-reads-stateless-replicas-4-task2-fix3.tsv bd25367161555e8a9c5b0df079ad2d8eb648ebaeae3f407e6c638f2f7f01605b
plan14-root-reads-stateless-replicas-4-task3.tsv bd25367161555e8a9c5b0df079ad2d8eb648ebaeae3f407e6c638f2f7f01605b
-plan14-root-reads-stateless-replicas-4-task3f.tsv a1073d6c41fbe29eb8068fa6665fa3c5aab9ae0a90423a53e781403bdbd575ac
+plan14-root-reads-stateless-replicas-4-task3f.tsv 8c7ae110ab94e18c6689533cc7fd43eec337fd78adb88c4f203ec24fda740d85
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv b/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv
index 3cb0ffcde..e48b2e537 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-task3f.tsv
@@ -4,15 +4,15 @@
@legacy 887db36e2cd53538e437a0ce0c2e466e7143332f7014b031749ce984d892f7f2 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.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): its two route refusals return errStatelessRowChanged (SR-4-C58), a value that is ErrFenced to every errors.Is caller but names no fence. Same reads and comparisons; refusal text only. 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@667,whole:Route@679,whole:Route@763 bb80cfe535efc3a5b30d4a81ab759242e46dc6fd7bc41de9638e8c01f74cc4dc
@legacy f6033b40e9a95ab1f0791170ec35188eaac78219f2b7552408dc9766ce27e639 internal/activator/stateless.go sameRowLifetime legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new. Compares four fields (Incarnation, ServingSeq, HoldOp, Version) of two in-memory route rows it is handed; no read, write or authority. registry:HoldOp@153,registry:HoldOp@172,registry:Incarnation@67,registry:Incarnation@91,registry:ServingSeq@111,registry:ServingSeq@134,registry:Version@187,registry:Version@207 8cc7ffa914050e09404a4e4a13657db356014ff97cca8cc641dafdaa16a1d6cc
@legacy 16c7f9c2393d58e24e579c3a2a16e3c676aae502bab5edd51c8b178238563b93 internal/activator/statelessrelease.go Service.adoptDurable legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new; the R9 adoption switch moved out of prepareStatelessRelease unchanged: DurableAttempt on the attempt it is handed, then the same escrow initializer call (prepareStatelessEscrow) for a passed release, or the failed or unknown sentinel. No new read, write or authority. whole:Route@459 4c32b8d100a319d2a099db1faa9f36b40fedf095583a6ff30ec5ad1345cc41c8
-@legacy f80b56b86ec72c00c7bf79adb30465ddd32312dae206decf575deb68aac5ee1d internal/activator/statelessrelease.go Service.refusedStep legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new. For a writer refusal (replicas.ReleaseRefused) it calls adoptDurable once on the record attempt the refusal carries; otherwise it maps the error to a ran-nothing sentinel. It reads only the handed route and error; no store read, write or authority. whole:Route@288 1b6b3ec116858d006ae3ffcc558eb456370f8e304a9a23edc8f7ed3985d0b910
+@legacy 33bfff5249a4d7e23b11f582e0068c7da08ed5fda64149f080b16b21783c04dd internal/activator/statelessrelease.go Service.refusedStep legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix rounds 1-2 (#511 F11): new. For a writer refusal (replicas.ReleaseRefused) it calls adoptDurable once on the record attempt the refusal carries; otherwise, or when nothing adopts, it returns stepError's ran-nothing sentinel (an unreachable console keeps its own error). It reads only the handed route and error; no store read, write or authority. whole:Route@277 78b6a7ec4509bcccbd6640f4cf657994749b19e01f0116e0d8398668ecc610de
@legacy 23ffec670212b09610996854bd32476cef1a8e192b3824a12a79ee946735707d internal/activator/stateless.go Service.prepareStateless legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Capture RecordFacts from the existing record source, obtain the durable FailureBook deploy ID, and call Task 2 PrepareStatelessRelease with the canonical verdict/digest carrier. Carry a successful attempt through its hold only after another current-record check; no serving lease or polling loop. Fix 3a round 1 I2: preparation uses reconcile observations and records the successful deploy ID. Carry prepared evidence through hold; fresh backend read must confirm that same released deploy before web runs.;rev3=census-ruling-stateless-failed-release-held;basis=For recovery onto a different installed version's exact committed good version and artifact digest, retain recovery evidence without selecting or writing another deploy. Adds the existing committedGood registry read, with its route and incarnation check. Canonical storage declaration and observed lifetime gates remain.;rev3=census-ruling-stateless-replicas-4-task1;basis=R1: no longer calls ReplicaDeployID before preparation; hands the same a.ReplicaDeployID selector to prepareStatelessRelease, which calls it only after coordinator term acquisition. The ObservedReplicaRelease call stays as a validity check. Same read sites; no new read, write or authority.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2 (D4): for a set row, prepares the record baseline with no release, and refuses a build the row Version does not name before any release; reads the route it is handed (FleetBoxes, Version). No store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix1;basis=Task 2 fix round 1: for a set row, a build its pointer does not name starts only as the record baseline or the committed permitted target, the latter adopted through prepareStatelessRelease durable path (never a new attempt); a named build, a rollback included, takes the release path. The added reads are the handed route (FleetBoxes, Version) and a copy of it with Stateless set for the adoption, as the release path already builds. No store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: for a set row the no-release start is decided per box from the record (this box baseline, or its permitted target adopted through the durable path), whatever the pointer says; only a build that is neither and that the pointer names begins a new attempt. Same reads (the handed route and its copy); no store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix3;basis=Task 2 fix round 3: this box baseline is checked before the adopt path, so a completed box restarts on the target while a retry is requested; for the passed target it calls the existing escrow initializer (prepareStatelessEscrow) that the adopt path ran, with the same route and identity. No new reader; no record write.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F (#511 F11): a hold's pinned wake carrying the swap's preparation, when the row it re-read differs from the prepared row, moves the preparation onto the wake's row only if the prepared row passes statelessCurrent against the registry, the two rows have the same Incarnation, ServingSeq, HoldOp and Version (sameRowLifetime, fix round 1), and the wake's row then passes statelessCurrent; otherwise it refuses with errStatelessRowChanged. The added sites are whole-Route comparisons and copies of the handed and prepared routes. No store read or write added; no new authority. registry:Account@284,registry:Account@310,registry:App@324,registry:App@346,registry:Digest@4780,registry:FleetBoxes@1967,registry:FleetBoxes@4423,registry:Host@250,registry:Host@273,registry:Stateless@3505,registry:Stateless@4030,registry:Stateless@5078,registry:Version@4315,registry:Version@4460,registry:Version@4750,whole:Route@1341,whole:Route@1348,whole:Route@1429,whole:Route@1437,whole:Route@1503,whole:Route@1623,whole:Route@1737,whole:Route@1844,whole:Route@259,whole:Route@2878,whole:Route@2885,whole:Route@293,whole:Route@333,whole:Route@3497,whole:Route@3584,whole:Route@4024,whole:Route@4110,whole:Route@4700,whole:Route@4844,whole:Route@4851,whole:Route@5074,whole:Route@5228,whole:Route@5332,whole:Route@5339,whole:Route@540,whole:Route@597,whole:Route@646,whole:Route@661 5feaf2e3e8d7f3c6a2cd2b86aa837bd926d26913dc4a79ae473c5af7a8e50c6b
-@legacy 8b1e0908a8aae142731d82e96ac9a393959a416ffeea0855ffabea6f2ea65bcc internal/activator/statelessrelease.go Service.prepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task1;basis=The former PrepareStatelessRelease body. R9: adopts the record's attempt for this lifetime and target in every phase before any coordination; otherwise acquires the term first and only then selects the ID (R1); a begin carries RetryOf only when consuming a durable retry. Same calls (ObserveReplicaRelease, coordinator, escrow initializer, actEntry, runReleaseAdmitted); same gates, proof and SafeUntil checks; no new store read or writer.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: refuses with provision.ErrReplicaSwitchOpen (SR-4-C31) before term acquisition when the observed record already has an unresolved copy-switch permit, instead of a begin the writer refuses and that read as an unknown result. Refusal only; same calls, no read added.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that the writer refuses with replicas.ReleaseRefused re-runs adoptDurable once on the record attempt that refusal carries (read by the adapter in the same call), with no read of its own; the exec's fresh record check stays the final gate. Other step failures map to errReplicaRecordRefused, errReplicaTermLost or errReplicaStepUnconfirmed (SR-4-C55 to C57), all ran-nothing refusals. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. registry:Account@634,registry:App@664,registry:GoodDemand@4144,registry:GoodDigest@4129,registry:GoodVersion@4113,registry:Host@1252,registry:Host@301,registry:Host@4200,registry:Host@4258,registry:Host@4474,registry:Host@4542,registry:Host@691,whole:Route@3366,whole:Route@3928,whole:Route@4267,whole:Route@4274,whole:Route@4826,whole:Route@569,whole:Route@860 9fbd26b058a2a23eba1d8dff8c3096cfb66add60dc9f798ea0ed2c15b52c8030
+@legacy 7b5b0dbba2a0c01a06bcf560f831100d14f795d80f46514c96b06e903cda8099 internal/activator/statelessrelease.go Service.prepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task1;basis=The former PrepareStatelessRelease body. R9: adopts the record's attempt for this lifetime and target in every phase before any coordination; otherwise acquires the term first and only then selects the ID (R1); a begin carries RetryOf only when consuming a durable retry. Same calls (ObserveReplicaRelease, coordinator, escrow initializer, actEntry, runReleaseAdmitted); same gates, proof and SafeUntil checks; no new store read or writer.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: refuses with provision.ErrReplicaSwitchOpen (SR-4-C31) before term acquisition when the observed record already has an unresolved copy-switch permit, instead of a begin the writer refuses and that read as an unknown result. Refusal only; same calls, no read added.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix rounds 1-2 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that does not go through goes to refusedStep: a writer refusal (replicas.ReleaseRefused, record read by the adapter in the same call) re-runs adoptDurable once with no read of its own; anything else maps through stepError. A failed releasing write before the exec maps through stepError too. ErrReplicaReleaseUnknown stays only where a release command's result is unknown (an open release record, a successful close of this attempt, and the post-exec paths). The exec's fresh record check stays the final gate. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. registry:Account@634,registry:App@664,registry:GoodDemand@4280,registry:GoodDigest@4265,registry:GoodVersion@4249,registry:Host@1252,registry:Host@301,registry:Host@4336,registry:Host@4394,registry:Host@4610,registry:Host@4678,registry:Host@691,whole:Route@3452,whole:Route@4064,whole:Route@4403,whole:Route@4410,whole:Route@4962,whole:Route@569,whole:Route@860 42558a4357333562c9ff000a426ca241ccb57706419a7638a8705d3872b58f5a
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.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): its two route refusals return errStatelessRowChanged (SR-4-C58), a value that is ErrFenced to every errors.Is caller but names no fence. Same reads and comparisons; refusal text only. 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@667,whole:Route@679,whole:Route@763 bb80cfe535efc3a5b30d4a81ab759242e46dc6fd7bc41de9638e8c01f74cc4dc
internal/activator/stateless.go sameRowLifetime legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new. Compares four fields (Incarnation, ServingSeq, HoldOp, Version) of two in-memory route rows it is handed; no read, write or authority. registry:HoldOp@153,registry:HoldOp@172,registry:Incarnation@67,registry:Incarnation@91,registry:ServingSeq@111,registry:ServingSeq@134,registry:Version@187,registry:Version@207 8cc7ffa914050e09404a4e4a13657db356014ff97cca8cc641dafdaa16a1d6cc
internal/activator/statelessrelease.go Service.adoptDurable legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new; the R9 adoption switch moved out of prepareStatelessRelease unchanged: DurableAttempt on the attempt it is handed, then the same escrow initializer call (prepareStatelessEscrow) for a passed release, or the failed or unknown sentinel. No new read, write or authority. whole:Route@459 4c32b8d100a319d2a099db1faa9f36b40fedf095583a6ff30ec5ad1345cc41c8
-internal/activator/statelessrelease.go Service.refusedStep legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): new. For a writer refusal (replicas.ReleaseRefused) it calls adoptDurable once on the record attempt the refusal carries; otherwise it maps the error to a ran-nothing sentinel. It reads only the handed route and error; no store read, write or authority. whole:Route@288 1b6b3ec116858d006ae3ffcc558eb456370f8e304a9a23edc8f7ed3985d0b910
+internal/activator/statelessrelease.go Service.refusedStep legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix rounds 1-2 (#511 F11): new. For a writer refusal (replicas.ReleaseRefused) it calls adoptDurable once on the record attempt the refusal carries; otherwise, or when nothing adopts, it returns stepError's ran-nothing sentinel (an unreachable console keeps its own error). It reads only the handed route and error; no store read, write or authority. whole:Route@277 78b6a7ec4509bcccbd6640f4cf657994749b19e01f0116e0d8398668ecc610de
internal/activator/stateless.go Service.prepareStateless legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Capture RecordFacts from the existing record source, obtain the durable FailureBook deploy ID, and call Task 2 PrepareStatelessRelease with the canonical verdict/digest carrier. Carry a successful attempt through its hold only after another current-record check; no serving lease or polling loop. Fix 3a round 1 I2: preparation uses reconcile observations and records the successful deploy ID. Carry prepared evidence through hold; fresh backend read must confirm that same released deploy before web runs.;rev3=census-ruling-stateless-failed-release-held;basis=For recovery onto a different installed version's exact committed good version and artifact digest, retain recovery evidence without selecting or writing another deploy. Adds the existing committedGood registry read, with its route and incarnation check. Canonical storage declaration and observed lifetime gates remain.;rev3=census-ruling-stateless-replicas-4-task1;basis=R1: no longer calls ReplicaDeployID before preparation; hands the same a.ReplicaDeployID selector to prepareStatelessRelease, which calls it only after coordinator term acquisition. The ObservedReplicaRelease call stays as a validity check. Same read sites; no new read, write or authority.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2 (D4): for a set row, prepares the record baseline with no release, and refuses a build the row Version does not name before any release; reads the route it is handed (FleetBoxes, Version). No store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix1;basis=Task 2 fix round 1: for a set row, a build its pointer does not name starts only as the record baseline or the committed permitted target, the latter adopted through prepareStatelessRelease durable path (never a new attempt); a named build, a rollback included, takes the release path. The added reads are the handed route (FleetBoxes, Version) and a copy of it with Stateless set for the adoption, as the release path already builds. No store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: for a set row the no-release start is decided per box from the record (this box baseline, or its permitted target adopted through the durable path), whatever the pointer says; only a build that is neither and that the pointer names begins a new attempt. Same reads (the handed route and its copy); no store read or write added.;rev3=census-ruling-stateless-replicas-4-task2-fix3;basis=Task 2 fix round 3: this box baseline is checked before the adopt path, so a completed box restarts on the target while a retry is requested; for the passed target it calls the existing escrow initializer (prepareStatelessEscrow) that the adopt path ran, with the same route and identity. No new reader; no record write.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F (#511 F11): a hold's pinned wake carrying the swap's preparation, when the row it re-read differs from the prepared row, moves the preparation onto the wake's row only if the prepared row passes statelessCurrent against the registry, the two rows have the same Incarnation, ServingSeq, HoldOp and Version (sameRowLifetime, fix round 1), and the wake's row then passes statelessCurrent; otherwise it refuses with errStatelessRowChanged. The added sites are whole-Route comparisons and copies of the handed and prepared routes. No store read or write added; no new authority. registry:Account@284,registry:Account@310,registry:App@324,registry:App@346,registry:Digest@4780,registry:FleetBoxes@1967,registry:FleetBoxes@4423,registry:Host@250,registry:Host@273,registry:Stateless@3505,registry:Stateless@4030,registry:Stateless@5078,registry:Version@4315,registry:Version@4460,registry:Version@4750,whole:Route@1341,whole:Route@1348,whole:Route@1429,whole:Route@1437,whole:Route@1503,whole:Route@1623,whole:Route@1737,whole:Route@1844,whole:Route@259,whole:Route@2878,whole:Route@2885,whole:Route@293,whole:Route@333,whole:Route@3497,whole:Route@3584,whole:Route@4024,whole:Route@4110,whole:Route@4700,whole:Route@4844,whole:Route@4851,whole:Route@5074,whole:Route@5228,whole:Route@5332,whole:Route@5339,whole:Route@540,whole:Route@597,whole:Route@646,whole:Route@661 5feaf2e3e8d7f3c6a2cd2b86aa837bd926d26913dc4a79ae473c5af7a8e50c6b
-internal/activator/statelessrelease.go Service.prepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task1;basis=The former PrepareStatelessRelease body. R9: adopts the record's attempt for this lifetime and target in every phase before any coordination; otherwise acquires the term first and only then selects the ID (R1); a begin carries RetryOf only when consuming a durable retry. Same calls (ObserveReplicaRelease, coordinator, escrow initializer, actEntry, runReleaseAdmitted); same gates, proof and SafeUntil checks; no new store read or writer.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: refuses with provision.ErrReplicaSwitchOpen (SR-4-C31) before term acquisition when the observed record already has an unresolved copy-switch permit, instead of a begin the writer refuses and that read as an unknown result. Refusal only; same calls, no read added.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 1 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that the writer refuses with replicas.ReleaseRefused re-runs adoptDurable once on the record attempt that refusal carries (read by the adapter in the same call), with no read of its own; the exec's fresh record check stays the final gate. Other step failures map to errReplicaRecordRefused, errReplicaTermLost or errReplicaStepUnconfirmed (SR-4-C55 to C57), all ran-nothing refusals. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. registry:Account@634,registry:App@664,registry:GoodDemand@4144,registry:GoodDigest@4129,registry:GoodVersion@4113,registry:Host@1252,registry:Host@301,registry:Host@4200,registry:Host@4258,registry:Host@4474,registry:Host@4542,registry:Host@691,whole:Route@3366,whole:Route@3928,whole:Route@4267,whole:Route@4274,whole:Route@4826,whole:Route@569,whole:Route@860 9fbd26b058a2a23eba1d8dff8c3096cfb66add60dc9f798ea0ed2c15b52c8030
-@coverage internal/activator 5e8c75a2b44911b8079427d6dd733c23d01b6b8c6aa9e90764a031922101906d
+internal/activator/statelessrelease.go Service.prepareStatelessRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-task1;basis=The former PrepareStatelessRelease body. R9: adopts the record's attempt for this lifetime and target in every phase before any coordination; otherwise acquires the term first and only then selects the ID (R1); a begin carries RetryOf only when consuming a durable retry. Same calls (ObserveReplicaRelease, coordinator, escrow initializer, actEntry, runReleaseAdmitted); same gates, proof and SafeUntil checks; no new store read or writer.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: refuses with provision.ErrReplicaSwitchOpen (SR-4-C31) before term acquisition when the observed record already has an unresolved copy-switch permit, instead of a begin the writer refuses and that read as an unknown result. Refusal only; same calls, no read added.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix rounds 1-2 (#511 F11): R9 adoption moves into adoptDurable (same phases, same escrow initializer call). A begin, or the unknown close of an observed releasing attempt, that does not go through goes to refusedStep: a writer refusal (replicas.ReleaseRefused, record read by the adapter in the same call) re-runs adoptDurable once with no read of its own; anything else maps through stepError. A failed releasing write before the exec maps through stepError too. ErrReplicaReleaseUnknown stays only where a release command's result is unknown (an open release record, a successful close of this attempt, and the post-exec paths). The exec's fresh record check stays the final gate. The added sites pass the handed route to adoptDurable and refusedStep. No new store read or write. registry:Account@634,registry:App@664,registry:GoodDemand@4280,registry:GoodDigest@4265,registry:GoodVersion@4249,registry:Host@1252,registry:Host@301,registry:Host@4336,registry:Host@4394,registry:Host@4610,registry:Host@4678,registry:Host@691,whole:Route@3452,whole:Route@4064,whole:Route@4403,whole:Route@4410,whole:Route@4962,whole:Route@569,whole:Route@860 42558a4357333562c9ff000a426ca241ccb57706419a7638a8705d3872b58f5a
+@coverage internal/activator 62059fba28f1ee506df8f0b49f34eb4b5b4930b408935af53f8b7fa94c364ab7
@coverage internal/host 235567aa39cdd23237c87b083d47b02c77c7499a58c7faec25116a1e12bf57e0
@coverage internal/replicas 28b9161fa88128b941039eae68ef9948856435e4d29a2cda3af2f1d50ae907c9