GTR-1 — the guard that was supposed to make a prose-only PR unable to stop trading recognises ONE idiom, and the lazy-helper idiom it advertises as the remedy is itself an evasion
status: open · raised panel run 47 (2026-10-30) · class: P0 loudness — a detector that cannot fail on the shape it was built for · judgement: YES · effort ~0.15 pd · horizon: decidable immediately (the fix is three lines inside one predicate, and all three controls are already written)
Plain-language summary for an owner reading one paragraph. On 2026-07-17 an edit to a prose document stopped all three trading sleeves, because a test that reads that document sits inside the gate that must pass before any order is submitted. The class recurred three more times in one week (#253, #258, #263). PR #299, merged 2026-10-28, fixed the live instances and added a guard whose stated purpose is to make the class mechanically impossible rather than a convention people remember. The guard works on the one way of reading a file it was written against. There are three other ways, all of them already house style elsewhere in the suite, and the guard passes on each — including the one that the same PR introduced and that the guard's own documentation recommends as the fix. So the belief the guard buys ("this can no longer happen") is false, and the next recurrence will look exactly like the last four.
The three evasions, each EXECUTED
Controls planted in an immutable git archive HEAD export, guard re-run, with
the trading gate's own collection command used to confirm selection. (The
working tree was never modified.)
- Read through a non-test helper — the worst one, because #299 built it.
document_readsattributes a read to the nearest enclosingFunctionDef(tests/test_gate_tier.py:165-172,enclosing()), so a read inside a helper is blamed on the helper's name, which is not a test name. #299 leg 3 madeCLAUDE_MDlazy asclaude_md()(tests/test_docs_consistency.py:35), and the guard's own docstring (tests/test_gate_tier.py:145-150) narrates that change as what finally let that file be fixed test by test — i.e. the lazy helper is the advertised remedy. An unmarkedtest_claude_md_mentions_the_charter()callingclaude_md(): the plant IS selected by the gate,tests/test_gate_tier.pyreports 10 passed, and a one-token prose edit toCLAUDE.mdthen FAILED the gate command (1 failed, 6 passed). That is the whole 2026-07-17 failure, reproduced through the guard. - A lowercase repo-root variable.
_repo_rootedreturnsbase.id.isupper()for a bare name (tests/test_gate_tier.py:104), sorepo = Path(__file__).resolve().parents[1]evades. Guard: 10 passed. Not hypothetical —root = Path(__file__).resolve().parents[2]is the live idiom attests/test_execution/test_ops_alerting.py:677-679(which readsops/ROUTINES.mdandRUNBOOK.md),test_automerge_guard.py:363andtest_outbox_backlog.py:235. Those three are safe today only because two carry a modulepytestmarkand the third reads workflow YAML — that is, by the very convention the guard was built to replace. open()instead ofread_text._READERS = ("read_text", "read_bytes")(tests/test_gate_tier.py:64), soopen(Path(...) / "CLAUDE.md").read()evades. Guard: 10 passed.yaml.safe_load(open(...))is already house style in two gate-selected files (tests/test_utils/test_sleeves.py:49,test_config_guard.py:103).
What is NOT claimed
The evasions are LATENT, not live. All three of claude_md()'s current
callers carry @pytest.mark.observability, so today's safety still rests
entirely on the markers — which is exactly the convention #299 set out to
replace. No test in the suite exploits any of the three today — #299's own tier
accounting was verified correct (reporting tier 592 → 616, exactly the +24 it
claims; full gate 1311 passed / 1 skipped). This row is about the guard's
reach, not a live outage. The severity comes from the class's history
(four instances in four months, two dark trading days) and from the guard
having converted that risk into a belief.
Fix shape (propose-only)
All three inside the existing predicate, no new machinery:
(a) accept any Path(__file__)-derived base regardless of identifier case;
(b) add open to _READERS; (c) resolve helper functions defined in the same
module — or, equivalently, attribute a non-test helper's read to the tests
that call it.
Test design + negative controls
Each of the three evasions above becomes a test fixture asserting the guard
REDS on it. Negative controls (all three must hold, or the fix is too broad):
(i) tests/test_data/test_resession.py's tmp_path fake CAPTURES.md stays
unflagged — the guard's docstring names it as the case that must not trip;
(ii) the four markers #299 added outside test_docs_consistency.py are still
each required (unmark any one and the guard reds, naming the document);
(iii) the full pre-trade gate stays green and its count unchanged.
Pre-registered kill criterion
If, with the fix applied, any of the three planted evasions still passes the
guard, or any of the three negative controls flips, the fix is wrong and the
row goes back to open — not "mostly done". The fix must also leave
gate_tier_violations consulting something other than <module> plus
selected test names, since that is the single line through which evasion 1
passes. And if a reviewer shows that all
three idioms are unreachable in practice (e.g. a lint already forbids bare
open() in tests/, or _repo_rooted's case rule is load-bearing for a
reason this row missed), the row is KILLED and the finding is recorded as
belief-only, with the reopen condition that any new gate-selected test reads a
governed document through a helper.
Prior art
queue/built/lab-1-collection-error-fail-closes-trading-gate.md (the parent
class, legs 1-4, closed by #258/#264/#277/#299) — this is NOT a re-open of
LAB-1: legs 1-4 concerned specific tests sitting in the wrong tier, all
discharged and verified; this concerns the reach of the guard #299 added to
prevent the next one, which no LAB-1 leg covers. AUDIT.md's 2026-07-17
incident entry is the cost record.