test_the_exported_dossier_answers_about_a_non_function_subject

Tests › tests/test_subject_surface.py

passed Passed in the packaged run.

What this test is for

Why it exists

`clew.query.dossier` was the FUNCTION-ONLY form while the MCP tool of the same name described any indexed kind, so the documented `from clew.query import dossier` returned `None` for a requirement, lock, thread, class or variable — and `None` is also what "not indexed" looks like, so the weaker function was indistinguishable from an empty index.

Given

  1. —
→

When

  1. req = next(iter(q.all_req_edges(rich_db)), None)
  2. wide = q.dossier(rich_db, req.req_id)
  3. q.function_dossier(rich_db, req.req_id)
→

Then

  1. ✓ req is not None
  2. ✓ wide is not None
  3. ✓ wide.kind equals "requirement"
  4. ✓ q.function_dossier(rich_db, req.req_id) is None

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.

Look up one name: everything the index holds about it · 18 of 226 steps

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 23 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesdossier46. _ambiguity_counts → table_exists46table_exists47. _ambiguity_counts → function_candidates47function_candidates48. function_candidates → table_exists48table_exists▶ test enters49–51. function_candidates → _test_scope_term49_test_scope_term +2 more52–53. matching_identity → qualified_name_of52qualified_name_of +1 more

… 4 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesdossier58. macro_definitions → connect58connect59. macro_definitions → macro_definitions_conn59macro_definitions_conn60. macro_definitions_conn → has_columns60has_columns▶ test enters61. macro_definitions_conn → _macro_def61_macro_def62. _macro_def → gates_covering62gates_covering63. gates_covering → table_exists63table_exists

… 78 steps between

callercallercallercallerclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyopt (line 1012)optopt (line 1014)optdossier142. dossier → _selector_from_signature142_selector_from_signature143. _selector_from_signature → qualified_name_of143qualified_name_of144. dossier → _rank_enum_over_mirror144_rank_enum_over_mirror▶ test enters145. _rank_enum_over_mirror → connect145connect146. _rank_enum_over_mirror → _class_side_is_only_enum_mirrors146_class_side_is_only_enum_mirrors

… 2 steps between

callercallercallercallerclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyother filesother filesother filesother filesopt (line 1021)optdossier149. _derives_from_py_enum → all149all150. _class_side_is_only_enum_mirrors → all150all151. dossier → resolve_subject151resolve_subject▶ test enters152. resolve_subject → connect152connect153–154. dossier → _qualified_reread153_qualified_reread +1 more155. _split_qualified → bare_tail155bare_tail156. _split_qualified → connect156connect157. _split_qualified → identity_rowids157identity_rowids

… 3 steps between

callercallercallercallerclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyopt (line 1078)optdossier161–162. _qualified_reread → _rank_enum_over_mirror161_rank_enum_over_mirror +1 more163. dossier → _chosen_kind163_chosen_kind▶ test enters164. dossier → connect164connect165. dossier → _chain_for165_chain_for166. _chain_for → chain_trace166chain_trace167. chain_trace → _normalize_direction167_normalize_direction

… 41 steps between

callercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyother filesother filesother filesother filesloop (line 558)looploop (line 570)loopopt (line 239)optopt (line 285)optdossier209. chain_trace → _expand_neighbor209_expand_neighbor210. _expand_neighbor → resolve_rowid210resolve_rowid211. resolve_rowid → table_exists211table_exists▶ test enters212. resolve_rowid → function_candidates212function_candidates213. resolve_rowid → _test_scope_term213_test_scope_term214. _expand_neighbor → _make_node214_make_node215. subject_payload → _flatten_subject215_flatten_subject

… 11 later steps

3 more

tests/test_subject_surface.py:650 · its file's page

What it checks (3)

  1. assert req is not None, "precondition: the fixture must hold at least one requirement edge" observes all_req_edges via req
  2. assert wide is not None and wide.kind == "requirement", ( f"the exported `dossier` returned {wide!r} for requirement {req.req_id!r}; it must be " f"the any-kind form, matching the MCP tool that shares its name" ) observes all_req_edges via req
  3. assert q.function_dossier(rich_db, req.req_id) is None, ( "`function_dossier` must stay the narrow form — if it answers about a requirement too, " "the two exported names describe one behaviour and the distinction is undocumented" ) observes function_dossier

Where the product reaches it

  • dossier is the entry of the flow (flow)

Call flow

test_the_exported_dossier_answers_about_a_non_function_subject→all_req_edges→dossier→function_dossier

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.

test_the_exported_dossier_answers_about_a_non_function_subject · 3 checksfunction_dossier_dossier_connsymbol_provenanceREQ-DDB-INDEX-004 · inferredfunction_dossier… 5 calls …is_python_treeREQ-DDB-PIPE-003 · inferredfunction_dossier… 5 calls …_parseable_fileREQ-DDB-PIPE-011 · inferredfunction_dossier… 5 calls …has_languageREQ-DDB-PIPE-012 · inferredfunction_dossierconnectREQ-DDB-QUERY-001 · measuredfunction_dossier_dossier_connunresolved_inbound_for_rowidsREQ-DDB-QUERY-002 · inferredall_req_edgestable_existsREQ-DDB-QUERY-003 · measuredfunction_dossierREQ-DDB-QUERY-004 · measureddossier_chain_forchain_trace_make_nodeREQ-DDB-QUERY-005 · inferredfunction_dossier_dossier_conngates_coveringREQ-DDB-QUERY-006 · inferredfunction_dossierREQ-DDB-QUERY-009 · measuredfunction_dossierREQ-DDB-QUERY-010 · measured

and 4 more requirement paths, listed below.

Also reaches 18 requirements

Its run touches their code; that is reach, not proof.