Files
ersatztv/scripts/tests
timothyandClaude Opus 5 de8051dae6 fix(796): ship the proof the record was claiming an exemption from
Cold review BLOCKED the first commit on two findings, both correct, and both
refuted by execution rather than argument.

1. The central premise was false. The record said `scripts/mcp_smoke.py` "cannot
   participate" in the mutation harness because driving it needs the gitignored
   `.mcp.json` and a cold-built language server. It takes its config path and
   server name as POSITIONAL ARGUMENTS (`mcp_smoke.py:78`), so a test can hand it
   a synthetic config pointing at a stub responder. The record failed its own
   headline rule — that claim was read, not executed.

2. The split was drawn on the wrong axis. "CI cannot execute it" also describes
   every `.claude/hooks/*.sh` and `.husky/pre-push`, all of which carry MUTATION
   rows because a pytest proof drives them in a sandbox. The discriminator is
   whether a proof test can drive the construct HERMETICALLY.

So instead of restating the exemption, this ships the proof:

- `scripts/tests/test_mcp_smoke.py` — a stub JSON-RPC responder and five cases
  pinning the defects the checker has already had (impostor identity, a body
  carrying only an id, a missing expected tool, a pre-answered request), plus an
  anti-vacuity positive control. Hermetic: no `.mcp.json`, no language server,
  7.9s.
- A declared clause in `mutation_manifest.py` targeting `mcp_smoke.py`'s
  unguessable request id, using the `guard=test / target=script` shape that
  already exists for `mutation_harness_lib.py` — no population derivation changes.

Witnessed red, not asserted: replacing `id_init = secrets.randbelow(...)` with
`id_init = 1` makes the pre-answer ACCEPTED at `initialize`, so the run dies one
stage later at `tools/list` (rc 9 -> 10) and the proof reddens with its declared
diagnostic. Only that one test reddened; the mutation is clause-scoped.

`mcp_smoke.py` still gets no inventory row — a row for it is rejected as a
phantom, measured — so the row goes to the test file, which joins the population
automatically. Also corrected: the "acquires a real row" migration the mechanism
would refuse (HIGH 3); "shellcheck caught 0 of 5", re-measured as neither of the
TWO shell defects, the other three being Python and outside its reach (MEDIUM 4);
a threshold misattributed to `release.verdict-vocabulary-shared`, which carries a
categorical ban rather than a count (MEDIUM 5); an unverifiable "no shared
reviewers" claim (MEDIUM 6); a dangling cross-reference to a private memory
filename (LOW 7); and the scope-limit item that actually excludes defects 2/4/5
(LOW 8).

Docs updated in the same PR per CLAUDE.md: `docs/README.md`'s task-signal map now
routes to four guard rules rather than three, and `docs/guard-inventory.md`'s
scope limit item 6 records that being outside the population is not an exemption.

Refs: #796
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 19:55:31 +02:00
..