passed Passed in the packaged run.
What this test is for Why it exists
THE CONTROL. The check runs before registration, so getting it wrong would make every sub-index unbuildable rather than merely leaving litter behind.
Given
repo = _split_repo(tmp_path / "repo")registry = st.TargetRegistry(tmp_path / "state")3 more instance = srv.DocsDbServer.__new__(srv.DocsDbServer)instance.registry = registryresolved = asyncio.run(instance._build_subject(None, str(repo), "deps-tinyfsm"))→ → Then
✓ resolved is not None✓ resolved.name equals "deps-tinyfsm"✓ [t.name for t in registry.targets()] equals ["deps-tinyfsm"]✓ Path(resolved.db_path).parent.is_dir() holdsWhat 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.
… 15 earlier steps
callercaller callercaller clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/mcp_server/routing.pyclew/mcp_server/routing.py clew/mcp_server/routing.pyclew/mcp_server/routing.py opt (line 352) opt opt (line 169) opt loop (line 169) loop opt (line 171) opt opt (line 172) opt index 16. ensure_target → adopt 16 adopt 17. adopt → repo_indexes 17 repo_indexes 18. repo_indexes → target_for 18 target_for 19–20. target_for → _safe_index_name 19 _safe_index_name +1 more 21. repo_indexes → target_for 21 target_for 22. adopt → target_for 22 target_for … 43 steps between
callercaller callercaller clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.js clew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.js clew/mcp_server/routing.pyclew/mcp_server/routing.py clew/mcp_server/routing.pyclew/mcp_server/routing.py clew/mcp_server/freshness.pyclew/mcp_server/freshness.py clew/mcp_server/freshness.pyclew/mcp_server/freshness.py opt (line 1826) opt opt (line 1874) opt opt (line 1887) opt opt (line 1904) opt index 66–67. notices → _derived_notice 66 _derived_notice +1 more 68. _build_subject → resolve_target 68 resolve_target ▶ test enters 69. resolve_target → _indexes_for 69 _indexes_for 70. _indexes_for → repo_indexes 70 repo_indexes 71. _indexes_for → repo_indexes 71 repo_indexes 72. resolve_target → list 72 list 73. resolve_target → target_for 73 target_for 74–75. resolve_target → unknown_target_error 74 unknown_target_error +1 more … 5 steps between
callercaller callercaller caller clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/server.pyclew/mcp_server/server.py clew/mcp_server/server.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/mcp_server/state.pyclew/mcp_server/state.py clew/mcp_server/state.py clew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.js clew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.js clew/wiki/themes/clew/static/web.js clew/scope.pyclew/scope.py clew/scope.pyclew/scope.py clew/scope.py other filesother files other filesother files other files try (line 1003) try opt (line 847) opt loop (line 746) loop loop (line 205) loop loop (line 286) loop index 81. describe_declaration → _parsed_declaration 81 _parsed_declaration 82. resolve_target → 82 … 1 call not run 83. _build_subject → target_for 83 target_for ▶ test enters 84. _build_subject → _sub_index_rejection 84 _sub_index_rejection 85. _sub_index_rejection → first_party_sub_index 85 first_party_sub_index 86. first_party_sub_index → whole_repo_scope 86 whole_repo_scope 87. whole_repo_scope → _gitignored_paths 87 _gitignored_paths 88. _gitignored_paths → git_argv 88 git_argv 89. git_argv → _no_ext_diff 89 _no_ext_diff 90. git_argv → list 90 list 91. _gitignored_paths → git_env 91 git_env 92. whole_repo_scope → list 92 list 93–97. whole_repo_scope → nested_repo_roots 93 nested_repo_roots +4 more 98. nested_repo_roots → _nested_repos_under 98 _nested_repos_under 99–109. whole_repo_scope → _gitignored_paths 99 _gitignored_paths +10 more 110–112. first_party_sub_index → _under_any 110 _under_any +2 more 113–114. _first_party → _own_ignores 113 _own_ignores +1 more 115. first_party_sub_index → _gitignored_paths 115 _gitignored_paths 116. _sub_index_rejection → _buildable_sub_indexes 116 _buildable_sub_indexes 117. _buildable_sub_indexes → derive_sub_indexes 117 derive_sub_indexes 118–121. derive_sub_indexes → whole_repo_scope 118 whole_repo_scope +3 more 122. _nested_trees_recursive → list 122 list 123–124. _nested_trees_recursive → _gitignored_paths 123 _gitignored_paths +1 more 125–130. derive_sub_indexes → _direct_parent 125 _direct_parent +5 more 131. _sub_index_rejection → _offered_sub_indexes 131 _offered_sub_indexes 132. _offered_sub_indexes → derive_sub_indexes 132 derive_sub_indexes … 21 later steps
6 more tests/test_sub_index_refusal.py:326 · its file's page
What it checks (3) assert resolved is not None and resolved.name == "deps-tinyfsm" not attributed assert [t.name for t in registry.targets()] == ["deps-tinyfsm"] not attributed assert Path(resolved.db_path).parent.is_dir(), "the build still needs somewhere to write" not attributed 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_a_legitimate_sub_index_still_registers→ _split_repo
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.