passed Passed in the packaged run.
What this test is for Why it exists
END TO END THROUGH THE TOOL METHODS THEMSELVES, not through `resolve_target` alone — `sub_index` was threaded through `db()`, `_route()`, `_answered()` and every `_search_*` handler individually, and a routing-layer test cannot see a spot where one of those forwards stayed `None` on its way to `self.db(...)`. Each sub-index gets its own marker table, so the only way `dossier`/`search` can see the right marker is if `sub_index` reached the file.
Given
reg = st.TargetRegistry(tmp_path / "state")→ When
_mcp, state = build_server(reg)repo = tmp_path / "split"repo.mkdir()7 more first = reg.register(repo, name="first-party")vendor = reg.register(repo, name="llama-cpp")for target, marker in ((first, "FIRST_PARTY_MARK"), (vendor, "VENDOR_MARK")): Path(target.db_path).parent.mkdir(parents=True, exist_ok=True) conn = sqlite3.connect(target.db_path) conn.execute(f"CREATE TABLE {marker} (x INTEGER)") conn.commit() conn.close() write_build_signature(Path(target.db_path))def _table_exists(db_path: str, name: str) -> bool: conn = sqlite3.connect(db_path) try: row = conn.execute( "SELECT 1 FROM sqlite_master WHERE type='table' AND name=?", (name,) ).fetchone() finally: conn.close() return row is not Nonedb_first = state.tools.db(str(repo.resolve()), "first-party")db_vendor = state.tools.db(str(repo.resolve()), "llama-cpp")reply = state.tools.search( "nonexistent-symbol", target=str(repo.resolve()), sub_index="llama-cpp" )→ Then
✓ _table_exists(str(db_first), "FIRST_PARTY_MARK") holds✓ _table_exists(str(db_first), "VENDOR_MARK") is false✓ _table_exists(str(db_vendor), "VENDOR_MARK") holds✓ _table_exists(str(db_vendor), "FIRST_PARTY_MARK") is false✓ reply.get("sub_index") equals "llama-cpp"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.
… 204 earlier steps
command-line usercommand-line user command-line usercommand-line user clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.pyclew/query/symbols.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py other filesother files other filesother files opt (line 352) opt try (line 155) try loop (line 1576) loop main 205–206. query_main → _locate 205 _locate +1 more 207. target_for → _safe_index_name 207 _safe_index_name ▶ test enters 208. target_for → state_home 208 state_home 209–211. query_main → _payload 209 _payload +2 more 212. corpus_payload → _symbol_corpus 212 _symbol_corpus ▶ test enters 213. _symbol_corpus → search_counted 213 search_counted 214. search_counted → connect 214 connect 215–216. search_counted → _memberdef_corpora 215 _memberdef_corpora +1 more 217. _expansion_sql → has_columns 217 has_columns 218. has_columns → table_exists 218 table_exists 219. _memberdef_corpora → _memberdef_candidates 219 _memberdef_candidates 220. _memberdef_candidates → table_exists 220 table_exists 221. _memberdef_candidates → documented_first 221 documented_first 222. documented_first → records_provenance 222 records_provenance … 7 steps between
command-line usercommand-line user command-line usercommand-line user command-line user command-line user clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.py clew/query/symbols.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/_common.py clew/query/_common.py clew/query/corpus.pyclew/query/corpus.py clew/query/corpus.pyclew/query/corpus.py clew/query/corpus.py clew/query/corpus.py other filesother files other filesother files other files other files loop (line 1507) loop opt (line 1966) opt opt (line 1968) opt opt (line 333) opt main 230. _memberdef_candidates → _search_rank 230 _search_rank 231. _memberdef_candidates → symbol_provenance 231 symbol_provenance 232. search_counted → _class_candidates 232 _class_candidates 233. _class_candidates → _search_rank 233 _search_rank 234. _class_candidates → class_rows 234 class_rows 235. class_rows → table_exists 235 table_exists 236. class_rows → strip_xml 236 strip_xml 237. search_counted → _config_candidates 237 _config_candidates 238. _config_candidates → _search_rank 238 _search_rank 239. _config_candidates → gate_symbol_rows 239 gate_symbol_rows 240. gate_symbol_rows → table_exists 240 table_exists 241. gate_symbol_rows → has_columns 241 has_columns 242. search_counted → _file_candidates 242 _file_candidates 243. _file_candidates → self_declared_paths 243 self_declared_paths 244–245. _file_candidates → _search_rank 244 _search_rank +1 more 246. _file_candidates → file_doc_rows 246 file_doc_rows 247. file_doc_rows → table_exists 247 table_exists 248. _file_candidates → undocumented_path_rows 248 undocumented_path_rows 249. undocumented_path_rows → table_exists 249 table_exists 250. undocumented_path_rows → has_columns 250 has_columns 251. undocumented_path_rows → table_exists 251 table_exists 252. _symbol_corpus → search_emptiness 252 search_emptiness 253. search_emptiness → index_scope 253 index_scope 254. index_scope → connect 254 connect 255. index_scope → _scope_provenance 255 _scope_provenance 256. _scope_provenance → table_exists 256 table_exists 257. index_scope → _indexed_paths 257 _indexed_paths 258. _indexed_paths → table_exists 258 table_exists 259–260. index_scope → _extensions 259 _extensions +1 more 261–267. search_emptiness → _scope_payload 261 _scope_payload +6 more 268–269. _pruned_row → _absent 268 _absent +1 more 270. search_emptiness → unsearched_corpora 270 unsearched_corpora 271. unsearched_corpora → connect 271 connect 272. unsearched_corpora → table_exists 272 table_exists 273. unsearched_corpora → _unread_kind_counts 273 _unread_kind_counts 274. unsearched_corpora → table_exists 274 table_exists 275. unsearched_corpora → _unread_kind_counts 275 _unread_kind_counts 276. search_emptiness → token_hit_counts 276 token_hit_counts … 8 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/corpus.pyclew/query/corpus.py clew/query/corpus.pyclew/query/corpus.py other filesother files other filesother files opt (line 333) opt opt (line 399) opt main 285–286. search_emptiness → _scope_sentence 285 _scope_sentence +1 more 287. search_emptiness → _verdict 287 _verdict 288. _verdict → _unread_note 288 _unread_note 289. _verdict → has_file_docs 289 has_file_docs 290. has_file_docs → connect 290 connect 291. has_file_docs → table_exists 291 table_exists 292. search_emptiness → _scope_sentence 292 _scope_sentence 293. _symbol_corpus → with_limit_disclosure 293 with_limit_disclosure 294. corpus_payload → _prose_corpus 294 _prose_corpus ▶ test enters 295. _prose_corpus → search_prose_graded 295 search_prose_graded 296. search_prose_graded → _query_tokens 296 _query_tokens … 14 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.pyclew/query/symbols.py other filesother files other filesother files opt (line 474) opt main 311. prose_emptiness → token_hit_counts 311 token_hit_counts 312. prose_emptiness → _render_counts 312 _render_counts 313. corpus_payload → _code_corpus 313 _code_corpus ▶ test enters 314–315. _code_corpus → search_code 314 search_code +1 more … 10 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/corpus.pyclew/query/corpus.py clew/query/corpus.pyclew/query/corpus.py other filesother files other filesother files main 326. count_code → _has_table 326 _has_table 327. _code_corpus → with_limit_disclosure 327 with_limit_disclosure 328. corpus_payload → _files_corpus 328 _files_corpus ▶ test enters 329. _files_corpus → files_context 329 files_context 330. files_context → directory_rollup 330 directory_rollup … 14 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/corpus.pyclew/query/corpus.py clew/query/corpus.pyclew/query/corpus.py other filesother files other filesother files main 345. list_files → _matches 345 _matches 346. _files_corpus → files_miss 346 files_miss 347. corpus_payload → lock_roster 347 lock_roster ▶ test enters 348. lock_roster → connect 348 connect 349. lock_roster → table_exists 349 table_exists … 9 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.pyclew/query/symbols.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py other filesother files other filesother files main 359–360. lock_roster → _object_route 359 _object_route +1 more 361. corpus_payload → one 361 one ▶ test enters 362. corpus_payload → one 362 one 363. corpus_payload → thread_roster 363 thread_roster 364. thread_roster → connect 364 connect 365. thread_roster → table_exists 365 table_exists … 10 steps between
command-line usercommand-line user command-line usercommand-line user clew/query/symbols.pyclew/query/symbols.py clew/query/symbols.pyclew/query/symbols.py other filesother files other filesother files main 376–377. thread_roster → _thread_origins 376 _thread_origins +1 more 378. corpus_payload → _config_found_on_the_wire 378 _config_found_on_the_wire ▶ test enters 379. _config_found_on_the_wire → _compact_gate_panel 379 _compact_gate_panel 380. corpus_payload → kconfig_space 380 kconfig_space … 20 later steps
7 more tests/test_mcp_routing.py:697 · its file's page
What it checks (5) assert _table_exists(str(db_first), "FIRST_PARTY_MARK") not attributed assert not _table_exists(str(db_first), "VENDOR_MARK") not attributed assert _table_exists(str(db_vendor), "VENDOR_MARK") not attributed assert not _table_exists(str(db_vendor), "FIRST_PARTY_MARK") not attributed assert reply.get("sub_index") == "llama-cpp", ( f"reply did not name which sub-index answered: {reply.get('sub_index')!r}" ) not attributed Where the product reaches it 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 13 requirements Its run touches their code; that is reach, not proof.