carlos / platform Public

copy: PB-C13..C17 approved, with their checks

Paul approved PB-C13..C17 unchanged in copy review on 2026-11-01. Their
rows go in the copy deck, and the gate's row parser now reads `\|` as a
literal pipe so PB-C17 (on | off) keeps six cells.

TestAPITelemetryProtectionAuditLine checks the two Activity rows a
protection-only PUT writes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev e15db27ce47bb269b6bc042336287b05076d36a6 parent 767b653
3 files changed, +49 −4
  • docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md +11 −1
  • internal/console/approved_burst_copy_test.go +14 −3
  • internal/console/protectionsetting_test.go +24 −0

CI passed — run details

diff --git a/docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md b/docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md
index 8b9e4b498..ace0cf0bc 100644
--- a/docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md
+++ b/docs/superpowers/plans/2026-10-31-probe-burst-limit-copy.md
@@ -11,7 +11,7 @@ The rules (the same as the Protection tab deck,
`2026-10-30-console-protection-tab-copy.md`):
- One table, columns `| id | where | old | new | checked by | status |`. A row
- is one line.
+ is one line. A pipe inside a cell is written `\|`.
- `where` is a path relative to the repository root, then a short location
note in parentheses. The gate searches the file named by the first token.
- `new` is the approved text, used verbatim by the task that writes it. `old`
@@ -41,3 +41,13 @@ The rules (the same as the Protection tab deck,
| PB-C10 | protection_cmd.go (CLI help) | (new) | carlos protection [--account a] [--app x] [--record-only on|off]: show or set whether protection only records on this app | gate | approved |
| PB-C11 | protection_cmd.go (CLI result, on) | (new) | Protection records only on {app}. Nothing is blocked. | TestProtectionCmdSetsAndShows | approved |
| PB-C12 | protection_cmd.go (CLI result, off) | (new) | Protection can block on {app} again. | TestProtectionCmdSetsAndShows | approved |
+
+PB-C13..C17 approved 2026-11-01 by Paul in copy review, unchanged from the draft.
+
+| id | where | old | new | checked by | status |
+| --- | --- | --- | --- | --- | --- |
+| PB-C13 | internal/console/protectionsetting.go (Activity line, console, on) | (new) | set protection to record only for this app | gate | approved |
+| PB-C14 | internal/console/protectionsetting.go (Activity line, console, off) | (new) | set protection to block again for this app | gate | approved |
+| PB-C15 | internal/console/apierrors.go (Activity line, CLI/API, on) | (new) | set protection to record only | TestAPITelemetryProtectionAuditLine | approved |
+| PB-C16 | internal/console/apierrors.go (Activity line, CLI/API, off) | (new) | set protection to block again | TestAPITelemetryProtectionAuditLine | approved |
+| PB-C17 | protection_cmd.go (flag help for --record-only) | (new) | on \| off | gate | approved |
diff --git a/internal/console/approved_burst_copy_test.go b/internal/console/approved_burst_copy_test.go
index 68e564aa3..afd5caa5f 100644
--- a/internal/console/approved_burst_copy_test.go
+++ b/internal/console/approved_burst_copy_test.go
@@ -39,6 +39,13 @@ var burstCopyBuilt = map[string]bool{
"PB-C10": true,
"PB-C11": true,
"PB-C12": true,
+ // Task 5 and the Activity line: the record-only audit rows and the
+ // `--record-only` flag help (on | off).
+ "PB-C13": true,
+ "PB-C14": true,
+ "PB-C15": true,
+ "PB-C16": true,
+ "PB-C17": true,
}
func parseBurstCopyDeck(t *testing.T) []navCopyRow {
@@ -58,10 +65,14 @@ func parseBurstCopyDeck(t *testing.T) []navCopyRow {
if len(cells) != 6 {
t.Fatalf("deck row has %d cells, want 6: %.60q", len(cells), line)
}
+ // A pipe inside a cell is escaped as `\|` so the split above leaves it
+ // alone; put the literal pipe back before the text is compared.
+ for i := range cells {
+ cells[i] = strings.ReplaceAll(strings.TrimSpace(cells[i]), `\|`, "|")
+ }
rows = append(rows, navCopyRow{
- ID: strings.TrimSpace(cells[0]), Where: strings.TrimSpace(cells[1]),
- Old: strings.TrimSpace(cells[2]), New: strings.TrimSpace(cells[3]),
- CheckedBy: strings.TrimSpace(cells[4]), Status: strings.TrimSpace(cells[5]),
+ ID: cells[0], Where: cells[1], Old: cells[2], New: cells[3],
+ CheckedBy: cells[4], Status: cells[5],
})
}
return rows
diff --git a/internal/console/protectionsetting_test.go b/internal/console/protectionsetting_test.go
index 2e112b524..344de2c57 100644
--- a/internal/console/protectionsetting_test.go
+++ b/internal/console/protectionsetting_test.go
@@ -240,6 +240,30 @@ func TestAPITelemetryProtectionOnlyBumps(t *testing.T) {
}
}
+// The Activity line a protection-only PUT writes (deck PB-C15 and PB-C16): an
+// on and then an off each leave one row, and the row names what that call set.
+func TestAPITelemetryProtectionAuditLine(t *testing.T) {
+ fx, _ := ptFixture(t)
+ putURL := fx.ts.URL + "/api/cli/apps/" + fx.sqid + "/shop/telemetry"
+ owner := cliToken(t, fx, "paul@keymail.dev", "code-ps-audit")
+ for _, body := range []string{`{"protection":{"mode":"record"}}`, `{"protection":{"mode":""}}`} {
+ if status, _, resp := rawReq(t, http.MethodPut, putURL, owner, body); status != http.StatusOK {
+ t.Fatalf("%s = %d %s", body, status, resp)
+ }
+ }
+ // The feed is newest first: the off, then the on.
+ rows := psAudits(t, fx)
+ if len(rows) != 2 {
+ t.Fatalf("audit rows %+v, want 2", rows)
+ }
+ if rows[0].Detail != "set protection to block again" {
+ t.Fatalf("off row detail %q", rows[0].Detail)
+ }
+ if rows[1].Detail != "set protection to record only" {
+ t.Fatalf("on row detail %q", rows[1].Detail)
+ }
+}
+
// The read beside the PUT: the app's stored settings as stored, under the
// PUT's gate (Operate, and a person must own the account).
func TestAPITelemetryGet(t *testing.T) {