test_a_huge_output_is_capped_whatever_its_shape¶
Tests › tests/test_reply_bounds.py
What this test is for
Why it exists
THE BACKSTOP, because collapsing is content-dependent and the overflow must not be. 253,867 characters reached a client that discards past its limit in silence; a bound that only works on the shapes seen so far is not a bound.
Given
text = "\n".join(f"INFO unique line {i} with padding {'x' * 60}" for i in range(4000))
When
out = _bounded_output(text)
Then
- ✓ len(out) is at most _OUTPUT_CAP * 2
- ✓ out contains "buildlog"
- ✓ out contains "INFO unique line 0"
- ✓ out contains "INFO unique line 3999"
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:116 · its file's page
What it checks (4)
assert len(out) <= _OUTPUT_CAP * 2, f"{len(out)} characters is not a bound"observes_bounded_outputviaoutassert "buildlog" in out, "say where the full stream is"observes_bounded_outputviaoutassert "INFO unique line 0" in out, "the head carries the scope explanation"observes_bounded_outputviaoutassert "INFO unique line 3999" in out, ( "the TAIL carries the build summary — `test_the_build_runs_in_process_and_keeps_stdout_" "clean` asserts `memberdef` reaches the caller, and it is the last thing emitted" )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