carlos / platform Public

copy: clear provisional markers for approved rows (#511)

Every "(provisional)" copy marker in non-test code whose SR row the
deck now marks approved is removed. SR-3-C06 stays marked: the deck
rules it a prober diagnostic, not approved copy. Comments only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 0b0c2abc594f7256c07f98ce12691b8f71bf3c2c parent f797018
14 files changed, +52 −54
  • cli.go +1 −1
  • instances_copies.go +11 −11
  • internal/activator/replicadeploy.go +2 −2
  • internal/activator/stateless.go +1 −1
  • internal/activator/statelessrelease.go +4 −5
  • internal/console/replicadeploy.go +10 −10
  • internal/console/replicafloor.go +4 −4
  • internal/console/replicaview.go +7 −8
  • internal/console/templates/app_overview.html +1 −1
  • internal/edge/replicaprober.go +3 −3
  • internal/edge/replicaproxy.go +2 −2
  • internal/provision/replicadeploy.go +3 −3
  • internal/rollout/replicas.go +1 −1
  • scripts/stateless-replicas-drill/main.go +2 −2
diff --git a/cli.go b/cli.go
index f338cfad0..2d4c0733d 100644
--- a/cli.go
+++ b/cli.go
@@ -4240,7 +4240,7 @@ func humanFloat(v *float64) string {
return fmt.Sprintf("%.2f", *v)
}
-// copy SR-4-C40 (provisional)
+// copy SR-4-C40
var errDirectReplicaRetry = errors.New("this app runs stateless replicas, so retry it through the console: carlos instances retry <host>, or carlos promote --retry while logged in to the console")
// directRetryRefusal refuses a direct-bucket `promote --retry` on a channel
diff --git a/instances_copies.go b/instances_copies.go
index 20d3bb2ee..57744c9f0 100644
--- a/instances_copies.go
+++ b/instances_copies.go
@@ -15,17 +15,17 @@ import (
// The copies table's heading and words. Copy: pending Paul's copy review.
const (
- copiesColBox = "BOX" // copy SR-4-C02 (provisional)
- copiesColBuild = "BUILD" // copy SR-4-C03 (provisional)
- copiesColState = "STATE" // copy SR-4-C04 (provisional)
- copiesColHealth = "HEALTH" // copy SR-4-C05 (provisional)
- copyRunning = "running" // copy SR-4-C07 (provisional)
- copyDown = "down" // copy SR-4-C08 (provisional)
- copyFailed = "failed" // copy SR-4-C09 (provisional)
- copyUnknown = "unknown" // copy SR-4-C10 (provisional)
- copyMissing = "missing" // copy SR-4-C11 (provisional)
- copyHealthy = "Healthy" // copy SR-4-C49 (provisional)
- copyUnhealthy = "Unhealthy" // copy SR-4-C50 (provisional)
+ copiesColBox = "BOX" // copy SR-4-C02
+ copiesColBuild = "BUILD" // copy SR-4-C03
+ copiesColState = "STATE" // copy SR-4-C04
+ copiesColHealth = "HEALTH" // copy SR-4-C05
+ copyRunning = "running" // copy SR-4-C07
+ copyDown = "down" // copy SR-4-C08
+ copyFailed = "failed" // copy SR-4-C09
+ copyUnknown = "unknown" // copy SR-4-C10
+ copyMissing = "missing" // copy SR-4-C11
+ copyHealthy = "Healthy" // copy SR-4-C49
+ copyUnhealthy = "Unhealthy" // copy SR-4-C50
copyCellMaxBytes = 128
)
diff --git a/internal/activator/replicadeploy.go b/internal/activator/replicadeploy.go
index 8318e3c79..bff01cc6f 100644
--- a/internal/activator/replicadeploy.go
+++ b/internal/activator/replicadeploy.go
@@ -55,10 +55,10 @@ func (e replicaRefusal) Is(target error) bool { return target == ErrFenced }
var (
// errReplicaTurn: the record does not allow this copy the build yet.
- // copy SR-4-C43 (provisional)
+ // copy SR-4-C43
errReplicaTurn error = replicaRefusal{"this copy keeps its current build until its turn to switch"}
// errReplicaHold: copies switch builds only by overlap.
- // copy SR-4-C44 (provisional)
+ // copy SR-4-C44
errReplicaHold error = replicaRefusal{"copies above 1 switch builds one box at a time while the old build keeps serving, so this release's hold was refused. the current build keeps serving"}
)
diff --git a/internal/activator/stateless.go b/internal/activator/stateless.go
index 99782ed22..b2f36f2df 100644
--- a/internal/activator/stateless.go
+++ b/internal/activator/stateless.go
@@ -53,7 +53,7 @@ type statelessRecordKey struct{}
// statelessRowChanged is a stateless start refused because the route row it
// was prepared on is not the row it would start on (#511 F11). Nothing
// started. It is ErrFenced to every classifier, as before, but its text
-// names no fence, since none is involved. copy SR-4-C58 (provisional)
+// names no fence, since none is involved. copy SR-4-C58
type statelessRowChanged struct{}
func (statelessRowChanged) Error() string {
diff --git a/internal/activator/statelessrelease.go b/internal/activator/statelessrelease.go
index bb3c37461..e756e6f4c 100644
--- a/internal/activator/statelessrelease.go
+++ b/internal/activator/statelessrelease.go
@@ -21,22 +21,21 @@ var errReplicaReleaseUnknown = fmt.Errorf("release: %w", ErrReplicaReleaseUnknow
// failure of the build (verdictOf).
var (
// errReplicaRecordRefused: the record's writer refused the step, and the
- // attempt it holds is not one this box adopts. copy SR-4-C55 (provisional)
+ // attempt it holds is not one this box adopts. copy SR-4-C55
errReplicaRecordRefused = errors.New("the deploy record did not accept this release step, so nothing started")
// errReplicaTermLost: this box no longer held the coordinator term, so
- // it asked the record nothing. copy SR-4-C56 (provisional)
+ // it asked the record nothing. copy SR-4-C56
errReplicaTermLost = errors.New("this box is no longer coordinating this deploy, so nothing started")
// errReplicaStepUnconfirmed: the step's answer did not arrive or did not
// match (a lost reply); the begin may have been recorded, and an
- // identical begin replays it. copy SR-4-C57 (provisional)
+ // identical begin replays it. copy SR-4-C57
errReplicaStepUnconfirmed = errors.New("the deploy record did not confirm this release step, so nothing started. the next start tries again")
// errReplicaMarkUnsaved: this box could not save its own evidence of
// the attempt before the step, so it took no step. copy SR-4-C60
- // (provisional)
errReplicaMarkUnsaved = errors.New("this box could not record its release step, so nothing started")
// errReplicaReleaseNotStarted: an attempt this box moved to releasing,
// whose command it knows it never started, is closed as unknown on the
- // record (retry semantics unchanged). copy SR-4-C59 (provisional)
+ // record (retry semantics unchanged). copy SR-4-C59
errReplicaReleaseNotStarted = errors.New("the release command did not start, and the release attempt is closed. deploy again to retry it")
)
diff --git a/internal/console/replicadeploy.go b/internal/console/replicadeploy.go
index a1992c331..01b1f4912 100644
--- a/internal/console/replicadeploy.go
+++ b/internal/console/replicadeploy.go
@@ -20,25 +20,25 @@ import (
// Deploy status and refusal text for a replicated deploy (stateless
// replicas Plan 4). Every string is a pending row of the series copy deck.
const (
- // copy SR-4-C35 (provisional)
+ // copy SR-4-C35
replicaDeployPending = "release pending"
- // copy SR-4-C36 (provisional)
+ // copy SR-4-C36
replicaDeployReleasing = "release running"
- // copy SR-4-C38 (provisional)
+ // copy SR-4-C38
replicaDeployUnknown = "release result unknown"
- // copy SR-4-C15 (provisional)
+ // copy SR-4-C15
replicaDeployFailed = "the release command failed, so no copy switched to the new build"
- // copy SR-4-C18 (provisional)
+ // copy SR-4-C18
replicaDeploySwapping = "release complete. copies are switching one box at a time"
- // copy SR-4-C39 (provisional)
+ // copy SR-4-C39
replicaDeployBootstrap = "release complete. no copy was running, so the first copy is starting on its own"
- // copy SR-4-C17 (provisional)
+ // copy SR-4-C17
replicaDeploySwitching = "switching %s to %s"
- // copy SR-4-C16 (provisional)
+ // copy SR-4-C16
replicaDeployHalted = "this copy's switch has not been confirmed. other copies keep serving and the deploy is stopped"
- // copy SR-4-C37 (provisional)
+ // copy SR-4-C37
replicaDeployDone = "deploy complete"
- // copy SR-4-C46 (provisional)
+ // copy SR-4-C46
replicaDeployWorkersFailed = "the new build's workers failed on %s, so the deploy stopped. other copies keep serving"
// copy SR-4-C79
replicaDeployWebFailed = "the new build stopped working on %s after its switch, so the deploy stopped. other copies keep serving"
diff --git a/internal/console/replicafloor.go b/internal/console/replicafloor.go
index a311eed24..8d9ae9747 100644
--- a/internal/console/replicafloor.go
+++ b/internal/console/replicafloor.go
@@ -43,21 +43,21 @@ import (
// The box itself has no backstop (R16): a manual root downgrade on a box
// with copies is not prevented, and the docs say so.
-// consoleReplicaFloorRefusal (SR-4-C23, provisional) takes the floor.
+// consoleReplicaFloorRefusal (SR-4-C23) takes the floor.
const consoleReplicaFloorRefusal = "copies above 1 are in use, so the platform cannot move below %s. reduce the copy count and wait for other copies to stop first"
// copiesChannelBelow (SR-4-C62) takes the release, its channel, the
// floor and the floor.
const copiesChannelBelow = "this deployment is on %s in its %s channel, below %s. copies above 1 wait until every channel is on %s or later. try again after the next deployment update"
-// copiesNoBaseline (SR-4-C61, provisional; R13).
+// copiesNoBaseline (SR-4-C61; R13).
const copiesNoBaseline = "every instance needs one successful deploy of a stateless release before it can run more than one copy. deploy once, then set copies"
-// copiesNoInstances (SR-4-C77, provisional; R13 closed up front): copies
+// copiesNoInstances (SR-4-C77; R13 closed up front): copies
// above 1 on an app with no live instance.
const copiesNoInstances = "this app has no instances yet. create one and deploy it once, then set copies"
-// copiesCreateAtCopies (SR-4-C78, provisional; R13 closed up front): a new
+// copiesCreateAtCopies (SR-4-C78; R13 closed up front): a new
// instance in an app whose copies are above 1.
const copiesCreateAtCopies = "this app runs more than one copy of each instance, so a new instance cannot be added now. set copies to 1, create the instance and deploy it once, then raise copies again"
diff --git a/internal/console/replicaview.go b/internal/console/replicaview.go
index c5f02943d..f03e262a6 100644
--- a/internal/console/replicaview.go
+++ b/internal/console/replicaview.go
@@ -29,21 +29,20 @@ import (
// The copy states a view carries. Anything else a hub says reads unknown.
const (
- copyStateRunning = "running" // copy SR-4-C07 (provisional)
- copyStateDown = "down" // copy SR-4-C08 (provisional)
- copyStateFailed = "failed" // copy SR-4-C09 (provisional)
- copyStateUnknown = "unknown" // copy SR-4-C10 (provisional)
- copyStateMissing = "missing" // copy SR-4-C11 (provisional)
+ copyStateRunning = "running" // copy SR-4-C07
+ copyStateDown = "down" // copy SR-4-C08
+ copyStateFailed = "failed" // copy SR-4-C09
+ copyStateUnknown = "unknown" // copy SR-4-C10
+ copyStateMissing = "missing" // copy SR-4-C11
)
// restartCopiesRefusal refuses `carlos restart` for an app with more than
// one copy of an instance: the restart reaches every box on the same serial
-// move, so it would cycle every copy at once. copy SR-4-C47 (provisional,
-// pending Paul's copy review)
+// move, so it would cycle every copy at once. copy SR-4-C47
const restartCopiesRefusal = "this app runs more than one copy of an instance, so a restart would stop every copy at the same time. deploy a new build instead: its copies switch one box at a time"
// restartCopiesRefusalPage is restartCopiesRefusal as the app page's flash
-// says it. copy SR-4-C48 (provisional, pending Paul's copy review)
+// says it. copy SR-4-C48
const restartCopiesRefusalPage = "This app runs more than one copy of an instance, so a restart would stop every copy at the same time. Deploy a new build instead: its copies switch one box at a time."
// restartCopies is the restart doors' check (F2). Every box serving the app
diff --git a/internal/console/templates/app_overview.html b/internal/console/templates/app_overview.html
index 235e19275..24e3fef75 100644
--- a/internal/console/templates/app_overview.html
+++ b/internal/console/templates/app_overview.html
@@ -51,7 +51,7 @@
{{/* The hub's live count of an app whose instances run more than one
copy: SR-4-C01 when every copy has a reading, SR-4-C54 when any
does not, so a copy nobody can vouch for is never counted as
- stopped (both provisional). */}}
+ stopped. */}}
{{if .CopiesDesired}}<p class="tile-detail">{{if .CopiesUnknown}}{{.CopiesUnknown}} of {{.CopiesDesired}} copies have unknown status; {{.CopiesRunning}} are known to be running{{else}}{{.CopiesRunning}} of {{.CopiesDesired}} copies running{{end}}</p>{{end}}
</a>
<a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
diff --git a/internal/edge/replicaprober.go b/internal/edge/replicaprober.go
index 7427ad5d3..93cf8dd5d 100644
--- a/internal/edge/replicaprober.go
+++ b/internal/edge/replicaprober.go
@@ -19,11 +19,11 @@ const (
replicaProbeInterval = time.Second
replicaProbeFail = 2
replicaProbeRise = 2
- // copy SR-3-C03 (provisional)
+ // copy SR-3-C03
replicaFailed = "this copy did not pass its health check"
- // copy SR-3-C04 (provisional)
+ // copy SR-3-C04
replicaDisconnected = "this box's tunnel is disconnected"
- // copy SR-3-C05 (provisional)
+ // copy SR-3-C05
replicaWaiting = "waiting for this copy to pass its health check"
// copy SR-3-C06 (provisional)
replicaStale = "this health answer belongs to an earlier instance or assignment"
diff --git a/internal/edge/replicaproxy.go b/internal/edge/replicaproxy.go
index 6e43b66c4..88da5c925 100644
--- a/internal/edge/replicaproxy.go
+++ b/internal/edge/replicaproxy.go
@@ -18,9 +18,9 @@ import (
const (
replicaAttemptTimeout = 3 * time.Second
- // copy SR-3-C01 (provisional)
+ // copy SR-3-C01
replicaUnavailable = "no healthy copy is available. try again shortly"
- // copy SR-3-C02 (provisional)
+ // copy SR-3-C02
replicaNotRepeated = "the connection to this copy ended before it answered. this request was not repeated"
)
diff --git a/internal/provision/replicadeploy.go b/internal/provision/replicadeploy.go
index 8424ed9a6..fb0cff1f9 100644
--- a/internal/provision/replicadeploy.go
+++ b/internal/provision/replicadeploy.go
@@ -219,19 +219,19 @@ func RequestRecordReplicaRetry(ctx context.Context, s release.Store, id replicas
// ErrReplicaSwitchOpen refuses an explicit retry while a copy's switch is
// unresolved: the new attempt could not start until its box answers.
-// copy SR-4-C31 (provisional)
+// copy SR-4-C31
var ErrReplicaSwitchOpen = errors.New("another deploy is still finishing a copy's switch. wait for it to finish before deploying again")
// ErrReplicaRetryUnreadable refuses an explicit retry when an instance
// record of the app could not be read or decoded: it could hold an open
// switch, so nothing is retried.
-// copy SR-4-C41 (provisional)
+// copy SR-4-C41
var ErrReplicaRetryUnreadable = errors.New("an instance record could not be read, so nothing was retried. try again")
// ErrReplicaRetryStale refuses a replay of a retry request when the
// instances it has not reached changed since it was made: another request
// retried them, or a new build is deploying. Nothing is written.
-// copy SR-4-C42 (provisional)
+// copy SR-4-C42
var ErrReplicaRetryStale = errors.New("the instances changed since this retry was requested, so nothing was retried. run the retry again")
// ReplicaRetryTargets is the read-only half of the explicit retry request
diff --git a/internal/rollout/replicas.go b/internal/rollout/replicas.go
index dbab24783..0dcb0f86c 100644
--- a/internal/rollout/replicas.go
+++ b/internal/rollout/replicas.go
@@ -63,7 +63,7 @@ type replicaOutcome struct {
// replicaNoBuildRefusal refuses a copy's wake when its record names no
// build that passed a release for it to run.
-// copy SR-4-C45 (provisional)
+// copy SR-4-C45
const replicaNoBuildRefusal = "this copy waits for a release to pass before it starts"
// NoteReplicaDeploy is the record observation the agent's reconcile pass
diff --git a/scripts/stateless-replicas-drill/main.go b/scripts/stateless-replicas-drill/main.go
index 6b7f4a1ea..7123dca48 100644
--- a/scripts/stateless-replicas-drill/main.go
+++ b/scripts/stateless-replicas-drill/main.go
@@ -124,11 +124,11 @@ const (
hubMinuteWait = 5 * time.Minute
)
-// drillSummary (SR-4-C32, provisional) takes box A's share, box A, box B's
+// drillSummary (SR-4-C32) takes box A's share, box A, box B's
// share, box B, the failed reads, the cut streams and the reconnect.
const drillSummary = "spread: %.0f%% on %s, %.0f%% on %s; failed reads before headers: %d; cut streams: %d; websocket reconnect: %.1fs"
-// drillFailed (SR-4-C33, provisional) takes the reason.
+// drillFailed (SR-4-C33) takes the reason.
const drillFailed = "the dev drill failed: %s. restore the stopped box and finish cleanup before closing this session"
func main() {