fix(876): sweep session narrative out of hooks, workflows, scripts, tests and code comments; grow the detector to the process corpus
Build ErsatzTV Image / CI toolchain image resolves (pull_request) Successful in 35s
Build ErsatzTV Image / Delimiter ban (release path) (pull_request) Successful in 57s
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 37s
PR Gates / Docs update reminder (pull_request) Successful in 1m0s
PR Gates / decisions lifecycle (pull_request) Successful in 20s
PR Gates / Fix proofs (Proves trailers) (pull_request) Successful in 17s
review-verdict/h10 Review-verdict: MERGEABLE @ a7d91bf (base: main)
Review verdict / Set review-verdict status (pull_request_target) Successful in 45s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 9m25s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m17s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Skipped
PR Gates / Script lint and tests (ruff + pytest) (pull_request) Successful in 19m27s
Build ErsatzTV Image / Functional E2E (curl + UI contracts) (pull_request) Successful in 6m4s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 7s
Build ErsatzTV Image / CI toolchain image resolves (pull_request) Successful in 35s
Build ErsatzTV Image / Delimiter ban (release path) (pull_request) Successful in 57s
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 37s
PR Gates / Docs update reminder (pull_request) Successful in 1m0s
PR Gates / decisions lifecycle (pull_request) Successful in 20s
PR Gates / Fix proofs (Proves trailers) (pull_request) Successful in 17s
review-verdict/h10 Review-verdict: MERGEABLE @ a7d91bf (base: main)
Review verdict / Set review-verdict status (pull_request_target) Successful in 45s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 9m25s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m17s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Skipped
PR Gates / Script lint and tests (ruff + pytest) (pull_request) Successful in 19m27s
Build ErsatzTV Image / Functional E2E (curl + UI contracts) (pull_request) Successful in 6m4s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 7s
`docs.no-session-narrative` reaches every durable artifact, but its detector scanned only `docs/**/*.md` and root markdown, and nothing had ever swept the rest. The issue named four sites from one grep and called them a floor. Deriving the population instead — a whitespace-joined sweep over every tracked file outside the detector, for the detector's own phrasings plus the attribution and review-round class #812 found — gave 453 sites in 108 files at `fb5592971`, and a second pass for phrasings the first list missed (hyphenated `round-N`, "an earlier version", "the reviewer proved") added residuals in the same files. Every site was classified with #812's three dispositions (CUT / SEVER / KEEP with its sub-kind) under the who-benefits test; the per-site manifests are on the PR. The rejected designs, tested-and-rejected fixtures, measurements and traps stay; the attribution of who found them and the round in which they were found go. The detector's population grows to `.claude/`, `.gitea/`, `.husky/` and `scripts/` regardless of extension, minus the detector and its own test (whose fixtures ARE the phrasings) and minus `scripts/tests/fixtures/` (test data, including decision-record copies — the same reasoning as the records' own exemption, and what keeps the record's depth measurement true), and `--all` lists tracked REGULAR files only — a symlink's content is its target and a gitlink has none. The #812 argument for leaving `docs/superpowers/**` in the population runs the other way here: `--diff` sees only ADDED lines, and 287 of the 453 sites were under 30 days old — this corpus is where narrative is being added, so the advisory nudge has reach. Density agrees: 56 line-mode hits over the 113 regular files the predicate admits, against 9 over 66 docs files before #812. `web/` and C# stay out on the same measurement (3 of 74 PATTERNS-matching sites, ~4,600 files). The predicate did not grow: PATTERNS matched 74 of 453 sites, and widening the word list to the attribution class is the treadmill the withdrawn parity test ran on. The population oracle is restated over segments with the new arms, the synthetic cross product gains the process heads and non-markdown extensions, a fixture witnesses that a tracked symlink is neither scanned nor counted, a `.py.bak` axis separates a by-name exemption from a `startswith` over the same tuple, and eight mutants (drop the process arm, drop the by-name exemption, exempt by `startswith`, drop or add a prefix, drop the fixtures exemption, list only markdown, drop the symlink filter, test the mode per row instead of per path) each redden it. A pre-existing silent drop in `--diff` goes with it: git tab-terminates a `+++` filename that contains a space, and the kept tab made `is_scanned_path` refuse the file with no notice — fixed, with a positive control and its own mutant. Code is unchanged by construction, measured per file type against `origin/main`: Python modules are AST-equal with docstrings stripped, except `#` lines inside the embedded fixture programs (string literals) of three test modules; workflows differ only in `#` lines inside `run:` block scalars; shell, C#, TypeScript and jq are equal with comment lines stripped. The stated exceptions: the detector and its test, 26 vitest titles that carried review-round or severity labels or a reviewer attribution (call sites whose title changed — every changed title line walked back to its `it(` / `it.each(...)(` anchor, so a `' + '` concatenation counts once), two registry note strings and the mutation manifest's prose fields. scripts/tests: 1565 passed. Web: lint, typecheck, 1319 tests green. Closes #876. Decisions-Edit: yes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PEcBoFw7ctrf3Nb7R7x7wk
This commit is contained in:
@@ -243,10 +243,10 @@ SENTINEL_CLASSIFIER = (
|
||||
def test_ONE_classifier_TWO_callers_BEHAVIOURALLY():
|
||||
"""The structural property #787 relies on, PROVEN by swapping the file — not by reading source.
|
||||
|
||||
A string-presence check was the seventh test in this change to pass for the wrong reason: cold
|
||||
review re-inlined a BYTE-IDENTICAL copy of the classifier into the merge hook, left a comment
|
||||
naming `scripts/lib/branch-rule-classifier.jq` above it, and the whole suite stayed green at
|
||||
exactly 1062 passed. A comment satisfies a substring assertion. And the byte-identical inline is
|
||||
A string-presence check passes for the wrong reason here: re-inlining a BYTE-IDENTICAL copy of
|
||||
the classifier into the merge hook, with a comment naming
|
||||
`scripts/lib/branch-rule-classifier.jq` above it, left the whole suite green at exactly 1062
|
||||
passed. A comment satisfies a substring assertion, and the byte-identical inline is
|
||||
precisely the drift-creating refactor that matters, because it AGREES on day one — a weakened
|
||||
copy would have been caught behaviourally.
|
||||
|
||||
@@ -281,10 +281,10 @@ def _mutant_tree(tmp_path, source_text):
|
||||
"""The script in a RUNNABLE layout: it resolves `lib/branch-rule-classifier.jq` relative to its
|
||||
own directory, so a bare copy exits 2 before reaching any of its logic.
|
||||
|
||||
This is not incidental plumbing. The first version of the mutation proof below copied only the
|
||||
script, so the mutant died on `classifier not readable` with EMPTY stdout — and an assertion that
|
||||
stdout merely differed from `drift` was satisfied by that empty string. The proof passed for the
|
||||
wrong reason and the `MUTATION` grade it justified was unsupported.
|
||||
This is not incidental plumbing. A mutation proof that copies only the script kills the mutant
|
||||
on `classifier not readable` with EMPTY stdout — and an assertion that stdout merely differs
|
||||
from `drift` is satisfied by that empty string, so the proof passes for the wrong reason and
|
||||
the `MUTATION` grade it justifies is unsupported.
|
||||
"""
|
||||
victim = tmp_path / "mutant.sh"
|
||||
victim.write_text(source_text)
|
||||
@@ -454,9 +454,9 @@ CLASSIFIER = REPO_ROOT / "scripts" / "lib" / "branch-rule-classifier.jq"
|
||||
def classify(payload: str, branch: str = "main") -> tuple[int, str]:
|
||||
"""The classifier ALONE, with no script wrapping it. `check-required-contexts.sh` maps both a
|
||||
declared `unreadable` verdict and a jq CRASH onto the same output word, so a test that only reads
|
||||
that word cannot tell the two apart — cold review demonstrated exactly that by mutating the
|
||||
classifier's structural guard to `if false`, making jq exit 5, and watching the wrapper still
|
||||
print `unreadable`. Asserting the raw verdict is what pins the mechanism."""
|
||||
that word cannot tell the two apart — measured: mutating the classifier's structural guard to
|
||||
`if false` makes jq exit 5 and the wrapper still prints `unreadable`. Asserting the raw verdict
|
||||
is what pins the mechanism."""
|
||||
proc = subprocess.run(
|
||||
["jq", "--arg", "b", branch, "-c", "-f", str(CLASSIFIER)],
|
||||
input=payload,
|
||||
@@ -538,11 +538,12 @@ def test_an_EMPTY_array_is_still_a_real_finding():
|
||||
|
||||
|
||||
def test_a_MALFORMED_rule_name_poisons_even_beside_a_GOOD_branch_name():
|
||||
"""Poison is field-agnostic, which the first draft of the fix got wrong in one direction.
|
||||
"""Poison is field-agnostic, and a short-circuit on `branch_name` gets that wrong in one
|
||||
direction.
|
||||
|
||||
It short-circuited on `branch_name`, so `{"branch_name":42,"rule_name":"main"}` poisoned while
|
||||
`{"branch_name":"main","rule_name":42}` answered `exact` off the good field and never looked at
|
||||
the malformed one — an invariant the comment claimed and the code did not hold. Gitea 1.27.1 does
|
||||
A short-circuiting implementation poisons on `{"branch_name":42,"rule_name":"main"}` while
|
||||
`{"branch_name":"main","rule_name":42}` answers `exact` off the good field and never looks at
|
||||
the malformed one — contradicting the field-agnostic invariant its own comment states. Gitea 1.27.1 does
|
||||
not send that second shape, so this pins a property rather than a bug: "a malformed field poisons
|
||||
the list" has to be true of BOTH fields or it is not the rule that is written down.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user