Copy: guard pending copy and the needs-you-ux keys
Every new runtime string of this branch is in copy.go and marked COPY REVIEW PENDING (done with each task through copy-status.py). This adds the guard: every pending entry resolves to text with no em dash and no exclamation mark, and none of the needs-you-ux keys is left without a review marker, pending or, once reviewed, accepted or approved. Paul reviews the group names, Send and No longer needed; Luna the rest. Plan task T5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+47
−0
internal/equipo/copy_pending_test.go+47 −0
CI failed — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/needs-you-ux: Type Size Avail | ext4 96G 84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 84G
ci-box: bwrap: fetched and verified in 0.4s
ci-box: claude: fetched and verified in 2.7s
ci-box: codex: fetched and verified in 3.6s
ci-box: codex-code-mode-host: fetched and verified in 1.5s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.0s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.3s
ci-box: clone deepened in 4.8s
ci-box: file times set from content: 3780 files, 245 directories
ci-box: ready in 17.7s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
--- FAIL: TestReleaseCopyReviewed (0.09s)
task_pages_test.go:236: COPY REVIEW REQUIRED: copy-status.py verify found copy pending review or stale bookkeeping
FAIL
rastrillo-budget/v1 ran 88ms
FAIL amadan.net/oficina/equipo/internal/equipotest 0.232s
FAIL
make: *** [Makefile:260: copy-release-check] Error 1
amadan: step copy failed: exit status 2
amadan: job failed at step copy — its output is above, not at the tail of this log
diff --git a/internal/equipo/copy_pending_test.go b/internal/equipo/copy_pending_test.go| new file mode 100644 |
| index 00000000..35c901c5 |
| --- /dev/null |
| +++ b/internal/equipo/copy_pending_test.go |
| @@ -0,0 +1,47 @@ |
| +package equipo |
| + |
| +import ( |
| + "os" |
| + "regexp" |
| + "strings" |
| + "testing" |
| +) |
| + |
| +// Copy waiting for review is still the house's words: every entry of |
| +// copy.go marked COPY REVIEW PENDING resolves to text that has no em |
| +// dash and no exclamation mark (AGENTS.md, Copy and verification). The |
| +// needs-you-ux keys (T5) are never unmarked: pending until reviewed, |
| +// then accepted or approved. |
| +func TestPendingCopyHouseRules(t *testing.T) { |
| + raw, err := os.ReadFile("copy.go") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + entry := regexp.MustCompile(`^\s*"([^"]+)":\s.*// COPY (REVIEW PENDING|ACCEPTED|APPROVED)`) |
| + marked := map[string]bool{} |
| + for _, line := range strings.Split(string(raw), "\n") { |
| + m := entry.FindStringSubmatch(line) |
| + if m == nil { |
| + continue |
| + } |
| + marked[m[1]] = true |
| + if m[2] != "REVIEW PENDING" { |
| + continue |
| + } |
| + text := copyText(m[1]) |
| + if text == "" || strings.ContainsAny(text, "—!") { |
| + t.Errorf("pending copy %s breaks the house rules: %q", m[1], text) |
| + } |
| + } |
| + for _, key := range []string{ |
| + "chat.card.ships_settled_ships", "chat.card.ships_settled_not_ships", |
| + "chat.card.question_dismissed", "chat.card.question_settled_answered", "chat.card.question_settled_not_needed", "chat.activity.settle_question", |
| + "work.needs.counts", "work.needs.group.blocking", "work.needs.group.blocking_hint", "work.needs.group.settings", "work.needs.group.settings_hint", |
| + "work.needs.coordinator", "work.needs.asked", "work.needs.why.question", "work.needs.why.merge_ships", "work.needs.why.merge_policy", "work.needs.why.place", |
| + "work.needs.ships_after", "work.needs.reply", "work.needs.send", "work.needs.not_needed", "work.needs.open_conversation", |
| + } { |
| + if !marked[key] { |
| + t.Errorf("%s has no review marker", key) |
| + } |
| + } |
| +} |