test_an_unreadable_source_tree_does_not_manufacture_a_code_warning¶
Tests › tests/test_freshness.py
What this test is for
Why it exists
`source_fingerprint` returns "" for a tree it cannot read, and that must read as absent evidence rather than as disagreement. A warning that fires when the check could not run is the "guard that fires on some of the real cases" defect: it converts "unchecked" into "checked and wrong".
Given
- —
When
fr.source_fingerprint(tmp_path / "does-not-exist")unknown = dict(MATCHING_CODE, source_fingerprint="", matches_source=True)fr.notices(_status(), unknown)
Then
- ✓ fr.source_fingerprint(tmp_path / "does-not-exist") equals ""
- ✓ _message(fr.notices(_status(), unknown), fr.AXIS_CODE) equals ""
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) · 7 of 142 steps
… 84 earlier steps
… 42 later steps
2 more
- Build, refresh and check the index · 7 of 153 steps
- `main` (scripts/stage_probe.py) · 7 of 37 steps
tests/test_freshness.py:382 · its file's page
What it checks (2)
assert fr.source_fingerprint(tmp_path / "does-not-exist") == ""observessource_fingerprintassert _message(fr.notices(_status(), unknown), fr.AXIS_CODE) == ""observes_message
Where the product reaches it
Call flow
test_an_unreadable_source_tree_does_not_manufacture_a_code_warning→source_fingerprint→_message→notices→_statusWhat 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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-004 measured