test_unchanged_tree_keeps_its_hash¶
Tests › tests/test_treescan_pruning.py
What this test is for
Why it exists
The other half of the invalidation contract — without this, "always invalidate" would pass every test above while destroying the cache.
Given
repo = tmp_path / "repo"repo.mkdir()
2 more
_make_scan_tree(repo)cache_path = tmp_path / "c.idxcache"
When
- —
Then
- ✓ _tree_sha(repo, cache_path) equals _tree_sha(repo, cache_path)
tests/test_treescan_pruning.py:224 · its file's page
What it checks (1)
assert _tree_sha(repo, cache_path) == _tree_sha(repo, cache_path)observes_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_unchanged_tree_keeps_its_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