passed Passed in the packaged run.
What this test is for Why it exists
The direction axis is spelled three ways for the same thing — `want_callers` / `as_writer` / `forward` — with want_callers=True ⟺ as_writer=False. Inverting it silently answers the OPPOSITE causal question with no error, so pin both directions against the KeyEdge view they must mirror.
Verifies REQ-DDB-QUERY-002 REQ-DDB-QUERY-004
Given
conn = _sqlite3.connect(str(rich_db))→ When
try: # callers(reader) must be the WRITERS whose values it reads. upstream = {c.name for c in q.callers(rich_db, "telemetry_report") if c.edge_class == "key"} assert upstream == {k.other for k in key_edges(conn, "telemetry_report", as_writer=False)} assert "sensor_poll" in upstream # callees(writer) must be the READERS of what it writes. downstream = {c.name for c in q.callees(rich_db, "sensor_poll") if c.edge_class == "key"} assert downstream == {k.other for k in key_edges(conn, "sensor_poll", as_writer=True)} assert "telemetry_report" in downstream finally: conn.close()→ 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 … 81 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 … 37 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 other filesother files other filesother files loop (line 362) loop loop (line 368) loop loop (line 429) loop dossier 181. _identity_call_hops → qualified_name_of 181 qualified_name_of 182. _identity_call_hops → _collapse_variants 182 _collapse_variants 183. _collapse_variants → _variant_rank 183 _variant_rank ▶ test enters 184. _identity_walk → identity_rowids 184 identity_rowids 185. _identity_walk → _cap_at_depth 185 _cap_at_depth … 15 steps between
callercaller callercaller caller 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 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 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 ▶ test enters 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 ▶ test enters 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 … 11 later steps
3 more tests/test_query.py:161 · its file's page
What it checks (4) assert upstream == {k.other for k in key_edges(conn, "telemetry_report", as_writer=False)} observes key_edges assert "sensor_poll" in upstream observes callers via upstream assert downstream == {k.other for k in key_edges(conn, "sensor_poll", as_writer=True)} observes key_edges assert "telemetry_report" in downstream observes callees via downstream 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.
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 (2) Also reaches 4 requirements Its run touches their code; that is reach, not proof.