test_the_code_axis_says_the_data_is_still_current¶
Tests › tests/test_freshness.py
What this test is for
Why it exists
MEASURED, and the reason the wording is pinned by a test: query tools open the database per call, so newly-added symbols appear immediately even while the process runs old logic. Saying "the server is stale" without that qualification trades one wrong conclusion for the opposite one, and would send someone rebuilding an index that was never the problem.
Given
code = dict(MATCHING_CODE, source_fingerprint="bbbbbbbbbbbb", matches_source=False)
When
message = _message(fr.notices(_status(), code), fr.AXIS_CODE)
Then
- ✓ message contains "READS are not affected"
- ✓ message contains "read"
- ✓ message contains "live"
- ✓ message contains "rebuild cannot fix this"
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:311 · its file's page
What it checks (3)
assert "READS are not affected" in messageobserves_messageviamessageassert "read" in message and "live" in messageobserves_messageviamessageassert "rebuild cannot fix this" in messageobserves_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