carlos / platform Public

instances list: a held build's REASON says why it failed (zdd.state.held-because)

rolloutReason printed "held: build %s failed on this box" and dropped the
reason word the box and the console already send (apiRollout.Reason). It
now prints zdd.state.held-because, approved by Paul 2026-10-30:

    held: build %s failed on this box, because %s

filled with rolloutwords.Reason's phrase (RFS-3-C01/C02 for a release
command, the zdd reasons otherwise, "it failed (<word>)" for one this
binary does not know). With no reason word the cell is StateHeld as before.
The word sits in internal/rolloutwords beside StateHeld and in the zdd
plan 6 copy record (an entry dated 2026-10-30) and its gate's inventory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev b505b547ae16655fbf7c1b36b80cd2c34b8f8876 parent 8ea8e81
6 files changed, +18 −4
  • approved_copy_zdd_test.go +3 −2
  • docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json +1 −0
  • instances_cli.go +4 −1
  • instances_rollout_test.go +5 −0
  • internal/rolloutwords/words.go +3 −0
  • internal/rolloutwords/words_test.go +2 −1
diff --git a/approved_copy_zdd_test.go b/approved_copy_zdd_test.go
index e0900c5cb..9ae142287 100644
--- a/approved_copy_zdd_test.go
+++ b/approved_copy_zdd_test.go
@@ -6,7 +6,8 @@ import (
)
// zddCopyIDs is the zero-downtime plan 6 copy inventory, pinned as a literal:
-// the 149 strings Paul approved on 2026-10-11. The record must name every one,
+// the 149 strings Paul approved on 2026-10-11, and zdd.state.held-because,
+// approved on 2026-10-30 (its entry says so). The record must name every one,
// once, and nothing else. A record that loses an entry fails here even though
// every entry left in it is applied.
var zddCopyIDs = []string{
@@ -32,7 +33,7 @@ var zddCopyIDs = []string{
"zdd.ship.bad-swap", "zdd.ship.hold-note", "zdd.ship.no-echo", "zdd.deploy.usage-flag",
"zdd.deploy.held-until", "zdd.instances-retry.usage-line", "zdd.instances-retry.usage-para",
"zdd.instances-retry.done", "zdd.instances-retry.old-console", "zdd.list.header",
- "zdd.list.retry-hint", "zdd.state.held", "zdd.state.rolling-out", "zdd.state.asleep",
+ "zdd.list.retry-hint", "zdd.state.held", "zdd.state.held-because", "zdd.state.rolling-out", "zdd.state.asleep",
"zdd.state.config-pending", "zdd.cause.release", "zdd.cause.install", "zdd.cause.retry",
"zdd.cause.restart", "zdd.cause.config", "zdd.reason.health", "zdd.reason.settle",
"zdd.reason.exit", "zdd.reason.staging", "zdd.reason.reused", "zdd.reason.unknown",
diff --git a/docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json b/docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json
index b7d256255..1b14fb26f 100644
--- a/docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json
+++ b/docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json
@@ -76,6 +76,7 @@
{"id": "zdd.list.header", "file": "instances_cli.go", "text": "HOST\\tREGION\\tCHANNEL\\tPOOL\\tINSTALLED\\tSERVING\\tHEALTH\\tUPSTREAMS\\tDB\\tEGRESS\\tCREATED\\tBY\\tREASON"},
{"id": "zdd.list.retry-hint", "file": "instances_cli.go", "text": "a build that failed is tried again on every box with carlos promote --app %s --retry <version> <channel>, or on one instance with carlos instances retry --app %s <host>"},
{"id": "zdd.state.held", "file": "internal/rolloutwords/words.go", "text": "held: build %s failed on this box"},
+ {"id": "zdd.state.held-because", "file": "internal/rolloutwords/words.go", "text": "held: build %s failed on this box, because %s", "approved_on": "2026-10-30"},
{"id": "zdd.state.rolling-out", "file": "internal/rolloutwords/words.go", "text": "rolling out"},
{"id": "zdd.state.asleep", "file": "internal/rolloutwords/words.go", "text": "starts %s on its next request"},
{"id": "zdd.state.config-pending", "file": "internal/rolloutwords/words.go", "text": "config delivered, not active"},
diff --git a/instances_cli.go b/instances_cli.go
index 3f5ea5d8b..b3dc1f117 100644
--- a/instances_cli.go
+++ b/instances_cli.go
@@ -588,7 +588,8 @@ func servingCell(r apiInstanceRecord) string {
}
// rolloutReason is the REASON cell (spec §9.1): why the serving build is not
-// the installed one, or that new config waits for a process (§8.1). A box that
+// the installed one, or that new config waits for a process (§8.1). A held
+// build says why it failed when the box reports a reason word. A box that
// cannot arm its scheduler says why first: its other fields are meaningless.
// An asleep instance serves nothing (plan 5 reports Serving "" for it), so its
// installed build is compared with Good, the build it last ran.
@@ -598,6 +599,8 @@ func rolloutReason(r *apiRollout) string {
return ""
case r.Unavailable != "":
return rolloutwords.Unavailable(r.Unavailable)
+ case r.HeldBy != "" && r.Reason != "":
+ return fmt.Sprintf(rolloutwords.StateHeldBecause, r.HeldBy, rolloutwords.Reason(r.Reason))
case r.HeldBy != "":
return fmt.Sprintf(rolloutwords.StateHeld, r.HeldBy)
case !r.Awake && r.Installed != r.Good:
diff --git a/instances_rollout_test.go b/instances_rollout_test.go
index d444f554a..5fabcb2c1 100644
--- a/instances_rollout_test.go
+++ b/instances_rollout_test.go
@@ -44,6 +44,11 @@ func TestRolloutReason(t *testing.T) {
// Plan 5 reports no serving build for an asleep instance: its last
// good build is what it ran.
{&apiRollout{Installed: "v2", Good: "v1", HeldBy: "v2"}, fmt.Sprintf(rolloutwords.StateHeld, "v2")},
+ // The box says why the build failed (rolloutwords.Reason, read after
+ // "because"); a word this binary does not know still reads.
+ {&apiRollout{Installed: "v2", Serving: "v1", Awake: true, HeldBy: "v2", Reason: "release"}, "held: build v2 failed on this box, because its release command failed"},
+ {&apiRollout{Installed: "v2", Good: "v1", HeldBy: "v2", Reason: "health"}, fmt.Sprintf(rolloutwords.StateHeldBecause, "v2", rolloutwords.Reason("health"))},
+ {&apiRollout{Installed: "v2", Serving: "v1", Awake: true, HeldBy: "v2", Reason: "newer-word"}, fmt.Sprintf(rolloutwords.StateHeldBecause, "v2", rolloutwords.Reason("newer-word"))},
{&apiRollout{Installed: "v2", Good: "v1"}, fmt.Sprintf(rolloutwords.StateAsleep, "v2")},
{&apiRollout{Installed: "v2", Good: "v2"}, ""},
{&apiRollout{Installed: "v2", Serving: "v1", Awake: true}, rolloutwords.StateRollingOut},
diff --git a/internal/rolloutwords/words.go b/internal/rolloutwords/words.go
index 9788109ec..cd95aceb4 100644
--- a/internal/rolloutwords/words.go
+++ b/internal/rolloutwords/words.go
@@ -114,8 +114,11 @@ const (
)
// States: the REASON column of `carlos instances list` (spec §9.1).
+// StateHeldBecause is StateHeld when the box says why, filled with
+// Reason's phrase (zdd.state.held-because, approved 2026-10-30).
const (
StateHeld = "held: build %s failed on this box"
+ StateHeldBecause = "held: build %s failed on this box, because %s"
StateRollingOut = "rolling out"
StateAsleep = "starts %s on its next request"
StateConfigPending = "config delivered, not active"
diff --git a/internal/rolloutwords/words_test.go b/internal/rolloutwords/words_test.go
index 62cbd9c1d..4cc2e150f 100644
--- a/internal/rolloutwords/words_test.go
+++ b/internal/rolloutwords/words_test.go
@@ -20,7 +20,7 @@ func allWords() map[string]string {
"EventReleaseStarted": EventReleaseStarted, "EventReleaseDone": EventReleaseDone,
"EventReleaseFailed": EventReleaseFailed, "EventReleaseSignal": EventReleaseSignal,
"EventReleaseTimedOut": EventReleaseTimedOut, "EventReleaseLeaseLost": EventReleaseLeaseLost,
- "EventWorkerExitedUnknown": EventWorkerExitedUnknown,
+ "EventWorkerExitedUnknown": EventWorkerExitedUnknown, "StateHeldBecause": StateHeldBecause,
}
for k, v := range causes {
out["cause "+k] = v
@@ -58,6 +58,7 @@ func TestVerbsAreWhereTheCallersPutThem(t *testing.T) {
"unavailableUnknown": 1, "EventRootfsRefused": 1, "RootfsRefusedUnarmed": 0,
"EventReleaseStarted": 1, "EventReleaseDone": 2, "EventReleaseFailed": 1, "EventReleaseSignal": 2,
"EventReleaseTimedOut": 2, "EventReleaseLeaseLost": 1, "EventWorkerExitedUnknown": 2,
+ "StateHeldBecause": 2,
} {
s := words[name]
d := digits[name]