Files
ersatztv/scripts/tests
timothy 7271fd9ab6 fix(803,664): round 6 — withdraw the clever half of the jq detector; the retraction regenerated one paragraph below its own fix
Fourth cold review, scoped to round 4. It found no Blocker and no High, and confirmed the
retraction sweep was complete, the ci-cd.md correction accurate, the notice string safe and
test-compatible, and the fixture edits behaviour-preserving.

THE DETECTOR IS NOW ITS THIRD VERSION, AND THE THIRD VERSION IS THE DUMBEST ONE ON PURPOSE.
Round 4 matched `"jq -e" in line`. Round 5 replaced that with a parse of the LEADING option
tokens, stopping at the first non-option because everything after is the jq program. Review
named two false negatives that reasoning bought: `jq --argjson e 1 -e '.'` (the walk stops at
the bare `e` argument) and `jq '.a' -e` (jq accepts options after the filter). That is three
defects in one string-matching predicate, which is this repo's documented signal to stop
adding cases and remove the cleverness. It now scans EVERY token after each `jq` with no
attempt to locate the program. That over-approximates, and the over-approximation is the safe
direction for a guard over one 36-line function we own: a false positive costs a rewrite, a
false negative restores the jq-1.6 divergence inside the code that writes a required status.
Verified no false positive against the real body — its six jq reads carry no `-`-prefixed
token but `-r`.

Proved on the regression review called MOST LIKELY rather than only the obvious one: every
read in that function is already `jq -r`, so the natural way `-e` returns is clustered onto
one of them. `jq -re 'length'` reddens the guard; so does `jq '.a' -e`.

THE RETRACTION REGENERATED ITSELF ONE PARAGRAPH BELOW ITS OWN FIX. Round 4 qualified the
self-trigger claim in the paragraph at the head of `count_pr_mutations` and in the notice, and
left the paragraph two lines further down asserting "the termination argument transfers
UNCHANGED from the base axis: a push fires `synchronize`" — the exact unqualified form, in the
paragraph a reader goes to for the safety property. Fixed, with the first-push window named
inline rather than by reference.

Also: the head-fence notice said the PR "needs a re-trigger (any edit will do)", which is
false — a label or a comment fires none of this workflow's `types:`, so a reader following
that advice would conclude the gate is broken. It now names a push or a title/body/base edit.

The brace-counting extraction could not distinguish "captured the function" from "stopped at a
balanced prefix", so a `jq -e` past an early depth-0 was invisible while the guard reported
success. It now pins a line from the END of the body.

Two doc nits: `docs/ci-cd.md` still singled out `null` in its tail after the edit that made
both shapes symmetric (and then read "an empty first page is anomalous rather than empty");
the record's rename note parsed ambiguously as "and then".

PROCESS NOTE, because it nearly cost the round: restoring a mutated file with
`git checkout -- <file>` restored it from the INDEX, silently discarding every uncommitted
edit of this round in that file. Caught by grepping for the edits rather than trusting the
restore. Mutation loops here back up with `cp` and restore with `cp`.

Verification: 1129 passed, 2 skipped; ruff clean; decisions-validate OK; YAML parses, and
every mutant parsed before being measured.
2026-08-28 23:22:08 +02:00
..