repo-mailbox/scripts
Kjell Tore Guttormsen 4369499e4b fix(board): consume coord-count's exit status, not just its stdout
F5 gave coord-count.sh a three-status contract (0 counted, 2 usage error,
3 mailbox root absent) so it could SAY the measurement failed instead of
rendering a reassuring value. board.sh threw that signal away: every call
site piped it into awk, and a pipeline reports the LAST stage's status,
so the producer's exit code was discarded at each one. HAVE_COUNT only
ever tested that the sibling FILE exists - a strictly weaker question.

Measured on 0.30.0 with a mailbox root that does not exist: coord-count
printed "not counted, not zero" and exited 3, while --brief answered
"Ingen repo skylder noen et svar i dag." and --plan emitted no advarsel=
key at all. A gate that can fail whose consumer does not listen is a gate
that does not fall.

COUNT_OK is now the measurement's verdict, and COUNT_WHY carries the exact
reason - including the status number - into all five reporting sites. The
two causes stay distinguishable: "the sibling is missing" and "the world
you named is not there" are different repairs. Any nonzero is caught, not
3 specifically, and a partial stdout captured before a failure is
discarded because a half-count also looks measured. --brief's three
separate coord-count invocations collapse to one: with a status to honour,
three runs would mean three statuses to reconcile.

board.sh stays read-only. The table and --plain views still never invoke
coord-count at all, and COUNT_WHY says so rather than claiming a
measurement nobody attempted.

Bounded gap, stated rather than closed: the table's own INN/ORDRE/FLY
columns count with ls and read 0 for every repo when the mailbox root is
absent. Same defect shape, different source - not a coord-count consumer,
so exit 3 cannot reach it, and the order warned by name against silent
widening.

TDD: board-selftest.sh section 27 written first and RED (7 failures)
before board.sh was touched, behind six known-positive controls and a
ground-truth assertion that coord-count really does exit 3 on that input.
Mutation-verified: restoring `if true` in place of the status test turns
exactly those seven red and leaves all six controls green.

Suites under real /bin/bash 3.2: board 314/314 (was 300), coord 242/242,
route 69/69, orders 110/110, guard 54/54.

No version bump: 0.30.0 shipped two days ago, and this adds no flag, no
exit code and no env var - it repairs an existing consumer. Recommend it
rides the next collection rather than minting a release of its own; the
operator decides, and the catalog owns the tag.

Order: 20260826T115026Z-9982513971-from-.claude

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 07:10:21 +02:00
..
board-selftest.sh fix(board): consume coord-count's exit status, not just its stdout 2026-08-29 07:10:21 +02:00
board.sh fix(board): consume coord-count's exit status, not just its stdout 2026-08-29 07:10:21 +02:00
brief-nightly.sh feat(brief): render the nightly cross-repo briefing without a model 2026-08-01 22:38:46 +02:00
coord-count.sh fix(infra): a failed measurement must never render as a reassuring value 2026-08-26 12:15:05 +02:00
coord-done.sh feat(engine): make a bulk close state what Rule 7 says must be stated 2026-07-31 15:48:42 +02:00
coord-inbox.sh feat(engine): let a message say it needs no answer, and count debt without losing sight of the rest 2026-07-31 15:46:14 +02:00
coord-order-claim.sh fix(orders): call the order-verbs by absolute path, not bare PATH names 2026-08-18 09:16:59 +02:00
coord-order-done.sh fix(orders): narrow the return-reason escape so a plain arrow survives 2026-08-17 21:24:37 +02:00
coord-order-inbox.sh fix(orders): call the order-verbs by absolute path, not bare PATH names 2026-08-18 09:16:59 +02:00
coord-order-send.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
coord-selftest.sh fix(infra): a failed measurement must never render as a reassuring value 2026-08-26 12:15:05 +02:00
coord-send.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
coord-sweep.sh fix(coord-send): stop rejecting dot-prefixed repo names 2026-08-09 21:09:23 +02:00
orders-selftest.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
route-selftest.sh feat(route)!: Fable rows are a hand-written override, never a route.sh outcome 2026-08-09 22:03:05 +02:00
route.sh feat(route)!: Fable rows are a hand-written override, never a route.sh outcome 2026-08-09 22:03:05 +02:00
state-line-guard-selftest.sh fix(infra): a failed measurement must never render as a reassuring value 2026-08-26 12:15:05 +02:00