test_repeated_warnings_collapse_to_one_line_and_a_count¶
Tests › tests/test_reply_bounds.py
What this test is for
Why it exists
THE REPORTED SHAPE. Ninety-five lines differing only in the header name are one fact, and a reply that spends ninety-five lines on it has spent them instead of on the stage costs and the coverage block a reader came for.
Given
lines = [f"WARNING file_docs: could not read sys{i}.h, skipping" for i in range(95)]
When
out = _bounded_output("\n".join(["INFO stage resolve: 96 ms", *lines, "INFO build complete"]))
Then
- ✓ out contains "INFO stage resolve: 96 ms"
- ✓ out contains "INFO build complete"
- ✓ out contains "sys0.h"
- ✓ out does not contain "sys50.h"
- ✓ out contains "94"
- ✓ out.count("could not read") equals 1
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.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 1 of 142 steps
… 136 earlier steps
… 1 later step
tests/test_reply_bounds.py:40 · its file's page
What it checks (6)
assert "INFO stage resolve: 96 ms" in out, "the stage costs are what a reader acts on"observes_bounded_outputviaoutassert "INFO build complete" in out, "the tail must survive collapsing the middle"observes_bounded_outputviaoutassert "sys0.h" in out, "the first of a collapsed group stays verbatim"observes_bounded_outputviaoutassert "sys50.h" not in out, "the ninety-fifth namesake is buildlog material"observes_bounded_outputviaoutassert "94" in out, "the count of collapsed lines must be disclosed"observes_bounded_outputviaoutassert out.count("could not read") == 1, f"one line for the group, got:\n{out}"observes_bounded_outputviaout
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.
Call 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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-054 inferred