docs(901): a mutation OUTCOME is a manifest entry or it is not written — state the selector instead

Round three, blocking. The record's `mechanics:` field asserted a measured
mutation outcome — that appending an `eval` which composes `ETV_HOOK_FIRE_LIB`
at runtime leaves `instrumentation_faults` returning `[]`, identical to the
unmutated baseline — with no `CLAIMS` entry in scripts/tests/mutation_manifest.py.
`testing.mutation-claims-are-executed` as amended by #881 puts a prose claim
about a mutation's outcome under the executed-claim rule wherever it is written,
a decision record included, and this branch's own docs/README.md row restates
that. A record whose rule text requires "each defeat the matcher claims to catch
is a DECLARED, executed mutation" cannot itself carry an undeclared one.

scripts/tests/ is held by #885, which is open, so the entry cannot be added
here. What replaces the outcome claim is the structural fact that carries the
same point and needs no execution: the compared set is the lines containing the
literal `ETV_HOOK_FIRE_LIB` that are not comment-led, so the pin reaches exactly
the two preamble lines and a later reassignment which never spells the literal
is outside the selection — whatever the checker then returns. The `CLAIMS` entry
is owed once scripts/tests/ is free.

Three more from the same round:

- `_normalise_lines` was a universal over three pins that holds for one. The
  stage commands compare through `_normalise` (continuations joined, whitespace
  within one command collapsed); the script map is dict equality over parsed
  JSON and compares no text; only PINNED_VITE_CONFIG uses `_normalise_lines`.
  The three are now stated separately, with the note that a residual read off
  one does not transfer.

- docs/guard-inventory.md's pointer restated the "shell or config TEXT" framing
  the record exists to reject. It now says what the record says: an artifact
  with a grammar the predicate does not implement.

- Rider 1 stated vite's DEFAULT_CONFIG_FILES ordering unbound to a version. The
  ordering belongs to a release and expires with one, so the record cites the
  guard-inventory row rather than keeping a second copy, and that row now dates
  the reading and names the release web/package-lock.json pins.

