test_a_declared_index_scope_is_the_decision¶
Tests › tests/test_index_scope_inheritance.py
What this test is for
Why it exists
The other half of the distinction. Without this, reporting the tier could be a constant that happens to read correctly on the case someone looked at.
Given
root = _repo_with_exempt_fixture(tmp_path / "repo")(root / ".clew.yaml").write_text( "index_scope:\n roots: ['src', 'fixtures']\n", encoding="utf-8" )
When
derived = sc.derive_scope(root)
Then
- ✓ derived.source equals sc.SOURCE_DECLARED
- ✓ derived.is_derived() is True
- ✓ sorted(p.name for p in derived.roots) equals ["fixtures", "src"]
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.
clew — `main` (clew/cli.py) · 11 of 400 steps
… 10 earlier steps
… 18 steps between
… 20 steps between
… 329 later steps
2 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 9 of 142 steps
- Build this wiki from the index · 5 of 400 steps
tests/test_index_scope_inheritance.py:96 · its file's page
What it checks (3)
assert derived.source == sc.SOURCE_DECLAREDobservesderive_scopeviaderivedassert derived.is_derived() is Trueobservesderive_scopeviaderivedassert sorted(p.name for p in derived.roots) == ["fixtures", "src"], ( "the declaration is what lets the index and the gate disagree — the exempt " "fixture is indexable without loosening the quality bar" )observesderive_scopeviaderived
Where the product reaches it
main→propose_main→propose→build_context→derive_scope(flow)
Call flow
What 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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-GUARD-012 inferred
- REQ-DDB-WIKI-054 inferred