console: fix round 1 — sweep the remaining bake/fast-track strings the coordinator ruled in scope
Renames the last user-facing "bake"/"flagged production"/"Re-declare"
strings in confirm.go, server.go, appsettings.go, ownership.go, and
apicli.go to the safety-delay vocabulary ("marked as production" /
"safety delay"), per coordinator adjudication of task-4's Deviation #2.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7 files changed,
+15
−15
internal/console/apicli.go+3 −3internal/console/appsettings.go+2 −2internal/console/appsettings_test.go+1 −1internal/console/confirm.go+1 −1internal/console/ownership.go+3 −3internal/console/server.go+4 −4internal/console/server_test.go+1 −1
diff --git a/internal/console/apicli.go b/internal/console/apicli.go| index 90b54edb6..32defc6c5 100644 |
| --- a/internal/console/apicli.go |
| +++ b/internal/console/apicli.go |
| @@ -620,9 +620,9 @@ func (s *Server) handleAPITrashApp(w http.ResponseWriter, r *http.Request) { |
| // other bucket failure in this console gets. |
| log.Printf("console: api trash %s/%s: production flag: %v", acct.Sqid, app, err) |
| writeJSON(w, http.StatusConflict, map[string]string{ |
| - "error": "could not read the production flag for " + app + |
| - " — an unreadable flag is treated as production, so deleting is refused." + |
| - " Re-declare it with the production switch on the app page, then try again.", |
| + "error": "could not read the production setting for " + app + |
| + " — when in doubt it's treated as production, so deleting is refused." + |
| + " Set it again with the production switch on the app page, then try again.", |
| "console_url": appURL, |
| }) |
| return |
diff --git a/internal/console/appsettings.go b/internal/console/appsettings.go| index 3320245fe..6291114b3 100644 |
| --- a/internal/console/appsettings.go |
| +++ b/internal/console/appsettings.go |
| @@ -290,11 +290,11 @@ func (s *Server) handleAppDelete(w http.ResponseWriter, r *http.Request) { |
| flag, err := release.GetProduction(ctx, s.cfg.Releases, s.cfg.ReleasePub, acct.Sqid, app) |
| if err != nil { |
| log.Printf("console: trash %s/%s: production flag: %v", acct.Sqid, app, err) |
| - back("err", "Could not read the production flag — an unreadable flag is treated as production, so deleting is refused. Re-declare it on the Releases page, then try again.") |
| + back("err", "Could not read this app's production setting — when in doubt it's treated as production, so deleting is refused. Set it again on the Releases page, then try again.") |
| return |
| } |
| if flag != nil && flag.Production { |
| - back("err", app+" is flagged production, so deleting is refused. Turn the supply-chain bake off first (Releases page — owner, passkey, and a hold on every box), then try again.") |
| + back("err", app+" is marked as production, so deleting is refused. Turn the safety delay off first (owner + passkey, on the Releases page; it takes effect after ~72h), then try again.") |
| return |
| } |
| now := time.Now() |
diff --git a/internal/console/appsettings_test.go b/internal/console/appsettings_test.go| index aeea374d9..2cb6a3f94 100644 |
| --- a/internal/console/appsettings_test.go |
| +++ b/internal/console/appsettings_test.go |
| @@ -423,7 +423,7 @@ func TestAppDeleteRefusesAProductionApp(t *testing.T) { |
| if status != http.StatusSeeOther || loc != fx.path("/apps/kass/settings") { |
| t.Fatalf("delete of a production app = %d -> %q:\n%s", status, loc, body) |
| } |
| - if _, _, page := get(t, c, fx.ts.URL+loc); !strings.Contains(page, "is flagged production, so deleting is refused") { |
| + if _, _, page := get(t, c, fx.ts.URL+loc); !strings.Contains(page, "is marked as production, so deleting is refused") { |
| t.Fatalf("no production refusal flash:\n%s", page) |
| } |
| if tomb := appTombstone(t, fx, "kass"); tomb != nil { |
diff --git a/internal/console/confirm.go b/internal/console/confirm.go| index 9aa78f760..a165103f4 100644 |
| --- a/internal/console/confirm.go |
| +++ b/internal/console/confirm.go |
| @@ -157,7 +157,7 @@ func (s *Server) confirmRollback(w http.ResponseWriter, r *http.Request, addr, r |
| channel + " serves " + cur + " now.", |
| "Rolling back re-points it to " + target + ", the version before this one.", |
| }, |
| - Note: "Rollback never bakes — hosts adopt on their next pass.", |
| + Note: "Rollbacks skip the safety delay — machines pick it up within a couple of minutes.", |
| Action: "/a/" + url.PathEscape(acct.Sqid) + "/apps/" + url.PathEscape(app) + "/rollback", |
| // target pins what the card promised: the confirmed POST refuses if |
| // the channel's history has moved on since this was rendered. |
diff --git a/internal/console/ownership.go b/internal/console/ownership.go| index 4e91b8bf6..7c045c132 100644 |
| --- a/internal/console/ownership.go |
| +++ b/internal/console/ownership.go |
| @@ -359,11 +359,11 @@ func purgeAdvice(err error, app string) string { |
| return "“" + app + "” is not in the trash, so nothing was deleted. It may have been " + |
| "restored, or already deleted, since this page was loaded." |
| case strings.Contains(err.Error(), "cannot read the production flag"): |
| - return "Could not read the production flag for “" + app + "” — an unreadable flag is treated " + |
| - "as production, so deleting is refused. Re-declare it with the production switch on the " + |
| + return "Could not read the production setting for “" + app + "” — an unreadable flag is treated " + |
| + "as production, so deleting is refused. Set it again with the production switch on the " + |
| "app page, then try again." |
| case strings.Contains(err.Error(), "flagged production"): |
| - return "“" + app + "” is flagged production, so deleting is refused. Turn production off " + |
| + return "“" + app + "” is marked as production, so deleting is refused. Turn production off " + |
| "first — the off-switch on the app page (account owner, passkey, and a hold on every box) " + |
| "is the only way through — then try again." |
| case strings.Contains(err.Error(), "no release public key"): |
diff --git a/internal/console/server.go b/internal/console/server.go| index 963300ee5..addb9a12f 100644 |
| --- a/internal/console/server.go |
| +++ b/internal/console/server.go |
| @@ -2158,14 +2158,14 @@ func (s *Server) handleFastTrack(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| if cur.Version != pinned { |
| - back("err", "Channel "+channel+" changed while you were confirming — review the fast-track again.") |
| + back("err", "Channel "+channel+" changed while you were confirming — review skipping the delay again.") |
| return |
| } |
| } |
| ver, err := release.FastTrack(ctx, s.cfg.Releases, s.cfg.Key, acct.Sqid, app, channel, addr) |
| if err != nil { |
| log.Printf("console: fast-track %s %s: %v", app, channel, err) |
| - back("err", "Fast-track failed: "+err.Error()) |
| + back("err", "Skipping the delay failed: "+err.Error()) |
| return |
| } |
| s.audit(acct, app, addr, "fast-track", "skipped the safety delay for "+ver+" on "+channel) |
| @@ -2280,7 +2280,7 @@ func (s *Server) handleNewCanary(w http.ResponseWriter, r *http.Request) { |
| // so a registry hiccup just falls back to the generic "attach one" copy |
| // rather than failing the create that already succeeded. |
| if hosts, _ := s.channelHosts(app, channel); len(hosts) > 0 { |
| - back("ok", "Created canary "+name+" — live at https://"+hosts[0]+" serving "+version+" (canaries never bake).") |
| + back("ok", "Created canary "+name+" — live at https://"+hosts[0]+" serving "+version+" (test versions have no safety delay).") |
| return |
| } |
| domain, absent := s.instanceDomainFor(ctx, acct.Sqid, app) |
| @@ -2288,7 +2288,7 @@ func (s *Server) handleNewCanary(w http.ResponseWriter, r *http.Request) { |
| if enable != "" { |
| create = enable + " && " + create |
| } |
| - back("ok", "Created canary "+name+" — "+channel+" serves "+version+" the moment a host follows it, no bake. Attach one: "+create) |
| + back("ok", "Created canary "+name+" — "+channel+" serves "+version+" the moment a machine follows it, no safety delay. Attach one: "+create) |
| } |
| // instanceDomainFor answers "where do this app's instance hosts live?" — the |
diff --git a/internal/console/server_test.go b/internal/console/server_test.go| index 098b950ae..bb46c3bad 100644 |
| --- a/internal/console/server_test.go |
| +++ b/internal/console/server_test.go |
| @@ -917,7 +917,7 @@ func TestCanaryFlow(t *testing.T) { |
| // the box's registry on local disk), so a dashboard must never send its |
| // reader there — the whole point of the instances API path. |
| for _, want := range []string{ |
| - "Created canary rc", "no bake", "canary/rc", |
| + "Created canary rc", "no safety delay", "canary/rc", |
| "carlos instances enable -app kass", "carlos instances create -app kass", "-channel canary/rc", |
| } { |
| if !strings.Contains(body, want) { |