Files
ersatztv/scripts/tests
timothy 61222fc3a5 fix(742): split ex_attributable from ex_human; correct the raced-check rationale
Cold review round 1 (two independent agents) found the first draft narrowed BOTH
readers of the verdict row, not just inheritance.

* `read_existing_verdict` is called twice. The second call is the last-moment re-read,
  which asks "did a reviewer post a verdict while we were classifying" — the mirror-image
  question. Gating the single flag made the job stop abstaining and post its exemption
  straight over a mid-run row, and the post-write repair does NOT cover that: it is skipped
  whenever the high-water mark could not be established. Reproduced red first, then fixed:
  `test_the_MID_RUN_abstain_still_fires_for_a_NON_allowlisted_creator`.
* Splitting the flags broke the invariant that made the re-read work at all — the two calls
  used to compute an IDENTICAL predicate, so anything firing at the second and not the first
  had arrived in between. A pre-existing row declined for inheritance is still attributable,
  so the re-read abstained on the very row the classification had decided to overwrite and
  posted nothing. Seven tests went red on exactly that. The state/creator/description triple
  from the first read is now snapshotted and compared, making "changed" explicit.
* The stated reason for keeping the post-write raced check broad was asserted, not checked:
  a genuine reviewer is on the list by construction, so membership there would still count
  every real verdict. Replaced with the real reason (the misconfiguration case — a second
  human account forgotten from the literal) and the real cost (a verdict-shaped row landing
  in the write window trips the sticky sentinel and costs that head its exemption).
* A `::warning::` now names the creator whenever the job re-derives over a verdict-shaped
  status from an off-list account, so a reviewer left off the list is not discarded silently.
* The list guard uses `findall` + a single-assignment assertion: `search` validates the
  FIRST assignment while the shell runs the LAST executed one.
* Mutation counts dropped from the decision record in favour of test names — nothing
  re-executes a number written there.

Mutation-proven: mid-run site back to `ex_human` reddens the mid-run test; dropping the
changed-row comparison reddens the inheritance cases; `if false` at the abstain reddens both
mid-run tests.

fixes #742

Decisions-Edit: yes
2026-08-27 00:07:43 +02:00
..