Files
loki/scripts
CatoandClaude Opus 5 5dc7e89d51 test(gate): a number written in prose must match what it counts (#845)
Someone writes "all 11 sections" beside an array of 11 things. The array grows
to 12. The sentence does not, because nothing is watching it — not tsc, not
eslint, not any test. The prose is now wrong and stays wrong, and it reads as
authoritative precisely because it sits next to the code.

Every claim this gate covers was ALREADY stale when it was written, and it
found all three before being told any answers:

  SettingsTabs.tsx      says 11 settings sections, but there are 12
  terminal-keys.ts      says 23 terminal keycaps, but there are 24
  telemetry-paths.ts    says 3 hourly cron timers, but there are 5

Fixed, and now gated.

WHY A GATE AND NOT THREE EDITS

This is the fourth stale number corrected by hand in a single sweep — the
Whisper model sizes, the /download artifact sizes, the 0.8.19 pin in
desktop/README, and "the 1845-line globals.css" (6073). A number that has gone
stale once will go stale again the moment the structure moves, and the person
who moves it has no reason to grep prose for arithmetic.

TWO THINGS THAT MAKE IT A GATE RATHER THAN DECORATION

A pattern pinned to a sentence silently stops matching when someone rewords
that sentence, and then reports success forever — which is the exact defect
found in scripts/smoke.sh this week, where the auth middleware answered 401
before routing so every probe passed whether the route existed or not. So a
non-matching pattern here is an assertion FAILURE that names the file and says
to fix the pattern in the same commit.

And it deliberately covers only what this repo can derive. The box being a
CX33, an artifact's size in MB, a model's download size — no source here
settles those, so they cannot be gated and should not be written down. The
sweep deleted several rather than restate them; the file says so, because the
next person will be tempted to add one.

Proven by mutation: adding a 13th tab to SettingsTabs makes it exit 1 naming
both numbers; restoring makes it exit 0. The mutation itself is asserted before
the result is trusted — a mutation that silently fails to apply produces a
"passing" gate that was never actually tested.

verify: exit 0.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 08:24:59 -07:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00