Refs #901, #891, #887, #881, #885

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QqCpYFsKgnAnx6jVwrKiV
This commit is contained in:
2026-09-05 15:59:16 +02:00
co-authored by Claude Fable 5.1
parent 17c65005f5
commit c67b33cdcd
2 changed files with 19 additions and 17 deletions
@@ -7,7 +7,7 @@ supersedes: none
superseded-by: none
rule: 'A predicate that decides something by matching a SHAPE inside an artifact whose GRAMMAR it does not implement pins the artifact WHOLE instead — the whole file, or a whole named span, compared for equality under a STATED normalisation. The boundary is the grammar and never the file type: shell source, a workflow `run:` body, TOML, YAML, a jq expression and JSON5 all qualify, and a shape matched over the OUTPUT of a real parser for that grammar does not. Extracting a `run:` value with a real YAML parser and then matching shell inside it IS in the class, because the shell is the unparsed half. THE PIN IS THE DEFAULT FOR A NEW PREDICATE; REJECTED is the alternative of writing the shape-matcher and pinning only once it has been defeated. The defeat a remedy policy waits for is a false GREEN, so it is found by a reviewer or by an incident and never by the guard: "not defeated yet" is a statement about who has looked, not about the input space. A SHAPE-MATCHER IS THE EXCEPTION, and its argument carries FOUR things, written where the predicate is and re-read whenever a clause of it is widened. (1) The GRAMMAR named, and the parser that implements it — if the shape is matched over a real parse there is no exception to write. (2) The INPUT SPACE as a CLOSED enumeration with the reason it is closed: a generator whose output form is fixed, or a canonicaliser the guard itself runs. A list of the spellings the author thought of is not that reason, and is the thing that was defeated nine, seven and five times. (3) The FAILURE DIRECTION measured rather than asserted: each defeat the matcher claims to catch is a DECLARED, executed mutation under `testing.mutation-claims-are-executed`, because a shape-matcher''s miss is a false green and an unrun claim about a fail direction is not evidence. (4) WHAT IT BUYS over the pin, priced in a cost the pin actually charges — the artifact is edited routinely or written by tooling, so a pin would redden as background noise and train its readers to ignore it; or the artifact''s population is DISCOVERED rather than fixed, so there is nothing to pin. Fewer than four is a refusal, and neither elegance nor an unwillingness to update a constant is one of the four. TWO OTHER BARS ARE REJECTED for this exception: a NUMERIC one ("survives N adversarial spellings"), which measures the reviewer''s imagination rather than the input space and would have licensed the parser above through most of nine rounds; and a REVIEWER SIGN-OFF, which makes the exception depend on the very signal the threshold below says arrives late. THE THRESHOLD for withdrawing a shape-matcher already shipped is not a count of spellings: it is the moment the NEXT spelling is found by the REVIEWER rather than by the author, which is evidence that the author''s model of the input space is not the input space. TWO RIDERS, both measured. A pin assumes it is pinning the artifact that still DECIDES — ask what else could decide this and whether the pin would still match: another FILE that outranks it, another OCCURRENCE in the same file, another WORKFLOW, or a HOOK the pinned command invokes. And WIDENING A CLAUSE RETIRES THE PROOFS CALIBRATED AGAINST THE NARROW ONE: a canary asserting that a finer mutation still SURVIVES has as its precondition that the guard is deliberately coarse there, so widening the main clause turns the canary into a tautology, which reads exactly like a passing proof — re-derive every proof calibrated against the narrow clause in the same commit that widens it. THE COST IS STATED RATHER THAN DISCOVERED LATER: any edit to a pinned artifact reddens, and the pin is updated deliberately in the same commit, with a reason. That red IS the review trigger the pin exists to be. A pin also declares its NORMALISATION and what the normalisation cannot see, because "pinned whole" invites a reader to assume byte equality.'
signals: 'pin the artifact whole · shape-matcher is the exception that argues for itself · the boundary is the grammar not the file type · predicate does not implement the grammar it parses · defeated by the next spelling · the reviewer found the next spelling · false RED versus false GREEN · nine defects one mechanism · seven respellings of a partial config match · five spellings of a lexical preamble rule · the four-part exception argument: grammar and parser, closed input space, measured fail direction, what it buys · authority moves where the pin is not looking · an outranking config file · a decoy occurrence · an npm lifecycle hook · widening a clause retires its own canary · a survived-clause canary becomes a tautology · a pin declares its normalisation · instances: `ci.image-build-delegates-the-spa-suite`, `process.hook-resolves-inputs-from-repo-root` · paths: `scripts/tests/test_image_build_delegates_the_spa_suite.py`, `scripts/tests/test_hook_fire_log.py`, `docs/guard-inventory.md`, `docs/defect-shapes-773.md` · issues: #901, #887, #891, #774, #790, #881, #773'
mechanics: 'Two worked pins. `scripts/tests/test_image_build_delegates_the_spa_suite.py` pins command TEXT (`PINNED_STAGE_COMMANDS`), `web/package.json`''s script map (`PINNED_PACKAGE_SCRIPTS`) and `web/vite.config.ts` entire (`PINNED_VITE_CONFIG`), the last two after a SELECTION and then a partial match were defeated; its comparison runs through `_normalise_lines`, which drops blank lines and collapses whitespace within a line, and the test states that residual rather than claiming byte equality. `scripts/tests/test_hook_fire_log.py` pins the hook preamble''s two lines byte for byte (`CANONICAL_SINK_ASSIGNMENT`, `CANONICAL_SINK_SOURCE`), named once so the checker, the mutation proofs and the hooks cannot come to mean different strings — but its normalisation is a SELECTION, and the rule above obliges this record to say what that selection cannot see, because the pin itself does not. The comparison runs over the lines that contain the literal `ETV_HOOK_FIRE_LIB` and are not comment-led, so a writer of that variable which never spells the literal never enters the compared set at all. MEASURED 2026-09-05 against `.claude/hooks/decisions-guard.sh`: with `eval "$(printf %s%s=/dev/null ETV_HOOK_FIRE _LIB)"` appended after the canonical assignment, `instrumentation_faults` returns `[]`, identical to the unmutated baseline, while those two lines run under bash leave the sink pointing at /dev/null. Byte-identity WITHIN a selection is not byte-identity over the file — the pin''s reach ends where its selector does. The residual is #891 code and predates this record; stating it is this record''s own rule applied to one of its own worked pins. Each of the three image-build pins faults with a request for the reason in the same commit, and two of them name the CONSTANT to update (`PINNED_STAGE_COMMANDS`, `PINNED_VITE_CONFIG`) while the script-map fault names the FILE and prints both maps. The hook-preamble fault asks for neither: it reports the divergent lines, since the two canonical strings ARE what a deliberate change edits.'
mechanics: 'Two worked pins. `scripts/tests/test_image_build_delegates_the_spa_suite.py` pins command TEXT (`PINNED_STAGE_COMMANDS`), `web/package.json`''s script map (`PINNED_PACKAGE_SCRIPTS`) and `web/vite.config.ts` entire (`PINNED_VITE_CONFIG`), the last two after a SELECTION and then a partial match were defeated. The three normalise DIFFERENTLY, so a residual read off one of them does not transfer to the others: the stage commands are compared after line continuations are joined and whitespace within each command is collapsed (`_normalise`), so a reflow is free and a line boundary is not; the script map is dict equality over parsed JSON, so the file''s own formatting and key ORDER are free while every script body is exact; and of the three only `PINNED_VITE_CONFIG` runs through `_normalise_lines`, which drops blank lines and collapses whitespace within a line — including inside a string literal, the residual that test states rather than claiming byte equality. `scripts/tests/test_hook_fire_log.py` pins the hook preamble''s two lines byte for byte (`CANONICAL_SINK_ASSIGNMENT`, `CANONICAL_SINK_SOURCE`), named once so the checker, the mutation proofs and the hooks cannot come to mean different strings — but its normalisation is a SELECTION, and the rule above obliges this record to say what that selection cannot see, because the pin itself does not. The compared set is the lines that contain the literal `ETV_HOOK_FIRE_LIB` and are not comment-led, so the pin reaches exactly the two preamble lines and nothing else in the file: a later reassignment of that variable which never spells the literal — one composed at runtime and `eval`ed, say — is outside the selection, and therefore outside the pin, however the checker then behaves. Byte-identity WITHIN a selection is not byte-identity over the file — the pin''s reach ends where its selector does. That is stated here as a structural fact about the selector and NOT as a measured checker outcome, because an outcome claim about a mutation is a declared, harness-executed `CLAIMS` entry under `testing.mutation-claims-are-executed` or it is not written, wherever it is written — this record included. The residual is #891 code and predates this record; stating it is this record''s own rule applied to one of its own worked pins. Each of the three image-build pins faults with a request for the reason in the same commit, and two of them name the CONSTANT to update (`PINNED_STAGE_COMMANDS`, `PINNED_VITE_CONFIG`) while the script-map fault names the FILE and prints both maps. The hook-preamble fault asks for neither: it reports the divergent lines, since the two canonical strings ARE what a deliberate change edits.'
---
**The class, and what approximating it costs.** A predicate over an artifact with a grammar is a
@@ -40,14 +40,15 @@ requirement 2, the only candidate that is a claim about the ARTIFACT rather than
spent on it, and requirement 3, which forces the fail-direction claim to be executed, not reasoned.
**Rider 1 — a pin assumes it pins the artifact that still DECIDES.** This is where the pinned form
fails, and it fails silently, so it is the question to ask of every new pin. In #887 every hole found
after the first withdrawal was authority moving where the pin was not looking: another FILE (vitest
prefers `vitest.config.*`, and `vite build` prefers `vite.config.js`/`.mjs` to the pinned `.ts`, from
vite's own `DEFAULT_CONFIG_FILES`), another OCCURRENCE in the same file, another WORKFLOW (a `needs:`
edge naming a different job called `test`), a HOOK the pinned command invokes (a vite plugin's
`buildStart`, an npm `prebuild`/`preinstall` script). A pin removes the SPELLING problem outright and
reduces the MEANING problem to a list that can be worked through; a pin sold as immune to both stops
being re-examined.
fails, and it fails silently, so it is the question to ask of every new pin. In #887 every hole
found after the first withdrawal was authority moving where the pin was not looking: another FILE
(vitest prefers `vitest.config.*`, and `vite build` prefers `vite.config.js`/`.mjs` to the pinned
`.ts` — an ordering that belongs to a vite VERSION, so the release it was read at is dated in
`docs/guard-inventory.md`'s `test_image_build_delegates_the_spa_suite.py` row rather than copied
here), another OCCURRENCE in the same file, another WORKFLOW (a `needs:` edge naming a different job
called `test`), a HOOK the pinned command invokes (a vite plugin's `buildStart`, an npm
`prebuild`/`preinstall` script). A pin removes the SPELLING problem outright and reduces the MEANING
problem to a list that can be worked through; a pin sold as immune to both stops being re-examined.
**Rider 2 — widening a clause can retire its own evidence.** A canary asserting that a finer mutation
still SURVIVES is calibrated against a deliberately coarse clause. Widen that clause and the canary
@@ -58,12 +59,12 @@ only while the precondition that made it survive still holds.
**Where this sits against its neighbours, so it is not read as a duplicate.** The two incidents keep
their own records — `ci.image-build-delegates-the-spa-suite` and
`process.hook-resolves-inputs-from-repo-root` — and this is the class they instantiate.
`process.hook-resolves-inputs-from-repo-root` — and this is the class they instantiate, while
`testing.guard-derives-population-from-source` answers the case where the authoritative source is
MISSING create one, never approximate it with a predicate over text and this record answers the
case where the artifact IS present and authoritative and what is approximated is its GRAMMAR.
`docs/defect-shapes-773.md` §4 argues the general form. What was missing is a rule resolvable BY
TOPIC: `docs/guard-inventory.md` carries its precedent per incident, findable only from inside one.
MISSING (create one, never approximate it with a predicate over text) and this one the case where
the artifact IS present and authoritative and what is approximated is its GRAMMAR.
`docs/defect-shapes-773.md` §4 argues the general form; what was missing is a rule resolvable BY
TOPIC, since `docs/guard-inventory.md` carries its precedent per incident, findable only inside one.
**What this does not cover.** Predicates over structured input a real parser produces — an AST, the
git index, parsed workflow YAML consumed as data — are not approximations and keep their shape
File diff suppressed because one or more lines are too long