instances: say not a release build on the label floor and fleet create
The label floor refusal keeps three cases apart: a build that is not a release says so (SR-6-C04) for a box or the console, while an unknown or parsed release keeps C29. D1's fleet create, on a console whose build is not a release, answers SR-6-C06 with the same 503 but no Retry-After, since retrying never helps. No floor changes. Tracked as stateless replicas deck rows, pending review, by controller ruling, not as fleet record labels C51/C52. Refs #1060
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md+2 −0instances_cli.go+8 −0instances_cli_label_test.go+8 −0internal/console/apiinstances_test.go+18 −0internal/console/fleetcreate.go+14 −1
Intent
<task-notification> <task-id>acd7d7bafd03b7613</task-id> <tool-use-id>toolu_01FNLWvUPcH4aGY8uxusTy41</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/acd7d7bafd03b7613.output</output-file> <status>completed</status> <summary>Agent "Implement #1060 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: NEEDS_CONTEXT, partly done. The helper, the startup warning (SR-6-C05) and the copies-floor message (SR-6-C03) are committed. I have not started the CLI label floor (C51) or fleet create (C52) parts. Commit: bc805026 "console: say when the build is not a release, at start and on copies". Tests: they failed first as expected (two would not build until the new functions existed; the copies case returned the old message). Now `./internal/release` (full), the targeted console run with `-run 'Copies|FleetCreate|Floor|Label|NotReleaseBuild'`, and the root copy-deck tests all pass. I ran `go` with the sandbox off because the default GOCACHE is read-only inside it; GOCACHE stayed at its default. Concerns: - **C51/C52 are blocked by the fleet-record-labels deck tests.** Every C entry must be approved, so a pending C51/C52 entry fails `TestFleetRecordLabelsApprovedCopyApplied`. Any `draft for copy review (Cnn)` marker in instances_cli.go or fleetcreate.go also fails `TestFleetRecordLabelsApprovedMarkers`. I did not weaken either test. The report gives three options (that controller adds a pending exemption for C51/C52, hold them until reviewed, or track them as SR-6 rows) and the ready code plan for both. - **C52 needs no Retry-After change.** Retry-After is only set when the message equals C39 (apiinstances.go:2553), so a C52 refusal drops it on its own. - **Local builds will now warn at startup.** A console built without ldflags reports `version.Build = "dev"`, which is not a release build, so it logs the SR-6-C05 warning. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/sr-followups/.superpowers/sdd/plan-1060/task-1-report.md</result> <usage><subagent_tokens>96546</subagent_tokens><tool_uses>38</tool_uses><duration_ms>747402</duration_ms></usage> </task-notification>
<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="bf162d76-4f72-4212-8cb9-2be712df3a07"> Agent manager 8a3d302: A: key the wait by row lifetime + target build, not permit; a stale wait can only halt the join as kept, never switch. One implementer fix + one scoped Astra check, then merge on green. Send SR-6-C01 to me for copy review when it's final. </paseo-system>
Attributed to this commit: 10.2 g CO₂e (1,248,510 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/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md| index e630bed53..c95a1b36c 100644 |
| --- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md |
| +++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md |
| @@ -171,4 +171,6 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text. |
| | 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) | |
| | SR-6-C03 | internal/console/appcopies.go | copies above 1 need the console on a release build at <floor> or later. this console runs <build>, which is not a release build | pending (Paul review, #1060) | |
| +| SR-6-C04 | instances_cli.go | <who> runs <build>, which is not a release build. tying instances to boxes needs a release at <floor> or later on the console and every active box of fleet <fleet> | pending (Paul review, #1060) | |
| | SR-6-C05 | internal/console/notreleasebuild.go | console: this console's build <build> is not a release version, so features that need a minimum release stay off. run a release build | pending (Paul review, #1060) | |
| +| SR-6-C06 | internal/console/fleetcreate.go | this console runs <build>, which is not a release build, so it cannot tie new instances to a box of fleet <fleet>. run a release build of the console | pending (Paul review, #1060) | |
diff --git a/instances_cli.go b/instances_cli.go| index 1d71bc429..8875cb355 100644 |
| --- a/instances_cli.go |
| +++ b/instances_cli.go |
| @@ -1318,6 +1318,11 @@ var labelUnmovableReasons = map[string]string{ |
| // "console": it is this console that is below the floor. |
| const labelFloorConsole = "the console" // approved copy (C49), Luna review by Paul's delegation 2026-11-14 |
| +// labelFloorNotRelease is the floor refusal when the build that failed it is |
| +// not a release version (#1060), so it cannot be ordered against the floor: |
| +// who, build, floor, fleet. A release never reported keeps C29. copy SR-6-C04 |
| +const labelFloorNotRelease = "%s runs %s, which is not a release build. tying instances to boxes needs a release at %s or later on the console and every active box of fleet %s" |
| + |
| // instanceLabelBinding mirrors the door's labelBinding. |
| type instanceLabelBinding struct { |
| Box string `json:"box"` |
| @@ -1573,6 +1578,9 @@ func labelRefusal(host string, a *instanceLabelAnswer) string { |
| if who == "console" { |
| who = labelFloorConsole |
| } |
| + if release.NotReleaseBuild(a.FloorRelease) { |
| + return fmt.Sprintf(labelFloorNotRelease, who, a.FloorRelease, a.Floor, a.Fleet) |
| + } |
| return fmt.Sprintf(labelFloor, who, a.FloorRelease, a.Floor, a.Fleet) |
| case "not_serving": |
| return fmt.Sprintf(labelNotServing, a.Box) |
diff --git a/instances_cli_label_test.go b/instances_cli_label_test.go| index 5b4d196fe..36c49db4e 100644 |
| --- a/instances_cli_label_test.go |
| +++ b/instances_cli_label_test.go |
| @@ -257,6 +257,14 @@ func TestInstancesLabelRefusalExitsNonZero(t *testing.T) { |
| "box-2 runs v0.34.0. tying instances to boxes needs v9.9.9 or later on the console and every active box of fleet pi"}, |
| {"floor: the console", refused("floor", map[string]any{"floor_box": "console", "floor_release": "v0.34.0", "floor": "v9.9.9"}), nil, |
| "the console runs v0.34.0. tying instances to boxes needs v9.9.9 or later on the console and every active box of fleet pi"}, |
| + // #1060: a release never reported keeps C29; a build that is not a |
| + // release says so (SR-6-C04), for a box or for the console. |
| + {"floor: unknown", refused("floor", map[string]any{"floor_box": "box-2", "floor_release": "unknown", "floor": "v9.9.9"}), nil, |
| + "box-2 runs unknown. tying instances to boxes needs v9.9.9 or later on the console and every active box of fleet pi"}, |
| + {"floor: a box not on a release build", refused("floor", map[string]any{"floor_box": "box-2", "floor_release": "ac9ee36", "floor": "v9.9.9"}), nil, |
| + "box-2 runs ac9ee36, which is not a release build. tying instances to boxes needs a release at v9.9.9 or later on the console and every active box of fleet pi"}, |
| + {"floor: the console not on a release build", refused("floor", map[string]any{"floor_box": "console", "floor_release": "ac9ee36", "floor": "v9.9.9"}), nil, |
| + "the console runs ac9ee36, which is not a release build. tying instances to boxes needs a release at v9.9.9 or later on the console and every active box of fleet pi"}, |
| {"not_serving", refused("not_serving", map[string]any{"box": "box-2"}), []string{"--box", "box-2"}, |
| "box-2 is not the box serving it now. only that box can be named for now"}, |
| {"disagree", refused("disagree", map[string]any{"hub_box": "box-2", "agree": false, "serving_box": "", "box": ""}), nil, |
diff --git a/internal/console/apiinstances_test.go b/internal/console/apiinstances_test.go| index 248075b81..4cfc0013a 100644 |
| --- a/internal/console/apiinstances_test.go |
| +++ b/internal/console/apiinstances_test.go |
| @@ -3130,6 +3130,24 @@ func TestCreateRefusesBelowLabelFloor(t *testing.T) { |
| fx.srv.consoleBuild = release.StatelessReplicasFloor |
| wantFleetCreateRefused(t, fx, reg, token, "a.example.com") |
| }) |
| + // #1060: a console whose build is not a release is still below the |
| + // floor, but retrying never helps, so it answers SR-6-C06 with the same |
| + // 503 and no Retry-After, and writes nothing. |
| + t.Run("the console not on a release build", func(t *testing.T) { |
| + fx, token, reg := d1World(t, "code-d1-floor-notrelease", "pi-1", "pi-2") |
| + fx.srv.consoleBuild = "ac9ee36" |
| + code, hdr, raw := rawReq(t, http.MethodPost, instancesURL(fx, fx.sqid, "shop"), token, `{"host":"a.example.com"}`) |
| + want := "this console runs ac9ee36, which is not a release build, so it cannot tie new instances to a box of fleet pi. run a release build of the console" |
| + if code != http.StatusServiceUnavailable || hdr.Get("Retry-After") != "" || errorOf(t, raw) != want { |
| + t.Fatalf("create = %d (Retry-After %q) %s; want 503, no Retry-After and SR-6-C06", code, hdr.Get("Retry-After"), raw) |
| + } |
| + noShopRecord(t, fx, "a.example.com") |
| + for _, b := range []string{"pi-1", "pi-2"} { |
| + if boxRow(t, reg, b).LabelledAt != 0 { |
| + t.Fatalf("%s marked labelled", b) |
| + } |
| + } |
| + }) |
| t.Run("a platform box below the box floor", func(t *testing.T) { |
| fx, token, reg := d1World(t, "code-d1-floor-deploy", "pi-1", "pi-2") |
| writeFleetBoxOn(t, fx, "", "box-1", "", true, time.Now(), "v0.32.9") |
diff --git a/internal/console/fleetcreate.go b/internal/console/fleetcreate.go| index e4af764a0..45cdb6b75 100644 |
| --- a/internal/console/fleetcreate.go |
| +++ b/internal/console/fleetcreate.go |
| @@ -23,6 +23,12 @@ import ( |
| // fleetCreateRetryAfter is the Retry-After, in seconds, of a C39 refusal. |
| const fleetCreateRetryAfter = "30" |
| +// msgFleetCreateNotRelease is D1's floor refusal when this console's build is |
| +// not a release version (#1060): build, fleet. copy SR-6-C06 |
| +func msgFleetCreateNotRelease(build, fleet string) string { |
| + return fmt.Sprintf("this console runs %s, which is not a release build, so it cannot tie new instances to a box of fleet %s. run a release build of the console", build, fleet) |
| +} |
| + |
| // msgFleetCreateUnavailable is C39: no box of the fleet can take the new |
| // instance right now (an incomplete view, sidecars, a release below the |
| // label floor, no destination, or a failed mark). |
| @@ -77,7 +83,8 @@ func (s *Server) fleetCreateApplies(v fleetView, verr error, rec provision.Recor |
| // record (release.AuthorizedManifest), and one that cannot be is C39; a record the platform cannot place or move, judged with |
| // that verified manifest, is C42; then an incomplete view, sidecars on the fleet, any active box or the console |
| // below release.FleetRecordLabelFloor (fleetAtRecordFloor, the label |
| -// door's check), no destination, and a failed mark are C39 (503), with the |
| +// door's check; SR-6-C06 with no Retry-After when this console's build is |
| +// not a release, #1060), no destination, and a failed mark are C39 (503), with the |
| // stateless publication refusal between the destination and the mark. |
| // Otherwise the box is marked labelled and rec carries it (FleetBox, |
| // FleetBoxAt). A new record has no data, so it is not FleetBoxMoved: an |
| @@ -121,6 +128,12 @@ func (s *Server) fleetCreateLabel(ctx context.Context, reg consoleRegistry, flee |
| return unavailable |
| case !s.fleetAtRecordFloor(v): |
| log.Printf("%s: below the record label floor %s; refused", tag, release.FleetRecordLabelFloor) |
| + // A console build that is not a release stays below the floor |
| + // (#1060), and retrying never helps: same status, but its own |
| + // message, so the door sets no Retry-After (that is C39's only). |
| + if build := s.replicaBuild(); release.NotReleaseBuild(build) { |
| + return &doorRefusal{Status: unavailable.Status, Msg: msgFleetCreateNotRelease(build, fleet)} |
| + } |
| return unavailable |
| } |
| box := v.chooseMoveDestination(rec.Runtime == provision.RuntimeRootfsV1, m != nil && m.Stateless, "") |