test_rows_are_grouped_by_file_and_shared_values_stated_once

Tests › tests/test_compact_wire.py

passed Passed in the packaged run.

What this test is for

Why it exists

Groups by file in first-seen order; the modal values move to edge_defaults.

Given

  1. —
→

When

  1. compact = compact_neighbours(copy.deepcopy(_FLAT))
  2. first = compact["callers"][0]["rows"][0]
→

Then

  1. ✓ [g["file"] for g in compact["callers"]] equals ["x.ts", "y.ts"]
  2. ✓ compact["edge_defaults"] equals { "source": "ast", "confidence": "resolved", "edge_class": "call", }
  3. ✓ first equals {"name": "a"}
  4. ✓ compact["callers"][0]["rows"] contains {"name": "c", "source": "doxygen_sqlite"}

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 · 3 of 226 steps

… 104 earlier steps

callercallercallercallerclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyother filesother filesother filesother filesloop (line 845)looploop (line 135)looploop (line 827)loopopt (line 829)optdossier105. compact_docs → _uncarried_sentences105_uncarried_sentences106. _wire_shape → compact_neighbours106compact_neighbours107. compact_neighbours → _edge_defaults107_edge_defaults▶ test enters108. _edge_defaults → all108all109–111. all → _events109_events +2 more112. compact_neighbours → _grouped112_grouped113–114. _batched_dossiers → _answered113_answered +1 more

… 112 later steps

tests/test_compact_wire.py:109 · its file's page

What it checks (4)

  1. assert [g["file"] for g in compact["callers"]] == ["x.ts", "y.ts"] observes compact_neighbours via compact
  2. assert compact["edge_defaults"] == { "source": "ast", "confidence": "resolved", "edge_class": "call", } observes compact_neighbours via compact
  3. assert first == {"name": "a"}, first not attributed
  4. assert {"name": "c", "source": "doxygen_sqlite"} in compact["callers"][0]["rows"] observes compact_neighbours via compact

Where the product reaches it

  • dossier → _wire_shape → compact_neighbours (flow)

Call flow

test_rows_are_grouped_by_file_and_shared_values_stated_once→compact_neighbours

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_rows_are_grouped_by_file_and_shared_values_stated_once · 4 checkscompact_neighboursREQ-DDB-QUERY-014 · measuredcompact_neighbours_edge_defaultsallREQ-DDB-WIKI-054 · inferred
Also reaches 2 requirements

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