carlos / platform Public

hub: a copy that never passed reads starting, not failed (#1061)

Task 2 of the #1061 plan. While a copy has never risen, two missed
probes set State "starting" (reason SR-3-C05) instead of "failed",
until replicaStartingCap (15 min) from when the prober began tracking
the job (replicaJob.started, the prober's clock). A risen copy still
reads failed after two failures. Display only: Select and Live read
Healthy, not State.

Console view passes starting through and counts it with unknown copies
(instance word, overview tile and verdict), never as failed. The CLI
copies table prints Starting (SR-6-C02, pending) with Unknown health.
Older clients already map an unknown state word to unknown.

The copy deck's id check now admits SR-5 and SR-6 rows; SR-6-C01 from
Task 1 had broken TestStatelessReplicaCopyIsApplied and friends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d84c1ac385803b23c002dfa469ed9b62004aba30 parent 9f1d6a9
8 files changed, +176 −15
  • approved_stateless_replicas_copy_test.go +1 −1
  • docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md +1 −0
  • instances_copies.go +13 −7
  • instances_copies_test.go +18 −0
  • internal/console/replicaview.go +9 −5
  • internal/console/replicaview_test.go +37 −0
  • internal/edge/replicaprober.go +17 −2
  • internal/edge/replicaprober_test.go +80 −0

Intent

Human

<task-notification> <task-id>a9fd60e14bb47d1b0</task-id> <tool-use-id>toolu_01AK2BBUYhpmGkvPvxm5GUsc</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/a9fd60e14bb47d1b0.output</output-file> <status>completed</status> <summary>Agent "Implement #1061 Task 1" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS Commits: - `882a3f34 activator: a join waits for its build install; not a crash (#1061)` - `a9455fe6 activator: one install deadline; outages are not installs (#1061 r1)` - `9f1d6a98 activator: one keyed install wait, set and cleared in one place (#1061 r2)` Tests: Astra's sequence (install refusal, registry error at 40 s, step at 45 s) fails on a9455fe6 with switched-failed, and passes now. All seven W1 subtests pass: installed, never installed, the outage between steps, install/moving/install, a new permit, the crash path, and an outage alone. The new rules test and the rollout tests pass. In the one full run, rollout passed and activator failed only on `TestHeldE2EStopAdmitRace`, which passes alone and touches nothing I changed. The install wait is now tied to the row lifetime, deploy, target and permit, and one method sets and clears it. The round-1 moving-refusal change is reverted, which removes P3. Concerns: 1. `TestHeldE2EStopAdmitRace` failed once under load in the full run. I believe it's unrelated, but CI should confirm. 2. If a join waited for its install and the installed build then fails at start, the wait isn't cleared (your literal rule). The join halts at 10 minutes with the install reason instead of at 32 s as a build failure. It still halts rather than switching. 3. Refusals before the permit arrives are keyed to the old permit. The first step after it falls back to the 32 s rule until the next tick's refusal re-keys the wait, about 2 s later. Report (round 2 appended): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/sr-followups/.superpowers/sdd/plan-1061/task-1-report.md</result> <usage><subagent_tokens>211966</subagent_tokens><tool_uses>24</tool_uses><duration_ms>675086</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bvabtjluh</task-id> <tool-use-id>toolu_01BJGPPZpyY2S2Cy38HnC3qw</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/bvabtjluh.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.paseo/zerosub/homes/claude-37fe90ef3f56/plugins/cache/claude-plugins-official/superpowers/7.0.2/skills/subagent-driven-development; bash $S/scripts/review-package $PWD/.superpowers/sdd/2026-11-14-sr-followups/plan-1061.md a9455fe6 HEAD &amp;&amp; P=.superpowers/sdd/plan-1061 &amp;&amp; cat &gt; $P/task-1-astra-rereview-2.md &lt;&lt;'EOF' Scoped re-review (final round), read-only (do not modify files, index or branches). Go change in the CARLOS platform. History: .superpowers/sdd/plan ... [1683 characters truncated] ... ations: minors, listed separately. Be concise. EOF timeout 1800 codex exec -m gpt-6-astra -c model_reasoning_effort=high -s read-only "Read .superpowers/sdd/plan-1061/task-1-astra-rereview-2.md and do what it says." &lt;/dev/null &gt; $P/task-1-astra-rereview-2.txt 2&gt;&amp;1; echo done" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a23081d0a5d4bd0a5</task-id> <tool-use-id>toolu_014P7R9cmSAyqjcTWzPokrJK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/a23081d0a5d4bd0a5.output</output-file> <status>completed</status> <summary>Agent "Implement #1061 Task 2" is waiting on its own background work</summary> <note>This agent stopped with background work of its own still running. It may resume on its own when that work completes or reports, and the same task-id notifies again if it does; the result below may be interim.</note> <result>The full run is still going; I'll wait for its completion notice before committing.</result> <usage><subagent_tokens>105615</subagent_tokens><tool_uses>37</tool_uses><duration_ms>958783</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>a23081d0a5d4bd0a5</task-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/a23081d0a5d4bd0a5.output</output-file> <status>completed</status> <summary>Agent "Implement #1061 Task 2" is waiting on its own background work</summary> <note>This agent stopped with background work of its own still running. It may resume on its own when that work completes or reports, and the same task-id notifies again if it does; the result below may be interim.</note> <result>The console package run is still going. I'll commit and write the report once it finishes.</result> <usage><subagent_tokens>114141</subagent_tokens><tool_uses>45</tool_uses><duration_ms>1612627</duration_ms></usage> </task-notification>

Attributed to this commit: 12.4 g CO₂e (1,496,732 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on sr-followups, 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/approved_stateless_replicas_copy_test.go b/approved_stateless_replicas_copy_test.go
index d62dfd28a..d6ff84d5c 100644
--- a/approved_stateless_replicas_copy_test.go
+++ b/approved_stateless_replicas_copy_test.go
@@ -41,7 +41,7 @@ func statelessReplicaCopyRows(t *testing.T) []copyRow {
// The deck contains a continued table after a blank line (SR-2-C17).
normalized := strings.Join(lines, "\n")
normalized = strings.ReplaceAll(normalized, "\n\n| SR-", "\n| SR-")
- rows, err := parseCopyTableStatuses(normalized, statelessReplicaCopyDeck, regexp.MustCompile(`^SR-[1-4]-C[0-9]{2}$`), "an SR-<plan>-C<nn>", "pending", "approved")
+ rows, err := parseCopyTableStatuses(normalized, statelessReplicaCopyDeck, regexp.MustCompile(`^SR-[1-6]-C[0-9]{2}$`), "an SR-<plan>-C<nn>", "pending", "approved")
if err != nil {
t.Fatal(err)
}
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 5e392f02d..2f6a90870 100644
--- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
+++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
@@ -169,3 +169,4 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text.
| SR-4-C95 | internal/console/appcopies.go | <host> is not tied to one box of fleet <fleet>, and that fleet has more than one box. a release without a local database needs that first, so keep this app on a release with a local database for now | pending (superseded 2026-11-14 by fleet record labels C41, which points at carlos instances label; this text was approved by Paul as SR-5-C01 in copy review u4k4cyxedlsfh72a7vpq3sn2uu; the new text goes to Paul's copy review in docs/drafts/fleet-record-labels/copy-review) |
| SR-4-C96 | internal/console/appcopies.go | <host> runs a release without a local database and is not tied to a box of fleet <fleet>, so a second active box would stop it. move it to a release with a local database before adding a box | pending (superseded 2026-11-14 by fleet record labels C40, which points at carlos instances label; this text was approved by Paul as SR-5-C02 in copy review u4k4cyxedlsfh72a7vpq3sn2uu; the new text goes to Paul's copy review in docs/drafts/fleet-record-labels/copy-review) |
| SR-6-C01 | internal/activator/replicadeploy.go | the new copy's build was not installed on its box in time, so it did not start. existing copies keep serving | pending (Paul review, #1061) |
+| SR-6-C02 | instances_copies.go | Starting | pending (Paul review, #1061) |
diff --git a/instances_copies.go b/instances_copies.go
index 57744c9f0..3c770c0ab 100644
--- a/instances_copies.go
+++ b/instances_copies.go
@@ -24,6 +24,7 @@ const (
copyFailed = "failed" // copy SR-4-C09
copyUnknown = "unknown" // copy SR-4-C10
copyMissing = "missing" // copy SR-4-C11
+ copyStarting = "starting" // copy SR-6-C02
copyHealthy = "Healthy" // copy SR-4-C49
copyUnhealthy = "Unhealthy" // copy SR-4-C50
copyCellMaxBytes = 128
@@ -71,20 +72,23 @@ func copyState(c replicas.Copy) string {
if c.Healthy {
return copyRunning
}
- case copyDown, copyFailed, copyMissing:
+ case copyDown, copyFailed, copyMissing, copyStarting:
return c.State
}
return copyUnknown
}
// Words shown in the State column. The console's wire states stay lower
-// case above; these are the approved labels (SR-4-C06 to SR-4-C11).
+// case above; these are the approved labels (SR-4-C06 to SR-4-C11), and
+// Starting (SR-6-C02, #1061) for a copy that has not yet passed its health
+// check. Its health cell is the one an Unknown copy shows.
const (
- copyLabelRunning = "Running" // copy SR-4-C07
- copyLabelDown = "Down" // copy SR-4-C08
- copyLabelFailed = "Failed" // copy SR-4-C09
- copyLabelUnknown = "Unknown" // copy SR-4-C10
- copyLabelMissing = "Missing" // copy SR-4-C11
+ copyLabelRunning = "Running" // copy SR-4-C07
+ copyLabelDown = "Down" // copy SR-4-C08
+ copyLabelFailed = "Failed" // copy SR-4-C09
+ copyLabelUnknown = "Unknown" // copy SR-4-C10
+ copyLabelMissing = "Missing" // copy SR-4-C11
+ copyLabelStarting = "Starting" // copy SR-6-C02
)
// copyStateLabel is the printed label for a state word.
@@ -98,6 +102,8 @@ func copyStateLabel(state string) string {
return copyLabelFailed
case copyMissing:
return copyLabelMissing
+ case copyStarting:
+ return copyLabelStarting
}
return copyLabelUnknown
}
diff --git a/instances_copies_test.go b/instances_copies_test.go
index 915bbff34..fd1de02a9 100644
--- a/instances_copies_test.go
+++ b/instances_copies_test.go
@@ -55,6 +55,24 @@ func TestReplicaCopyListRowsPerBox(t *testing.T) {
}
}
+// A copy the hub reads starting (never passed its health check; #1061)
+// prints Starting, with the health an Unknown copy shows.
+func TestReplicaCopyListStarting(t *testing.T) {
+ recs := []apiInstanceRecord{{Host: "shop.example.com", DesiredCopies: 2, Copies: []replicas.Copy{
+ {Box: "b1", Version: "v2", State: "running", Healthy: true, WorkersRunning: 1, WorkersDeclared: 1},
+ {Box: "b2", Version: "v2", State: "starting", Healthy: true, WorkersRunning: 0, WorkersDeclared: 1},
+ }}}
+ var buf bytes.Buffer
+ printInstancesList(&buf, recs)
+ lines := strings.Split(strings.TrimRight(copiesTable(t, buf.String()), "\n"), "\n")
+ if len(lines) != 3 {
+ t.Fatalf("copies table, want a heading and two rows:\n%s", buf.String())
+ }
+ if got := strings.Join(strings.Fields(lines[2]), " "); got != "shop.example.com b2 v2 Starting Unknown -" {
+ t.Fatalf("starting row = %q", got)
+ }
+}
+
// A hub word this client does not know, or bytes unfit for a terminal, are
// never printed as they came.
func TestReplicaCopyListCleansCells(t *testing.T) {
diff --git a/internal/console/replicaview.go b/internal/console/replicaview.go
index f03e262a6..96da53a79 100644
--- a/internal/console/replicaview.go
+++ b/internal/console/replicaview.go
@@ -34,6 +34,9 @@ const (
copyStateFailed = "failed" // copy SR-4-C09
copyStateUnknown = "unknown" // copy SR-4-C10
copyStateMissing = "missing" // copy SR-4-C11
+ // A copy that has never passed its health check, inside the hub's cap
+ // (#1061). Older consoles read it unknown.
+ copyStateStarting = "starting" // copy SR-6-C02
)
// restartCopiesRefusal refuses `carlos restart` for an app with more than
@@ -201,7 +204,7 @@ func replicaView(rec provision.Record, live replicas.Snapshot, ok bool) replicas
}
c.Socket, c.BootID = "", ""
switch c.State {
- case copyStateRunning, copyStateDown, copyStateFailed:
+ case copyStateRunning, copyStateDown, copyStateFailed, copyStateStarting:
default:
c.State = copyStateUnknown
}
@@ -233,11 +236,12 @@ func copiesRunning(v replicas.Snapshot) int {
}
// copiesUnknown is how many of a view's assigned copies have no live
-// reading.
+// reading. A starting copy has no verdict yet either, so it counts here,
+// never as down or failed (#1061).
func copiesUnknown(v replicas.Snapshot) int {
n := 0
for _, c := range v.Copies {
- if c.State == copyStateUnknown {
+ if c.State == copyStateUnknown || c.State == copyStateStarting {
n++
}
}
@@ -247,8 +251,8 @@ func copiesUnknown(v replicas.Snapshot) int {
// replicaHealthWord is the instance-level health word of a replicated
// record, from its live view only: Running while any copy is healthy, Not
// responding when the hub reads every assigned copy down or failed, and
-// otherwise that it cannot tell. A box report saying the instance is awake
-// never makes it Running.
+// otherwise that it cannot tell. A starting copy reads as an unknown one.
+// A box report saying the instance is awake never makes it Running.
func replicaHealthWord(v replicas.Snapshot) string {
if copiesRunning(v) > 0 {
return "Running"
diff --git a/internal/console/replicaview_test.go b/internal/console/replicaview_test.go
index c822d63f9..7d135b084 100644
--- a/internal/console/replicaview_test.go
+++ b/internal/console/replicaview_test.go
@@ -224,6 +224,43 @@ func TestReplicaVisibilityPrefersLiveHealth(t *testing.T) {
}
}
+// A copy the hub reads starting (never passed, inside its cap; #1061) is
+// listed as starting and counts as an unknown copy, never a failed one: an
+// instance whose other copy failed reads that it cannot tell, not Not
+// responding, and the overview says the copy's status is unknown.
+func TestReplicaVisibilityStartingIsNotFailed(t *testing.T) {
+ fx, _, _, rec := replicaViewFx(t, "code-rv-starting", 2)
+ browser := signInPaul(t, fx.consoleFixture)
+
+ hubSays(fx, rec, nil,
+ hubCopy(rec, "b1", "running", true, "v2", 2, 2),
+ hubCopy(rec, "b2", "starting", true, "v2", 0, 2))
+ got := onlyShopHost(t, mustList(t, fx))
+ if c := got.Copies[1]; c.Box != "b2" || c.State != "starting" || c.Healthy {
+ t.Fatalf("b2 %+v, want starting and not healthy", c)
+ }
+ if got.Health != "Running" {
+ t.Fatalf("health %q, want Running while one copy is", got.Health)
+ }
+ if tile := copiesLine(t, fx, browser); !strings.Contains(tile, "1 of 2 copies have unknown status; 1 are known to be running") {
+ t.Fatalf("overview tile with one copy starting:\n%s", tile)
+ }
+
+ hubSays(fx, rec, nil,
+ hubCopy(rec, "b1", "failed", false, "v2", 0, 2),
+ hubCopy(rec, "b2", "starting", false, "v2", 0, 2))
+ got = onlyShopHost(t, mustList(t, fx))
+ if c := got.Copies[1]; c.State != "starting" {
+ t.Fatalf("b2 %+v, want starting", c)
+ }
+ if got.Health != healthUnknown {
+ t.Fatalf("health %q with one copy failed and one starting, want %q", got.Health, healthUnknown)
+ }
+ if tile := copiesLine(t, fx, browser); !strings.Contains(tile, "1 of 2 copies have unknown status; 0 are known to be running") {
+ t.Fatalf("overview tile with one copy failed and one starting:\n%s", tile)
+ }
+}
+
// mustList lists shop with no query.
func mustList(t *testing.T, fx *interactiveFx) []listedInstance {
t.Helper()
diff --git a/internal/edge/replicaprober.go b/internal/edge/replicaprober.go
index efa737220..c61b3bdf5 100644
--- a/internal/edge/replicaprober.go
+++ b/internal/edge/replicaprober.go
@@ -19,6 +19,10 @@ const (
replicaProbeInterval = time.Second
replicaProbeFail = 2
replicaProbeRise = 2
+ // replicaStartingCap bounds how long a copy that has never passed its
+ // health check reads starting rather than failed, from when its job
+ // began (#1061): an install and app boot fit well inside it.
+ replicaStartingCap = 15 * time.Minute
// copy SR-3-C03
replicaFailed = "this copy did not pass its health check"
// copy SR-3-C04
@@ -75,6 +79,10 @@ type replicaJob struct {
// (count.up). It survives ejection and reconnection, and goes with
// the job when Sync replaces it (Risen, R23).
risen bool
+ // started is when the prober began tracking this job, on its clock.
+ // A copy that has not risen by started+replicaStartingCap reads
+ // failed, not starting. Like risen, it survives reconnection.
+ started time.Time
}
type replicaProber struct {
mu sync.Mutex
@@ -146,7 +154,7 @@ func (p *replicaProber) Sync(routes []registry.Route) {
}
fleet, _ := registry.FleetPlacement(rt.Region)
ctx, cancel := context.WithCancel(context.Background())
- j := &replicaJob{key: replicaJobKey{rt.Host, rt.ReplicaIncarnation, slot.box}, route: rt, channel: fleet + "/" + slot.box, ctx: ctx, cancel: cancel, done: make(chan struct{})}
+ j := &replicaJob{key: replicaJobKey{rt.Host, rt.ReplicaIncarnation, slot.box}, route: rt, channel: fleet + "/" + slot.box, ctx: ctx, cancel: cancel, done: make(chan struct{}), started: p.clock.Now()}
p.reset(j, nil, replicaWaiting)
p.jobs[slot] = j
p.wg.Add(1)
@@ -282,7 +290,14 @@ func (p *replicaProber) record(j *replicaJob, conn *tunnelConn, c replicas.Copy,
current.sample.State = "unknown"
current.sample.Reason = replicaWaiting
if current.count.fails >= replicaProbeFail {
- current.sample.State, current.sample.Reason = "failed", replicaFailed
+ // A copy that has never passed is starting (an install or an
+ // app boot), until the cap says it is not coming up (#1061).
+ // Display only: Select and Live read Healthy, not State.
+ if current.risen || p.clock.Now().Sub(current.started) >= replicaStartingCap {
+ current.sample.State, current.sample.Reason = "failed", replicaFailed
+ } else {
+ current.sample.State = "starting"
+ }
}
}
}
diff --git a/internal/edge/replicaprober_test.go b/internal/edge/replicaprober_test.go
index 3a384263e..28eed57e6 100644
--- a/internal/edge/replicaprober_test.go
+++ b/internal/edge/replicaprober_test.go
@@ -1012,3 +1012,83 @@ func TestReplicaProbeRevisionChangeKeepsServing(t *testing.T) {
t.Fatalf("both copies must keep serving: %d, %d", hits[0].Load(), hits[1].Load())
}
}
+
+// A copy that has never passed its health check is starting, not failed
+// (#1061): a join reads starting through its install and app boot. Once it
+// has risen, two failures read failed as before, and a copy that has not
+// risen within replicaStartingCap of its job's start reads failed too.
+func TestReplicaProbeNeverRisenReadsStarting(t *testing.T) {
+ probe := func(rt registry.Route, healthy *atomic.Bool) replicaProbeFunc {
+ return func(context.Context, string, string) (replicas.Copy, error) {
+ if !healthy.Load() {
+ return replicas.Copy{}, fmt.Errorf("%s", replicaFailed)
+ }
+ return replicaTestCopy(rt, "box-00"), nil
+ }
+ }
+ state := func(p *replicaProber, rt registry.Route) (string, string) {
+ c := p.Snapshot(rt.Host).Copies[0]
+ return c.State, c.Reason
+ }
+ t.Run("never risen", func(t *testing.T) {
+ clock := newReplicaTestClock()
+ hub, rt := replicaHubFixture(t, 1)
+ var healthy atomic.Bool
+ p := newReplicaProber(hub, probe(rt, &healthy), clock)
+ t.Cleanup(p.Stop)
+ p.Sync([]registry.Route{rt})
+ replicaSettled(t, clock, 1)
+ for n := 2; n <= 5; n++ {
+ clock.advance(time.Second)
+ replicaSettled(t, clock, n)
+ }
+ if s, r := state(p, rt); s != "starting" || r != replicaWaiting {
+ t.Fatalf("never-risen copy after 5 failures = %q %q, want starting %q", s, r, replicaWaiting)
+ }
+ if len(p.Live(rt.Host)) != 0 {
+ t.Fatal("a starting copy is live")
+ }
+ })
+ t.Run("risen then failing", func(t *testing.T) {
+ clock := newReplicaTestClock()
+ hub, rt := replicaHubFixture(t, 1)
+ var healthy atomic.Bool
+ healthy.Store(true)
+ p := newReplicaProber(hub, probe(rt, &healthy), clock)
+ t.Cleanup(p.Stop)
+ p.Sync([]registry.Route{rt})
+ replicaSettled(t, clock, 1)
+ clock.advance(time.Second)
+ replicaSettled(t, clock, 2)
+ if s, _ := state(p, rt); s != "running" {
+ t.Fatalf("after two passes = %q, want running", s)
+ }
+ healthy.Store(false)
+ clock.advance(time.Second)
+ replicaSettled(t, clock, 3)
+ clock.advance(time.Second)
+ replicaSettled(t, clock, 4)
+ if s, r := state(p, rt); s != "failed" || r != replicaFailed {
+ t.Fatalf("risen copy after 2 failures = %q %q, want failed %q", s, r, replicaFailed)
+ }
+ })
+ t.Run("past the cap", func(t *testing.T) {
+ clock := newReplicaTestClock()
+ hub, rt := replicaHubFixture(t, 1)
+ var healthy atomic.Bool
+ p := newReplicaProber(hub, probe(rt, &healthy), clock)
+ t.Cleanup(p.Stop)
+ p.Sync([]registry.Route{rt})
+ replicaSettled(t, clock, 1)
+ clock.advance(replicaStartingCap - time.Second)
+ replicaSettled(t, clock, 2)
+ if s, _ := state(p, rt); s != "starting" {
+ t.Fatalf("inside the cap = %q, want starting", s)
+ }
+ clock.advance(time.Second)
+ replicaSettled(t, clock, 3)
+ if s, r := state(p, rt); s != "failed" || r != replicaFailed {
+ t.Fatalf("never risen at the cap = %q %q, want failed %q", s, r, replicaFailed)
+ }
+ })
+}