test_a_withdrawn_statement_is_not_replayed_from_a_stale_row¶
Tests › tests/test_tiers.py
What this test is for
Why it exists
FOUND BY WRITING THE CONTROL IN THE AWKWARD DIRECTION.
Given
db = tmp_path / "clew.db"
When
_stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=["%mine%"]), {}))_stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=None), {}))section = _options_meta_section(db)
2 more
recorded_explicit(section, OPTION_ENTRY_PATTERNS)_recorded_entry_patterns(argparse.Namespace(entry_patterns=None), db)
Then
- ✓ section[f"{OPTION_ENTRY_PATTERNS}.{EXPLICIT_KEY}"] equals "%mine%"
- ✓ section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] equals TIER_HEURISTIC
- ✓ recorded_explicit(section, OPTION_ENTRY_PATTERNS) equals ()
- ✓ _recorded_entry_patterns(argparse.Namespace(entry_patterns=None), db) is None
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 2 of 142 steps
… 64 earlier steps
… 72 later steps
2 more
- Build, refresh and check the index · 2 of 153 steps
- `main` (scripts/stage_probe.py) · 2 of 37 steps
tests/test_tiers.py:512 · its file's page
What it checks (4)
assert section[f"{OPTION_ENTRY_PATTERNS}.{EXPLICIT_KEY}"] == "%mine%", ( "the stale row must still be present — otherwise this test proves nothing" )observes_options_meta_sectionviasectionassert section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] == TIER_HEURISTICobserves_options_meta_sectionviasectionassert recorded_explicit(section, OPTION_ENTRY_PATTERNS) == ()observesrecorded_explicitassert _recorded_entry_patterns(argparse.Namespace(entry_patterns=None), db) is Noneobserves_recorded_entry_patterns
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_a_withdrawn_statement_is_not_replayed_from_a_stale_row→_stamp→_entry_patterns→_options_meta_section→recorded_explicit→_recorded_entry_patternsWhat it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-PIPE-005 measured