passed Passed in the packaged run.
What this test is for Why it exists
Now that tier-1 comes up as soon as a TARGET is known, "target known, database not built" is the first state of every fresh install — and it used to surface as a bare sqlite "unable to open database file" three frames deeper.
Verifies REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
reg = st.TargetRegistry(tmp_path / "state")repo = tmp_path / "unbuilt"repo.mkdir()→ When
_mcp, state = build_server(reg)state.adopt(str(repo), st.TARGET_SOURCE_FLAG)state.active_db()state.active_db()→ Then
✓ raises RuntimeError✓ raises RuntimeErrorWhat 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.
… 14 earlier steps
callercaller callercaller caller 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/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/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/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/routing.py clew/mcp_server/routing.py clew/mcp_server/freshness.pyclew/mcp_server/freshness.py clew/mcp_server/freshness.pyclew/mcp_server/freshness.py clew/mcp_server/freshness.py clew/mcp_server/freshness.py other filesother files other filesother files other files other files loop (line 2353) loop opt (line 352) opt opt (line 169) opt loop (line 169) loop opt (line 171) opt opt (line 172) opt catch (line 562) catch index 15. _target_from_roots → root_uri_to_path 15 root_uri_to_path 16. ensure_target → adopt 16 adopt 17. adopt → repo_indexes 17 repo_indexes ▶ test enters 18. repo_indexes → target_for 18 target_for 19. target_for → _safe_index_name 19 _safe_index_name 20. target_for → state_home 20 state_home 21. repo_indexes → target_for 21 target_for 22. adopt → target_for 22 target_for 23–29. adopt → _sync_tier1 23 _sync_tier1 +6 more 30. _answering_with_refresh → refused 30 refused 31. _answering_with_refresh → _take_context 31 _take_context 32. _take_context → list 32 list 33. register_query_tools → list 33 list 34. adopt → db_status 34 db_status 35. db_status → _options_meta 35 _options_meta 36. _options_meta → _meta_section 36 _meta_section 37. _meta_section → meta_section 37 meta_section 38. db_status → stated_options 38 stated_options 39. db_status → read_build_signature 39 read_build_signature 40–43. db_status → _source_drift 40 _source_drift +3 more 44. _scope_meta → _meta_section 44 _meta_section 45. db_status → _coverage_meta 45 _coverage_meta 46. _coverage_meta → _meta_section 46 _meta_section 47. db_status → _refresh_meta 47 _refresh_meta 48. _refresh_meta → _meta_section 48 _meta_section 49. db_status → list 49 list 50. db_status → _diagnostics_meta 50 _diagnostics_meta 51. _diagnostics_meta → _meta_section 51 _meta_section 52. db_status → _data_model_meta 52 _data_model_meta 53. _data_model_meta → _meta_section 53 _meta_section 54. db_status → code_identity 54 code_identity 55–57. code_identity → source_fingerprint 55 source_fingerprint +2 more 58. db_status → notices 58 notices 59–60. notices → code_identity 59 code_identity +1 more 61–63. _data_notice → _cost_clause 61 _cost_clause +2 more 64–67. notices → _schema_notice 64 _schema_notice +3 more 68–69. _build_subject → resolve_target 68 resolve_target +1 more … 5 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/routing.pyclew/mcp_server/routing.py clew/mcp_server/routing.pyclew/mcp_server/routing.py other filesother files other filesother files opt (line 1911) opt opt (line 260) opt index 75. resolve_target → _background_note 75 _background_note 76. resolve_target → unbuilt_refusal 76 unbuilt_refusal 77. unbuilt_refusal → no_index_message 77 no_index_message ▶ test enters 78–79. unbuilt_refusal → listed_names 78 listed_names +1 more 80. unbuilt_refusal → describe_declaration 80 describe_declaration 81. describe_declaration → _parsed_declaration 81 _parsed_declaration 82. resolve_target → 82 … 1 call not run … 71 later steps
5 more tests/test_mcp_server.py:2908 · its file's page
Where the product reaches it Call flow test_an_unbuilt_target_fails_by_name_not_by_sqlite→ build_server 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.
Requirements it verifies (3) Also reaches 8 requirements Its run touches their code; that is reach, not proof.