passed Passed in the packaged run.
What this test is for Why it exists
Extends #41's graceful-degradation contract from a missing TABLE to a missing COLUMN. `shared_key_edges` GREW the R1 columns after build_version 2, and every query naming one raised a raw OperationalError on an older database — verified live: key_edges, chain_trace and dossier all died on `no such column: s.dispatch_mode`.
Given
db = tmp_path / "pre_r1.db"_pre_r1_key_db(db)→ When
downstream = [c for c in q.callees(db, "producer") if c.edge_class == "key"]edge = downstream[0]q.callers(db, "consumer")2 more d = q.function_dossier(db, "producer")q.chain_trace(db, "producer", max_depth=2)→ Then
✓ len(downstream) equals 1✓ edge.name equals "consumer"✓ edge.key_name equals "STATE_KEY"✓ edge.dispatch_mode equals "unknown"✓ edge.edge_triggered is None✓ edge.crosses_thread is None✓ edge.to_thread is None✓ {c.name for c in q.callers(db, "consumer") if c.edge_class == "key"} equals {"producer"}✓ d is not None✓ [w.other for w in d.writes] equals ["consumer"]✓ {n.name for n in q.chain_trace(db, "producer", max_depth=2).nodes} contains "consumer"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.
… 17 earlier steps
callercaller callercaller clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/recovery.pyclew/query/recovery.py clew/query/recovery.pyclew/query/recovery.py dossier 18. _documentation_mentions → table_exists 18 table_exists 19. _documentation_mentions → has_columns 19 has_columns 20. has_columns → table_exists 20 table_exists 21–22. _hint_from → _name_exists 21 _name_exists +1 more … 23 steps between
callercaller callercaller clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py other filesother files other filesother files dossier 46. _ambiguity_counts → table_exists 46 table_exists 47. _ambiguity_counts → function_candidates 47 function_candidates 48–51. function_candidates → table_exists 48 table_exists +3 more 52–53. matching_identity → qualified_name_of 52 qualified_name_of +1 more … 4 steps between
callercaller callercaller clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py other filesother files other filesother files dossier 58. macro_definitions → connect 58 connect 59. macro_definitions → macro_definitions_conn 59 macro_definitions_conn 60. macro_definitions_conn → has_columns 60 has_columns ▶ test enters 61–62. macro_definitions_conn → _macro_def 61 _macro_def +1 more 63. gates_covering → table_exists 63 table_exists ▶ test enters 64. gates_covering → has_columns 64 has_columns 65. gates_covering → _gate_columns 65 _gate_columns … 12 steps between
callercaller callercaller clew/query/payload.pyclew/query/payload.py clew/query/payload.pyclew/query/payload.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py other filesother files other filesother files dossier 78. _referenced_by → table_exists 78 table_exists 79. _macro_def → symbol_provenance 79 symbol_provenance 80. symbol_provenance → records_provenance 80 records_provenance ▶ test enters 81. records_provenance → has_columns 81 has_columns 82. _gate_definitions → _gate_definition_gaps 82 _gate_definition_gaps 83. _flatten_subject → _empty_callers_note 83 _empty_callers_note … 51 steps between
callercaller callercaller clew/query/subject.pyclew/query/subject.py clew/query/subject.pyclew/query/subject.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py opt (line 1012) opt opt (line 777) opt alt (line 780) alt opt (line 1014) opt dossier 135. dossier → connect 135 connect 136. dossier → identity_rowids 136 identity_rowids 137. identity_rowids → function_candidates 137 function_candidates ▶ test enters 138–139. identity_rowids → qualified_name_of 138 qualified_name_of +1 more 140–141. identity_rowids → qualified_name_of 140 qualified_name_of +1 more 142. dossier → _selector_from_signature 142 _selector_from_signature 143. _selector_from_signature → qualified_name_of 143 qualified_name_of … 21 steps between
callercaller callercaller clew/query/subject.pyclew/query/subject.py clew/query/subject.pyclew/query/subject.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/traversal.pyclew/query/traversal.py clew/query/traversal.pyclew/query/traversal.py opt (line 547) opt dossier 165. dossier → _chain_for 165 _chain_for 166. _chain_for → chain_trace 166 chain_trace 167. chain_trace → _normalize_direction 167 _normalize_direction ▶ test enters 168. chain_trace → _identity_chain 168 _identity_chain 169. _identity_chain → connect 169 connect … 2 steps between
callercaller callercaller clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/traversal.pyclew/query/traversal.py clew/query/traversal.pyclew/query/traversal.py loop (line 429) loop dossier 172. _identity_walk → qualified_name_of 172 qualified_name_of 173. _identity_walk → _make_node 173 _make_node 174. _make_node → termini_for 174 termini_for 175. termini_for → table_exists 175 table_exists 176. _make_node → _reqs_for 176 _reqs_for 177. _reqs_for → table_exists 177 table_exists 178. _identity_walk → _identity_call_hops 178 _identity_call_hops 179. _identity_call_hops → table_exists 179 table_exists … 6 steps between
callercaller callercaller caller clew/mcp_server/tools_query.pyclew/mcp_server/tools_query.py clew/mcp_server/tools_query.pyclew/mcp_server/tools_query.py clew/mcp_server/tools_query.py clew/query/payload.pyclew/query/payload.py clew/query/payload.pyclew/query/payload.py clew/query/payload.py clew/query/_common.pyclew/query/_common.py clew/query/_common.pyclew/query/_common.py clew/query/_common.py clew/query/traversal.pyclew/query/traversal.py clew/query/traversal.pyclew/query/traversal.py clew/query/traversal.py other filesother files other filesother files other files loop (line 429) loop loop (line 437) loop loop (line 156) loop loop (line 191) loop loop (line 558) loop loop (line 570) loop opt (line 239) opt opt (line 285) opt loop ×2 (line 208) loop ×2 dossier 186–187. _identity_walk → _record_identity 186 _record_identity +1 more 188. chain_trace → connect 188 connect ▶ test enters 189. chain_trace → function_candidates 189 function_candidates 190. chain_trace → candidate_rows 190 candidate_rows 191–193. candidate_rows → symbol_provenance 191 symbol_provenance +2 more 194. chain_trace → is_overloaded 194 is_overloaded 195–198. chain_trace → _make_node 195 _make_node +3 more 199. _call_hops → table_exists 199 table_exists 200. _call_hops → _collapse_variants 200 _collapse_variants 201. _neighbors → _key_hops 201 _key_hops 202. _key_hops → _key_edge_rows 202 _key_edge_rows 203. _key_edge_rows → table_exists 203 table_exists 204. _key_edge_rows → _key_r1_projection 204 _key_r1_projection 205. _key_r1_projection → has_columns 205 has_columns 206. _key_r1_projection → table_exists 206 table_exists 207–208. _key_hops → to_bool 207 to_bool ×2 209. chain_trace → _expand_neighbor 209 _expand_neighbor 210. _expand_neighbor → resolve_rowid 210 resolve_rowid 211. resolve_rowid → table_exists 211 table_exists 212. resolve_rowid → function_candidates 212 function_candidates 213. resolve_rowid → _test_scope_term 213 _test_scope_term 214. _expand_neighbor → _make_node 214 _make_node 215. subject_payload → _flatten_subject 215 _flatten_subject 216. dossier → db 216 db … 10 later steps
3 more tests/test_query.py:356 · its file's page
What it checks (10) assert len(downstream) == 1 observes callees via downstream assert edge.name == "consumer" not attributed assert edge.key_name == "STATE_KEY" not attributed assert edge.dispatch_mode == "unknown" not attributed assert edge.edge_triggered is None not attributed assert edge.crosses_thread is None not attributed assert edge.to_thread is None not attributed assert {c.name for c in q.callers(db, "consumer") if c.edge_class == "key"} == {"producer"} observes callers assert d is not None and [w.other for w in d.writes] == ["consumer"] observes function_dossier via d assert "consumer" in {n.name for n in q.chain_trace(db, "producer", max_depth=2).nodes} observes chain_trace Where the product reaches it dossier → _chain_for → chain_trace (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.
and 3 more requirement paths, listed below.
Also reaches 15 requirements Its run touches their code; that is reach, not proof.