console: say when the build is not a release, at start and on copies
A console whose build is not a release version (a commit hash stamped by a build from source) stays below every release floor; that does not change. It now logs one warning at start (SR-6-C05), and the copies floor refusal says the build is not a release (SR-6-C03) instead of asking for an update. release.NotReleaseBuild is the one predicate: set, not "unknown", and not parsed by ParseReleaseVersion. The label floor (C51) and fleet create (C52) halves of #1060 wait on how a pending entry may sit in the approved fleet record labels deck. Refs #1060
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmd/console/main.go+6 −0docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md+2 −0internal/console/appcopies.go+7 −0internal/console/notreleasebuild.go+24 −0internal/console/notreleasebuild_test.go+38 −0internal/console/replicafloor_test.go+5 −0internal/release/layoutintent.go+13 −0internal/release/notreleasebuild_test.go+29 −0
Intent
<task-notification> <task-id>a631169f37a68a2ce</task-id> <tool-use-id>toolu_01M3Jbouuknq1VZwQbcvxfYY</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/a631169f37a68a2ce.output</output-file> <status>completed</status> <summary>Agent "Implement #1061 Task 4" 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 (fix round 1, P3) Commit: 79174a76 "release: correct the relayed-repoint comment on logging" Change: the comment at `internal/release/adopt.go:1878` now says the host throttle coalesces requests and can return silently, so a suppressed failure may log nothing. If the authority guard trips, its own line prints instead. No behaviour change. Tests: `go test ./internal/release/ -run 'TestRelayedRepoint|Repoint' -count=1` passes. Concerns: none. I did not touch census files. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/sr-followups/.superpowers/sdd/plan-1061/task-4-report.md (fix section appended; it supersedes my earlier "a line always logs" sentence)</result> <usage><subagent_tokens>53954</subagent_tokens><tool_uses>2</tool_uses><duration_ms>17194</duration_ms></usage> </task-notification>
Attributed to this commit: 8.06 g CO₂e (1,019,217 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/cmd/console/main.go b/cmd/console/main.go| index d53ccb636..2790394ab 100644 |
| --- a/cmd/console/main.go |
| +++ b/cmd/console/main.go |
| @@ -678,6 +678,12 @@ func serve() { |
| if err != nil { |
| log.Fatal(err) |
| } |
| + // A build that is not a release version keeps every release floor off |
| + // (#1060): say so once, here, rather than leave each floor to fail |
| + // silently. |
| + if msg, ok := srv.NotReleaseBuildWarning(); ok { |
| + log.Print(msg) |
| + } |
| // The hostname history's mode, read once before the console serves |
| // (nearest-region never-reuse spec §3a): one GET per start. Bounded, and |
| // a failure is left for the first door that needs it, which refuses. |
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 2f6a90870..e630bed53 100644 |
| --- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md |
| +++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md |
| @@ -170,3 +170,5 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text. |
| | 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) | |
| +| 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-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) | |
diff --git a/internal/console/appcopies.go b/internal/console/appcopies.go| index b7057ff7a..516c48989 100644 |
| --- a/internal/console/appcopies.go |
| +++ b/internal/console/appcopies.go |
| @@ -31,6 +31,8 @@ const ( |
| copiesCapacity = "%d copies need %d eligible boxes. this fleet has %d" |
| copiesRelease = "more than one copy requires a stateless, always-on release. set --copies 1 before selecting this release" |
| copiesFloor = "copies above 1 need every fleet box and the console on %s or later. update them and try again" |
| + // copiesNotRelease (#1060): floor, the console's build. copy SR-6-C03 |
| + copiesNotRelease = "copies above 1 need the console on a release build at %s or later. this console runs %s, which is not a release build" |
| copiesUnread = "could not check every instance, release and fleet box, so the copy count was left unchanged. try again" |
| copiesManaged = "more than one copy is available for platform-managed instances on an owned fleet only" |
| copiesMoving = "this instance has an import or move in progress. finish it before changing the copy count" |
| @@ -304,6 +306,11 @@ func (s *Server) copiesRefusal(ctx context.Context, acct *Account, app string, n |
| build = version.Build |
| } |
| if !v.replicasActive(build) { |
| + // A console build that is not a release stays below the floor |
| + // (#1060); the refusal says so rather than ask for an update. |
| + if release.NotReleaseBuild(build) { |
| + return refuse(fmt.Sprintf(copiesNotRelease, release.StatelessReplicasFloor, build)) |
| + } |
| return refuse(fmt.Sprintf(copiesFloor, release.StatelessReplicasFloor)) |
| } |
| available := 0 |
diff --git a/internal/console/notreleasebuild.go b/internal/console/notreleasebuild.go| new file mode 100644 |
| index 000000000..26c6e436b |
| --- /dev/null |
| +++ b/internal/console/notreleasebuild.go |
| @@ -0,0 +1,24 @@ |
| +package console |
| + |
| +import ( |
| + "fmt" |
| + |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// consoleNotReleaseBuild is the startup warning for a console whose build is |
| +// not a release version (#1060): build. copy SR-6-C05 |
| +const consoleNotReleaseBuild = "console: this console's build %s is not a release version, so features that need a minimum release stay off. run a release build" |
| + |
| +// NotReleaseBuildWarning is the warning cmd/console logs once at start when |
| +// this console's build is set but is not a release version, such as a |
| +// commit hash stamped by a build from source. Every release floor stays |
| +// off for such a build (a commit cannot be ordered against a release); |
| +// this only says so. ok is false for a release build and for none at all. |
| +func (s *Server) NotReleaseBuildWarning() (msg string, ok bool) { |
| + build := s.replicaBuild() |
| + if !release.NotReleaseBuild(build) { |
| + return "", false |
| + } |
| + return fmt.Sprintf(consoleNotReleaseBuild, build), true |
| +} |
diff --git a/internal/console/notreleasebuild_test.go b/internal/console/notreleasebuild_test.go| new file mode 100644 |
| index 000000000..54d3e2ebf |
| --- /dev/null |
| +++ b/internal/console/notreleasebuild_test.go |
| @@ -0,0 +1,38 @@ |
| +package console |
| + |
| +import ( |
| + "fmt" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// The startup warning's decision (#1060, SR-6-C05): a console whose build is |
| +// set but is not a release version says so once at start, since every |
| +// floor stays off for it. A release build, or one never set, says nothing. |
| +func TestNotReleaseBuildWarning(t *testing.T) { |
| + for _, tc := range []struct { |
| + build string |
| + warn bool |
| + }{ |
| + {release.FleetRecordLabelFloor, false}, |
| + {"v0.35.4", false}, |
| + {"unknown", false}, |
| + {"ac9ee36", true}, |
| + {"v0.35.4-3-gabc1234", true}, |
| + } { |
| + s := &Server{consoleBuild: tc.build} |
| + msg, ok := s.NotReleaseBuildWarning() |
| + if ok != tc.warn { |
| + t.Errorf("%q: warn = %v, want %v", tc.build, ok, tc.warn) |
| + continue |
| + } |
| + want := "" |
| + if tc.warn { |
| + want = fmt.Sprintf("console: this console's build %s is not a release version, so features that need a minimum release stay off. run a release build", tc.build) |
| + } |
| + if msg != want { |
| + t.Errorf("%q: message %q, want %q", tc.build, msg, want) |
| + } |
| + } |
| +} |
diff --git a/internal/console/replicafloor_test.go b/internal/console/replicafloor_test.go| index 58a5ca997..8c3b40ecd 100644 |
| --- a/internal/console/replicafloor_test.go |
| +++ b/internal/console/replicafloor_test.go |
| @@ -139,6 +139,11 @@ func TestReplicaFloorEnablesOnlyCompleteFleet(t *testing.T) { |
| } |
| }, 0, ""}, |
| {"old-console", func(t *testing.T, fx *consoleFixture) { fx.srv.consoleBuild = replicaBelow }, 409, floorMsg}, |
| + // #1060: a console build that is not a release stays below the |
| + // floor, and the refusal says why (SR-6-C03) instead of asking for |
| + // an update. |
| + {"non-release-console", func(t *testing.T, fx *consoleFixture) { fx.srv.consoleBuild = "ac9ee36" }, 409, |
| + fmt.Sprintf("copies above 1 need the console on a release build at %s or later. this console runs ac9ee36, which is not a release build", release.StatelessReplicasFloor)}, |
| {"channel-at-floor", func(t *testing.T, fx *consoleFixture) { |
| rfPublish(t, fx, "stable", replicaBelow) |
| rfPublish(t, fx, "stable", release.StatelessReplicasFloor) |
diff --git a/internal/release/layoutintent.go b/internal/release/layoutintent.go| index 1f51e1f08..baa1d3f71 100644 |
| --- a/internal/release/layoutintent.go |
| +++ b/internal/release/layoutintent.go |
| @@ -381,6 +381,19 @@ func ParseReleaseVersion(version string) (SemVer, bool) { |
| return ParseSemVer(strings.TrimPrefix(version, "v")) |
| } |
| +// NotReleaseBuild reports whether build is set but is not a release |
| +// version, such as a commit hash stamped by a build from source (#1060). |
| +// "" and "unknown" mean nothing was reported and are not flagged. It |
| +// changes no floor: such a build stays below every floor, since a commit |
| +// cannot be ordered against a release. Callers use it only to say why. |
| +func NotReleaseBuild(build string) bool { |
| + if build == "" || build == "unknown" { |
| + return false |
| + } |
| + _, ok := ParseReleaseVersion(build) |
| + return !ok |
| +} |
| + |
| // BelowFloor reports whether version parses and is below floor. A tag that |
| // does not parse is false: the caller decides what an unplaceable version |
| // means for its own rule. |
diff --git a/internal/release/notreleasebuild_test.go b/internal/release/notreleasebuild_test.go| new file mode 100644 |
| index 000000000..1ccc6d6fe |
| --- /dev/null |
| +++ b/internal/release/notreleasebuild_test.go |
| @@ -0,0 +1,29 @@ |
| +package release |
| + |
| +import "testing" |
| + |
| +// NotReleaseBuild flags a build that is set but cannot be placed against a |
| +// release floor (#1060). "" and "unknown" are not flagged: nothing was |
| +// reported, which is a different message. |
| +func TestNotReleaseBuild(t *testing.T) { |
| + for _, tc := range []struct { |
| + build string |
| + want bool |
| + }{ |
| + {"v0.35.4", false}, |
| + {"0.35.4", false}, |
| + {"v1.0.0", false}, |
| + {"", false}, |
| + {"unknown", false}, |
| + {"ac9ee36", true}, |
| + {"dev", true}, |
| + {"v0.35.4-3-gabc1234", true}, |
| + {"v0.35.4-dirty", true}, |
| + {"v0.35", true}, |
| + {"v00.35.4", true}, |
| + } { |
| + if got := NotReleaseBuild(tc.build); got != tc.want { |
| + t.Errorf("NotReleaseBuild(%q) = %v, want %v", tc.build, got, tc.want) |
| + } |
| + } |
| +} |