test_a_docstring_already_in_the_body_is_served_once

Tests › tests/test_compact_wire.py

passed Passed in the packaged run.

What this test is for

Why it exists

1.3.9. A Python docstring sits INSIDE the body excerpt, and doxygen serves the same text again as `detail` — measured at 14.7% of this repository's dossier bytes. In the compact shape `detail` is dropped when the body already carries it, and `detail_in_body: true` says so, so an absent `detail` is never read as "undocumented".

Given

  1. payload = { "brief": "Fetch the widget.", "detail": _DOC, "body": {"lines": ["def fetch(id):", f' """{_DOC}"""', " return cache[id]"]}, }
→

When

  1. out = compact_docs(copy.deepcopy(payload))
→

Then

  1. ✓ out does not contain "detail"
  2. ✓ out["detail_in_body"] is True
  3. ✓ out["brief"] equals payload["brief"]

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

… 102 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.pyloop (line 1539)loopdossier103. _batched_dossiers → _wire_shape103_wire_shape104. _wire_shape → compact_docs104compact_docs105. compact_docs → _uncarried_sentences105_uncarried_sentences▶ test enters106. _wire_shape → compact_neighbours106compact_neighbours107. compact_neighbours → _edge_defaults107_edge_defaults

… 119 later steps

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

What it checks (2)

  1. assert "detail" not in out and out["detail_in_body"] is True observes compact_docs via out
  2. assert out["brief"] == payload["brief"] observes compact_docs via out

Where the product reaches it

  • dossier → _wire_shape → compact_docs (flow)

Call flow

test_a_docstring_already_in_the_body_is_served_once→compact_docs

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_a_docstring_already_in_the_body_is_served_once · 2 checkscompact_docsREQ-DDB-QUERY-014 · measured
Also reaches 1 requirement

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