carlos / platform Public

region labels: CLI copy and docs reviewed by Luna under Paul's delegation (plan 2 task 8)

RC-8 drops "Use --region to choose another." where fewer than two regions
are available; RL-D2 rewritten as Luna gave it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 059cdde51297909e795a1d682ab5562c149f4d5b parent 1ddc692
6 files changed, +42 −6
  • apps_region.go +1 −1
  • apps_region_test.go +2 −1
  • docs/site/cli.md +1 −1
  • docs/superpowers/plans/LUNA-COPY-REVIEW-REGION-LABELS-2.md +30 −0
  • region_copy.go +7 −2
  • region_labels_e2e_test.go +1 −1
diff --git a/apps_region.go b/apps_region.go
index dfb60024f..d0fe08671 100644
--- a/apps_region.go
+++ b/apps_region.go
@@ -41,7 +41,7 @@ func printAppRegion(w io.Writer, res apiCreateAppResult, asked string, onFleet b
fmt.Fprintln(w, regionNotAppliedSwitchOff(placeOr(label, res.RegionName)))
case label != "":
// A labels console: whenever it answered (region labels §5 row 18).
- fmt.Fprintln(w, regionLabelledLine(label, res.RegionSource))
+ fmt.Fprintln(w, regionLabelledLine(label, res.RegionSource, res.RegionsAvailable))
case res.RegionsAvailable >= 2:
// An older console: today's line under today's rule.
fmt.Fprintln(w, regionCreatedLine(res.RegionName, res.RegionSource))
diff --git a/apps_region_test.go b/apps_region_test.go
index 5d6123d3e..cd4911433 100644
--- a/apps_region_test.go
+++ b/apps_region_test.go
@@ -216,7 +216,8 @@ func TestPrintAppRegionWithLabels(t *testing.T) {
}{
{"timezone", lab("timezone", 2), "", "Region: London (uk), from your timezone. Use --region to choose another.\n"},
{"ip", lab("ip", 2), "", "Region: London (uk), from your network location. Use --region to choose another.\n"},
- {"default, one region", lab("default", 1), "", "Region: London (uk), the platform default. Use --region to choose another.\n"},
+ {"default, one region", lab("default", 1), "", "Region: London (uk), the platform default.\n"},
+ {"default, two regions", lab("default", 2), "", "Region: London (uk), the platform default. Use --region to choose another.\n"},
{"chosen", lab("chosen", 3), "uk", "Region: London (uk).\n"},
{"switch off, asked", lab("default", 1), "au",
"This console is not assigning app regions yet, so --region was not applied. This app's instances start in London (uk).\n"},
diff --git a/docs/site/cli.md b/docs/site/cli.md
index 49ac3fa7e..e951654c8 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -184,7 +184,7 @@ carlos apps ttl --app tmp-docs 5d
carlos apps keep --app tmp-docs
```
-carlos apps list shows each app's own region, the one it was given when it was created, or the fleet it runs on. Where its new instances start can differ, for a pooled app for example: the app's Running page in the console says.
+carlos apps list shows each app's own region, the one it was given when it was created, or the fleet it runs on. Where new instances start can differ. For a pooled app, the app's Running page in the console shows where they start.
`carlos apps set` changes how the app's running instances take a new build:
diff --git a/docs/superpowers/plans/LUNA-COPY-REVIEW-REGION-LABELS-2.md b/docs/superpowers/plans/LUNA-COPY-REVIEW-REGION-LABELS-2.md
new file mode 100644
index 000000000..b59b75a0a
--- /dev/null
+++ b/docs/superpowers/plans/LUNA-COPY-REVIEW-REGION-LABELS-2.md
@@ -0,0 +1,30 @@
+# Luna's copy review: region labels, plan 2
+
+Model gpt-5.6-luna via codex exec, brief `LUNA-COPY-BRIEF-REGION-LABELS-2.md` at 1ddc6922. Answer below, unedited. Applied verbatim; every row of the brief is approved by Paul's delegation (memory: large-copy-decks-delegated). RC-8's shorter text is applied where Luna gave it a reason, a console with fewer than two regions available (one region, or app regions switched off); with two or more, RC-8 keeps "Use --region to choose another." as drafted.
+
+1. | ID | current | new | why |
+|---|---|---|---|
+| RC-5 | `Region: <place> (from your timezone). Use --region to choose another.` | `Region: <label>, from your timezone. Use --region to choose another.` | Uses the new label form. |
+| RC-6 | `Region: <place> (from your network location). Use --region to choose another.` | `Region: <label>, from your network location. Use --region to choose another.` | Uses the new label form. |
+| RC-7 | `Region: <place>.` | `Region: <label>.` | Uses the new label form. |
+| RC-8 | `Region: <place> (the platform default). Use --region to choose another.` | `Region: <label>, the platform default.` | Removes misleading advice when the flag is off. |
+| RC-17 | `live https://<host>` and corresponding lines without a place | `live https://<host> in <label>` and the same suffix on each line | Identifies where the host runs. |
+| RC-21 to RC-31 | Eleven strings containing `region <region>` | The same strings with `<place>` | Supports labels and legacy `region <code>`. |
+| RC-32 | Not present | `<host> is moving from <place> to <place>. read its database once the move has finished.` | Names both regions during a move. |
+| RL-C1 | No REGION column in the listed tables | `REGION` | Adds the column heading. |
+| RL-C2 | Not present | `region names could not be read, so each box shows the region it reports.` | Explains the fallback display. |
+| RL-D1 | Not present | `The REGION column names where each instance runs, as a place and a code, such as London (uk). While an instance moves, it also says which way.` | Explains the instance column. |
+| RL-D2 | Not present | `carlos apps list shows each app's own region, the one it was given when it was created, or the fleet it runs on. Where new instances start can differ. For a pooled app, the app's Running page in the console shows where they start.` | Fixes the incomplete final sentence. |
+| RL-D3 | Not present | `The REGION column names where each route or box runs, such as London (uk).` | Explains the route and status column. |
+
+2. Flagged rows:
+
+- RC-8 | The proposed sentence tells users to use `--region` even when the console ignores it. The revised text above removes that advice.
+- RL-D2 | The drafted final sentence is grammatically incomplete and does not say what the Running page shows.
+
+- 1: Confirmed. Without a label, existing C9 to C12 wording, table codes, and `region uk` remain unchanged.
+- 2: Yes. Remove the sentence because `--region` is ignored when the switch is off.
+- 3: Confirmed. A home box uses `the home region`.
+- 4: Confirmed. An empty table cell remains the existing dash.
+
+3. 12 changed, 2 flagged, 6 left alone.
\ No newline at end of file
diff --git a/region_copy.go b/region_copy.go
index b71c8f0a4..abd3bc7fd 100644
--- a/region_copy.go
+++ b/region_copy.go
@@ -23,8 +23,10 @@ func regionCreatedLine(place, source string) string {
// regionLabelledLine is RC-5 to RC-8 (region labels spec rev 5 §6): C9 to
// C12 for a console that sends the region's label, which carries its own
// "(code)", so the source follows a comma. An older console's answers keep
-// regionCreatedLine.
-func regionLabelledLine(label, source string) string {
+// regionCreatedLine. With fewer than two regions available (one region, or
+// a console not assigning app regions) --region cannot choose another, so
+// RC-8 says no more than the platform default (Luna, plan 2 review).
+func regionLabelledLine(label, source string, available int) string {
switch source {
case "timezone":
return fmt.Sprintf("Region: %s, from your timezone. Use --region to choose another.", label) // RC-5
@@ -33,6 +35,9 @@ func regionLabelledLine(label, source string) string {
case "chosen":
return fmt.Sprintf("Region: %s.", label) // RC-7
}
+ if available < 2 {
+ return fmt.Sprintf("Region: %s, the platform default.", label) // RC-8, one region
+ }
return fmt.Sprintf("Region: %s, the platform default. Use --region to choose another.", label) // RC-8
}
diff --git a/region_labels_e2e_test.go b/region_labels_e2e_test.go
index 152647a1f..aa0740ac0 100644
--- a/region_labels_e2e_test.go
+++ b/region_labels_e2e_test.go
@@ -128,7 +128,7 @@ func TestRegionLabelsCreateLinesThroughTheConsole(t *testing.T) {
t.Fatalf("instances create:\n%s", got)
}
if got := e.out(t, runAppsCreate, "-app", "cart", "-account", "ops"); !strings.Contains(got,
- "Region: Dublin (ie), the platform default. Use --region to choose another.") {
+ "Region: Dublin (ie), the platform default.\n") {
t.Fatalf("apps create on a switch-off console:\n%s", got)
}
}