test_the_whole_repo_scope_indexes_a_nested_repository¶
Tests › tests/test_index_scope_inheritance.py
What this test is for
Why it exists
The same reversal at the tier that reaches FURTHEST — its single root is the repo itself, so it is the tier a foreign clone is most certain to sit inside, and it is what a repo lands on by saying nothing, which is the common case.
Given
root = tmp_path / "repo"nested = _undeclared_repo_with_nested_clone(root)args = argparse.Namespace( scope=sc.SCOPE_FROM_GUARD, guard_config=None, extra_input=None, extra_exclude=None, )
When
cli._apply_scope(args, root)external_roots(root)
Then
- ✓ args.replace_input is True
- ✓ args.extra_input equals [str(root.resolve())]
- ✓ args.extra_exclude or [] does not contain str(nested.resolve())
- ✓ external_roots(root) contains "evidence/other_project"
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) · 25 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:238 · its file's page
What it checks (4)
assert args.replace_input is Truenot attributedassert args.extra_input == [str(root.resolve())], "the whole-repo root is the INPUT"not attributedassert str(nested.resolve()) not in (args.extra_exclude or []), ( "gh#333: a nested repository inside the whole-repo root is indexed and tagged" )observes_undeclared_repo_with_nested_clonevianestedassert "evidence/other_project" in external_roots(root)observesexternal_roots
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_the_whole_repo_scope_indexes_a_nested_repository→_undeclared_repo_with_nested_clone→_apply_scope→external_rootsWhat 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 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-GUARD-012 inferred
- REQ-DDB-INDEX-005 measured
- REQ-DDB-WIKI-054 inferred