test_the_code_axis_says_a_build_through_it_is_refused¶
Tests › tests/test_freshness.py
What this test is for
Why it exists
THE OTHER HALF OF THE SAME SENTENCE, and the half whose absence was measured (gh#348). The message used to read "The DATA is not affected", full stop — TRUE FOR READS, FALSE FOR WRITES. A build-30 process rebuilt a build-32 index AT 30, the `external` stage vanished from the stage list, and `status` then reported `stale: false, build_version: 30` — perfectly healthy, having just destroyed a layer.
Given
code = dict(MATCHING_CODE, source_fingerprint="bbbbbbbbbbbb", matches_source=False)
When
message = _message(fr.notices(_status(), code), fr.AXIS_CODE)
Then
- ✓ message.lower() contains "refused"
- ✓ message contains "DROP WHOLE LAYERS"
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) · 6 of 142 steps
… 87 earlier steps
… 42 later steps
2 more
- Build, refresh and check the index · 6 of 153 steps
- `main` (scripts/stage_probe.py) · 6 of 37 steps
tests/test_freshness.py:332 · its file's page
What it checks (2)
assert "refused" in message.lower(), "a stale process must not be invited to build"observes_messageviamessageassert "DROP WHOLE LAYERS" in message, "name the consequence, not just the prohibition"observes_messageviamessage
Where the product reaches it
index→_index_action→build_or_refresh→db_status→notices(flow)
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-MCP-004 measured