carlos / platform Public

console, cli: approved copy for the HA pool path (supplementary)

G6 pool Task 8, second half: console.refusal.ha_pool_mismatch and
cli.apps_create.ha_unconfirmed take Paul's approved text verbatim
(supplementary review m4znh5chevof75qxxjtppkv5ja, no edits).
TestNoCopyPendingStrings fails on any COPY-PENDING placeholder left in
console or root sources; TestApprovedAppsCreateHACopy pins both CLI
strings. Census re-proposed (envelope . only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9adcc082a705ac2463421e7b702b5e7c76aeb945 parent 0fe6047
5 files changed, +56 −8
  • apps.go +3 −2
  • apps_ha_test.go +17 −0
  • internal/console/approved_ha_pool_copy_test.go +31 −0
  • internal/console/hapoolcopy.go +4 −5
  • internal/provision/testdata/plan14-root-reads-g6-pool.tsv +1 −1

Intent

Human

<task-notification> <task-id>bt2x0ok85</task-id> <tool-use-id>toolu_01Bmxy5HTWwq2TiLZadin8xu</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/d74fdcaf-25e8-46de-8432-e296d1e3c8b4/tasks/bt2x0ok85.output</output-file> <status>killed</status> <summary>Background command "Wait for Paul's supplementary review result" was stopped after reaching its background time limit</summary> <note>If the work in progress still needs it, start it again with `run_in_background` and a longer `timeout`. If it already had the longest `timeout` allowed, do not restart it. Either way, report that it was stopped.</note> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="0cd45aad-b413-4352-8994-f4b975efe35f"> Agent manager 8a3d302: (c) then (a). Read the new box&apos;s journal around 07:00:50-07:01:00Z first (maintenance document, read-only): why did it wake heldwitness at start-up, and why was that release unclean. If it shows a never-replicated wake (txid 0, nothing written, settled), which the containment rule treats as harmless and opens at once, continue to step 4 (remove B) and box_count 2 under the same stop rules, and file the start-up wake as a follow-up discussion. If the journal shows anything written or a sync failure, stop and tell me. </paseo-system>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="75e6a763-86ba-478d-a815-42a48239fa0b"> Agent manager 8a3d302: the bucket evidence is enough: only the two lock.json versions, no LTX, no build-state. Continue to (a): remove B, then box_count 2, same stop rules. No root shell. File the start-up wake as a follow-up discussion with the bucket timeline, and note that the maintenance document has no journal read (worth a read-only journal verb). </paseo-system>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="bc57fa8c-f43f-4514-a124-c46165aef362"> Agent manager 8a3d302: excellent window, thank you. Agreed to leave the section 6 large-load exit test until the first app&apos;s size is known; note it as owed on the card. Carry on with the pool merge. </paseo-system>

diff --git a/apps.go b/apps.go
index 7eabf8909..16d51a5ae 100644
--- a/apps.go
+++ b/apps.go
@@ -638,10 +638,11 @@ func runAppsCreate(args []string) {
}
}
-// COPY-PENDING until the approved sentences land (copy ids in the names).
+// Approved copy (G6 reviews wlbznpwwh6cd7eo3ginvljcveu and
+// m4znh5chevof75qxxjtppkv5ja); pinned by TestApprovedAppsCreateHACopy.
const (
flagHAAppsCreate = "turn on high availability (needs --region; only for accounts that have it)"
- appsCreateHAUnconfirmed = "COPY-PENDING:cli.apps_create.ha_unconfirmed:%s"
+ appsCreateHAUnconfirmed = "app %s was created without high availability, because this console doesn't support it yet. High availability can't be added to an existing app."
)
// haMismatchErr is nil unless --ha was asked and the console did not echo
diff --git a/apps_ha_test.go b/apps_ha_test.go
index 6c09d3a5f..d254a16a6 100644
--- a/apps_ha_test.go
+++ b/apps_ha_test.go
@@ -109,3 +109,20 @@ func TestAppsCreateHAAgainstOlderConsole(t *testing.T) {
t.Fatalf("control: err=%v body=%v output=%s", err, got, out)
}
}
+
+// TestApprovedAppsCreateHACopy pins the two CLI strings to Paul's approved
+// text (G6 copy reviews wlbznpwwh6cd7eo3ginvljcveu and
+// m4znh5chevof75qxxjtppkv5ja).
+func TestApprovedAppsCreateHACopy(t *testing.T) {
+ for _, c := range []struct{ id, got, want string }{
+ {"cli.apps_create.ha_flag", flagHAAppsCreate, "turn on high availability (needs --region; only for accounts that have it)"},
+ {"cli.apps_create.ha_unconfirmed", appsCreateHAUnconfirmed, "app %s was created without high availability, because this console doesn't support it yet. High availability can't be added to an existing app."},
+ } {
+ if c.got != c.want {
+ t.Errorf("%s = %q, want the approved %q", c.id, c.got, c.want)
+ }
+ }
+ if n := strings.Count(appsCreateHAUnconfirmed, "%s"); n != 1 {
+ t.Errorf("cli.apps_create.ha_unconfirmed has %d %%s, want 1", n)
+ }
+}
diff --git a/internal/console/approved_ha_pool_copy_test.go b/internal/console/approved_ha_pool_copy_test.go
index 7f8f8c3d2..5189423ef 100644
--- a/internal/console/approved_ha_pool_copy_test.go
+++ b/internal/console/approved_ha_pool_copy_test.go
@@ -1,6 +1,8 @@
package console
import (
+ "os"
+ "path/filepath"
"strings"
"testing"
)
@@ -18,6 +20,7 @@ func TestApprovedHAPoolCopy(t *testing.T) {
{"console.refusal.ha_region", haCopyRegion, "high availability isn't available in %s."},
{"console.refusal.ha_needs_region", haCopyNeedsRegion, "choose a region to turn on high availability."},
{"console.refusal.ha_region_locked", haCopyRegionLocked, "this app has high availability on, so its region can't be changed."},
+ {"console.refusal.ha_pool_mismatch", haCopyPoolMismatch, "this app's instance setup doesn't match its high availability setting. Contact support."},
{"console.refusal.ha_swap_concurrency", haCopySwapConcurrency, "apps with high availability on swap one instance at a time."},
} {
if c.got != c.want {
@@ -36,3 +39,31 @@ func TestApprovedHAPoolCopy(t *testing.T) {
}
}
}
+
+// TestNoCopyPendingStrings fails while any console source, template or
+// root-package (non-test) file still carries a COPY-PENDING placeholder.
+func TestNoCopyPendingStrings(t *testing.T) {
+ var files []string
+ for _, pat := range []string{"*.go", "templates/*.html", "../../*.go"} {
+ m, err := filepath.Glob(pat)
+ if err != nil {
+ t.Fatal(err)
+ }
+ files = append(files, m...)
+ }
+ if len(files) < 10 {
+ t.Fatalf("found only %d files; the walk is broken", len(files))
+ }
+ for _, f := range files {
+ if strings.HasSuffix(f, "_test.go") {
+ continue
+ }
+ b, err := os.ReadFile(f)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if strings.Contains(string(b), "COPY-PENDING:") {
+ t.Errorf("%s still holds a COPY-PENDING placeholder", f)
+ }
+ }
+}
diff --git a/internal/console/hapoolcopy.go b/internal/console/hapoolcopy.go
index 793fe11ff..169f7f14d 100644
--- a/internal/console/hapoolcopy.go
+++ b/internal/console/hapoolcopy.go
@@ -2,10 +2,9 @@ package console
// The G6 pool path's member-facing strings, approved verbatim in Paul's G6
// copy review (wlbznpwwh6cd7eo3ginvljcveu) and pinned by
-// approved_ha_pool_copy_test.go. Tests assert on the constants, never on a
-// literal. haCopyPoolMismatch was added by the plan and goes through a
-// supplementary review; the branch does not merge while any COPY-PENDING
-// string remains.
+// approved_ha_pool_copy_test.go; haCopyPoolMismatch in the supplementary
+// review (m4znh5chevof75qxxjtppkv5ja). Tests assert on the constants, never
+// on a literal.
const (
// haCopyLabel is the app create form's checkbox label.
haCopyLabel = "High availability"
@@ -32,7 +31,7 @@ const (
// haCopyPoolMismatch is the enable door's 409 when an existing
// manifest names another pool (only an operator's store-mode write can
// cause it).
- haCopyPoolMismatch = "COPY-PENDING:console.refusal.ha_pool_mismatch"
+ haCopyPoolMismatch = "this app's instance setup doesn't match its high availability setting. Contact support."
)
// haPoolNotAllowedCode is the pool gate's machine-readable code, beside the
diff --git a/internal/provision/testdata/plan14-root-reads-g6-pool.tsv b/internal/provision/testdata/plan14-root-reads-g6-pool.tsv
index 36e005ff5..d7d40cf63 100644
--- a/internal/provision/testdata/plan14-root-reads-g6-pool.tsv
+++ b/internal/provision/testdata/plan14-root-reads-g6-pool.tsv
@@ -1,3 +1,3 @@
# Census overlay g6-pool, written by census-propose (#369). census-ruling-g6-pool, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-g6-pool.md.
# 0 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-@coverage . a775eefd972b9a2f49a4d5b2014e1616b1b5bc8df9ef5036fe02284e5ca4ce4c
+@coverage . bde513a43cc506d3d9fd799ec72a25b240c9fc46fbdc28593e7c8fa2f9a9d3ad