test_no_tier_hands_back_a_rootless_scope¶
Tests › tests/test_index_scope_inheritance.py
What this test is for
Why it exists
gh#333 DELETED THE ONE SHAPE THAT COULD BE ROOTLESS. The Doxyfile fallback carried a reason and nothing else, which meant the indexed tree was decided by a file this module never reads — and that indirection is exactly how a repo ended up indexing its published-API subset without anything saying so.
Given
root = tmp_path / "repo"nested = root / "src" / "other_project"(nested / ".git").mkdir(parents=True)
When
derived = sc.derive_scope(root)
Then
- ✓ derived.source equals sc.SOURCE_WHOLE_REPO
- ✓ derived.is_derived() is False
- ✓ derived.roots equals (root.resolve(),)
- ✓ {p.resolve() for p in derived.excludes} does not contain nested.resolve()
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) · 26 of 400 steps
… 10 earlier steps
… 26 steps between
… 329 later steps
4 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 24 of 142 steps
- Build, refresh and check the index · 22 of 153 steps
- Build this wiki from the index · 3 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_index_scope_inheritance.py:322 · its file's page
What it checks (4)
assert derived.source == sc.SOURCE_WHOLE_REPOobservesderive_scopeviaderivedassert derived.is_derived() is False, "nothing was DECLARED, which is a separate question"observesderive_scopeviaderivedassert derived.roots == (root.resolve(),), "a rootless scope hands the decision to doxygen"observesderive_scopeviaderivedassert nested.resolve() not in {p.resolve() for p in derived.excludes}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