store: the reviewed copy, with the em dashes gone
Paul's copy review of the 47 new strings this feature adds. One round of edits, then approved. The instruction was to lose the em dashes: "almost always you can do a full stop and a separate sentence". So seventeen strings now break where they used to hinge, and carry on in lower case, which is how the rest of this CLI reads. Two of them were a dash doing real work — the second half was a bare command with no verb — so those get one: "not approved for object storage. run `carlos store apply` to ask for it", server-side and CLI-side worded identically rather than left to drift apart. NOT changed: the shared "too many requests" refusal. The review approved a rewrite of it, but that sentence lives in 29 places across the console API that predate this branch, and every one of them would have moved on the back of a review that only ever showed it once. Applying it would have meant either rewriting copy nobody read, or leaving the console saying it two ways depending on which door you knocked on. It stays as it was, and the repo-wide pass is its own change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuiZoEUxEooEfFBAs8XPLB
4 files changed,
+25
−25
internal/console/apistore.go+4 −4internal/console/apistore_entitlement.go+9 −9internal/console/apistore_provision.go+4 −4store.go+8 −8
CI passed — run details
diff --git a/internal/console/apistore.go b/internal/console/apistore.go| index faf774dcc..cb5b74322 100644 |
| --- a/internal/console/apistore.go |
| +++ b/internal/console/apistore.go |
| @@ -335,11 +335,11 @@ func (s *Server) handleAPIStoreCreate(w http.ResponseWriter, r *http.Request) { |
| // plausibly the operator's grant landing. Re-read and re-ask; this |
| // door deliberately does not retry, because the thing it would be |
| // overwriting is the half it doesn't own. |
| - jsonError(w, http.StatusConflict, "the store record changed underneath you — try again") |
| + jsonError(w, http.StatusConflict, "the store record changed underneath you. try again") |
| return |
| } |
| log.Printf("console: api store create %s/%s: %v", acct.Sqid, app, err) |
| - jsonError(w, http.StatusBadGateway, "could not record the store — nothing was declared; try again") |
| + jsonError(w, http.StatusBadGateway, "could not record the store. nothing was declared; try again") |
| return |
| } |
| // Audited, unlike a read: this is the request an operator will act on by |
| @@ -398,7 +398,7 @@ func (s *Server) handleAPIStoreGet(w http.ResponseWriter, r *http.Request) { |
| out, err := s.storeReply(ctx, acct, app, rec) |
| if err != nil { |
| log.Printf("console: api store delivery %s/%s: %v", acct.Sqid, app, err) |
| - jsonError(w, http.StatusBadGateway, "could not read the store's status — try again") |
| + jsonError(w, http.StatusBadGateway, "could not read the store's status. try again") |
| return |
| } |
| writeJSON(w, http.StatusOK, out) |
| @@ -619,7 +619,7 @@ func (s *Server) handleAPIStoreGrant(w http.ResponseWriter, r *http.Request) { |
| // The operator's verb never invents the member's half: the env prefix |
| // is the member's choice and there is nothing to deliver into. |
| jsonError(w, http.StatusConflict, |
| - "no store is declared for this app — run `carlos store create` first") |
| + "no store is declared for this app. run `carlos store create` first") |
| return |
| case err != nil: |
| // Logged, not returned: a backend error carries bucket names, ARNs, |
diff --git a/internal/console/apistore_entitlement.go b/internal/console/apistore_entitlement.go| index de21df4a7..dc40d6d8b 100644 |
| --- a/internal/console/apistore_entitlement.go |
| +++ b/internal/console/apistore_entitlement.go |
| @@ -61,7 +61,7 @@ func (s *Server) handleAPIStoreApply(w http.ResponseWriter, r *http.Request) { |
| e, etag, err := objstore.GetEntitlement(ctx, s.cfg.Releases, acct.Sqid) |
| if err != nil { |
| log.Printf("console: api store apply %s: read entitlement: %v", acct.Sqid, err) |
| - jsonError(w, http.StatusBadGateway, "could not read the storage application — try again") |
| + jsonError(w, http.StatusBadGateway, "could not read the storage application. try again") |
| return |
| } |
| if e != nil && e.Approved() { |
| @@ -71,11 +71,11 @@ func (s *Server) handleAPIStoreApply(w http.ResponseWriter, r *http.Request) { |
| e = &objstore.Entitlement{Applied: &objstore.Applied{By: p.Address, At: time.Now(), Note: strings.TrimSpace(req.Note)}} |
| if _, err := objstore.PutEntitlement(ctx, s.cfg.Releases, acct.Sqid, e, etag); err != nil { |
| if errors.Is(err, release.ErrCASConflict) { |
| - jsonError(w, http.StatusConflict, "the storage application changed — try again") |
| + jsonError(w, http.StatusConflict, "the storage application changed. try again") |
| return |
| } |
| log.Printf("console: api store apply %s: write entitlement: %v", acct.Sqid, err) |
| - jsonError(w, http.StatusBadGateway, "could not save the storage application — try again") |
| + jsonError(w, http.StatusBadGateway, "could not save the storage application. try again") |
| return |
| } |
| s.audit(acct, "", p.Address, "store-apply", e.Applied.Note) |
| @@ -155,7 +155,7 @@ func (s *Server) handleAPIStoreDecision(w http.ResponseWriter, r *http.Request, |
| e, etag, err := objstore.GetEntitlement(ctx, s.cfg.Releases, acct.Sqid) |
| if err != nil { |
| log.Printf("console: api store decision %s: read entitlement: %v", acct.Sqid, err) |
| - jsonError(w, http.StatusBadGateway, "could not read the storage application — try again") |
| + jsonError(w, http.StatusBadGateway, "could not read the storage application. try again") |
| return |
| } |
| if e == nil || e.Applied == nil { |
| @@ -168,11 +168,11 @@ func (s *Server) handleAPIStoreDecision(w http.ResponseWriter, r *http.Request, |
| } |
| if _, err := objstore.PutEntitlement(ctx, s.cfg.Releases, acct.Sqid, e, etag); err != nil { |
| if errors.Is(err, release.ErrCASConflict) { |
| - jsonError(w, http.StatusConflict, "the storage application changed — try again") |
| + jsonError(w, http.StatusConflict, "the storage application changed. try again") |
| return |
| } |
| log.Printf("console: api store decision %s: write entitlement: %v", acct.Sqid, err) |
| - jsonError(w, http.StatusBadGateway, "could not save the storage decision — try again") |
| + jsonError(w, http.StatusBadGateway, "could not save the storage decision. try again") |
| return |
| } |
| detail := reason |
| @@ -198,7 +198,7 @@ func (s *Server) handleAPIStoreApprovals(w http.ResponseWriter, r *http.Request) |
| keys, err := s.cfg.Releases.List(ctx, "store/entitlements/") |
| if err != nil { |
| log.Printf("console: api store approvals: list entitlements: %v", err) |
| - jsonError(w, http.StatusBadGateway, "could not list storage applications — try again") |
| + jsonError(w, http.StatusBadGateway, "could not list storage applications. try again") |
| return |
| } |
| applications := make([]*objstore.Entitlement, 0) |
| @@ -214,7 +214,7 @@ func (s *Server) handleAPIStoreApprovals(w http.ResponseWriter, r *http.Request) |
| acct, err := s.store.AccountBySqid(acctID) |
| if err != nil { |
| log.Printf("console: api store approvals: account lookup %s: %v", acctID, err) |
| - jsonError(w, http.StatusBadGateway, "could not list storage applications — try again") |
| + jsonError(w, http.StatusBadGateway, "could not list storage applications. try again") |
| return |
| } |
| if acct == nil { |
| @@ -223,7 +223,7 @@ func (s *Server) handleAPIStoreApprovals(w http.ResponseWriter, r *http.Request) |
| e, _, err := objstore.GetEntitlement(ctx, s.cfg.Releases, acctID) |
| if err != nil { |
| log.Printf("console: api store approvals: read %s: %v", key, err) |
| - jsonError(w, http.StatusBadGateway, "could not list storage applications — try again") |
| + jsonError(w, http.StatusBadGateway, "could not list storage applications. try again") |
| return |
| } |
| if e != nil && e.Pending() { |
diff --git a/internal/console/apistore_provision.go b/internal/console/apistore_provision.go| index 485789db2..090356ff2 100644 |
| --- a/internal/console/apistore_provision.go |
| +++ b/internal/console/apistore_provision.go |
| @@ -55,11 +55,11 @@ func (s *Server) handleAPIStoreProvision(w http.ResponseWriter, r *http.Request) |
| pub, acct.Sqid, app, e.Decision.By, objstore.GrantSourceAccountApproval, "", time.Now()) |
| switch { |
| case errors.Is(err, objstore.ErrNotDeclared): |
| - jsonError(w, http.StatusConflict, "no store is declared for this app — run `carlos store create` first") |
| + jsonError(w, http.StatusConflict, "no store is declared for this app. run `carlos store create` first") |
| return |
| case err != nil: |
| log.Printf("console: api store provision %s/%s: %v", acct.Sqid, app, err) |
| - jsonError(w, http.StatusBadGateway, "could not provision the store — re-run `carlos store create` to resume; after destroying a store, its bucket name may take time to become available again") |
| + jsonError(w, http.StatusBadGateway, "could not provision the store. re-run `carlos store create` to resume; after destroying a store, its bucket name may take time to become available again") |
| return |
| } |
| s.audit(acct, app, actor, "store-provision", "provisioned a store in bucket "+storeBucketName(rec)+" (cli)") |
| @@ -71,11 +71,11 @@ func (s *Server) storeProvisionApproval(ctx context.Context, w http.ResponseWrit |
| e, _, err := objstore.GetEntitlement(ctx, s.cfg.Releases, acct.Sqid) |
| if err != nil { |
| log.Printf("console: api store provision %s: read entitlement: %v", acct.Sqid, err) |
| - jsonError(w, http.StatusBadGateway, "could not read the storage application — try again") |
| + jsonError(w, http.StatusBadGateway, "could not read the storage application. try again") |
| return nil, false |
| } |
| if !e.Approved() { |
| - jsonError(w, http.StatusForbidden, "this account is not approved for object storage — `carlos store apply`") |
| + jsonError(w, http.StatusForbidden, "this account is not approved for object storage. run `carlos store apply` to ask for it") |
| return nil, false |
| } |
| return e, true |
diff --git a/store.go b/store.go| index 6c6277912..cf2e1f1af 100644 |
| --- a/store.go |
| +++ b/store.go |
| @@ -414,10 +414,10 @@ func printStoreCreate(w io.Writer, res apiStoreReply) { |
| if res.Entitlement.Approved() { |
| verb = "create" |
| } |
| - warnf(w, "credentials are not fully delivered: %s — re-run `carlos store %s --app %s` to repair", |
| + warnf(w, "credentials are not fully delivered: %s. re-run `carlos store %s --app %s` to repair", |
| strings.Join(res.MissingVars, ", "), verb, res.App) |
| } else { |
| - mutedf(w, "credentials are sealed into the app's config — running instances pick them up within seconds") |
| + mutedf(w, "credentials are sealed into the app's config. running instances pick them up within seconds") |
| } |
| return |
| } |
| @@ -452,7 +452,7 @@ func printStoreGrant(w io.Writer, res apiStoreReply) { |
| p := res.Provisioned |
| fmt.Fprintf(w, "%s %s — bucket %s in %s, user %s\n", |
| c.ok("store granted for"), res.App, p.Bucket, p.Region, p.IAMUser) |
| - mutedf(w, "credentials are sealed into the app's config — running instances pick them up within seconds") |
| + mutedf(w, "credentials are sealed into the app's config. running instances pick them up within seconds") |
| } |
| // printStoreRotate answers both `carlos store rotate` and `carlos store |
| @@ -516,9 +516,9 @@ func printStoreStatus(w io.Writer, res apiStoreReply) { |
| p.Bucket, p.Region, p.IAMUser, p.KeyID, p.At.Format(time.RFC3339)) |
| } else { |
| if res.Entitlement.Approved() { |
| - mutedf(w, " nothing is provisioned yet — re-run carlos store create --app %s", res.App) |
| + mutedf(w, " nothing is provisioned yet. re-run carlos store create --app %s", res.App) |
| } else { |
| - mutedf(w, " nothing is provisioned yet — waiting on a deployment operator (carlos store grant --app %s)", res.App) |
| + mutedf(w, " nothing is provisioned yet. waiting on a deployment operator (carlos store grant --app %s)", res.App) |
| } |
| } |
| @@ -539,7 +539,7 @@ func printStoreStatus(w io.Writer, res apiStoreReply) { |
| if res.Entitlement.Approved() { |
| verb = "create" |
| } |
| - warnf(w, "drift: %s not yet delivered to this app's config — re-run `carlos store %s --app %s` to "+ |
| + warnf(w, "drift: %s not yet delivered to this app's config. re-run `carlos store %s --app %s` to "+ |
| "repair (this rotates the credential)", strings.Join(res.MissingVars, ", "), verb, res.App) |
| } |
| } |
| @@ -548,13 +548,13 @@ func printStoreEntitlement(w io.Writer, entitlement *objstore.Entitlement) { |
| switch { |
| case entitlement.Approved(): |
| case entitlement.Declined(): |
| - warnf(w, "object storage was declined: %s — the account owner may apply again", |
| + warnf(w, "object storage was declined: %s. the account owner may apply again", |
| entitlement.Decision.Reason) |
| case entitlement.Pending(): |
| mutedf(w, "applied by %s on %s, waiting for a deployment operator", |
| entitlement.Applied.By, entitlement.Applied.At.Format(time.RFC3339)) |
| default: |
| - mutedf(w, "this account is not approved for object storage — `carlos store apply`") |
| + mutedf(w, "this account is not approved for object storage. run `carlos store apply` to ask for it") |
| } |
| } |