test_editing_a_scanned_file_invalidates_the_tree_hash¶
Tests › tests/test_treescan_pruning.py
What this test is for
Why it exists
A faster scan that misses an invalidation is worse than a slow one. The non-source cases are the ones an extension filter would break: the tree hash gates whether doxygen is re-run at all, so a missed change ships a database describing content that no longer exists.
Given
repo = tmp_path / "repo"repo.mkdir()
4 more
_make_scan_tree(repo)cache_path = tmp_path / "c.idxcache"before = _tree_sha(repo, cache_path)(repo / name).write_text("CHANGED CONTENT\n", encoding="utf-8")
When
- —
Then
- ✓ _tree_sha(repo, cache_path) differs from before
tests/test_treescan_pruning.py:204 · its file's page
What it checks (1)
assert _tree_sha(repo, cache_path) != beforeobserves_tree_sha
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_editing_a_scanned_file_invalidates_the_tree_hash→_make_scan_tree→_tree_shaWhat 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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured
- REQ-DDB-PIPE-003 measured