test_an_unbuilt_row_carries_no_staleness_block¶
Tests › tests/test_derived_target_listing.py
What this test is for
Why it exists
WHAT MADE THE REPLY 127,867 CHARACTERS. Each unbuilt row carried the full `db_status` projection including a staleness block — a paragraph explaining that a database which was never built is not current. Three hundred of those is the whole overflow.
Given
repo = tmp_path / "repo"repo.mkdir()
4 more
reg = st.TargetRegistry(tmp_path / "state")built = reg.register(repo.resolve(), name=FIRST_PARTY_INDEX)Path(built.db_path).write_bytes(rich_db.read_bytes())reg.note_derived(built.repo_path, (FIRST_PARTY_INDEX, "deps-tinyfsm"))
When
_mcp, server = build_server(reg)unbuilt = next(r for r in server.list_targets() if r.get("sub_index") == "deps-tinyfsm")
Then
- ✓ unbuilt["exists"] is False
- ✓ unbuilt does not contain "staleness"
- ✓ unbuilt does not contain "age_days"
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.
Build, refresh and check the index · 47 of 153 steps
… 16 earlier steps
… 76 steps between
5 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 32 of 142 steps
- `main` (scripts/stage_probe.py) · 30 of 37 steps
- clew-mcp — `main` (clew/mcp_server/server.py) · 10 of 17 steps
- clew — `main` (clew/cli.py) · 2 of 400 steps
- `main` (scripts/incremental_probe.py) · 2 of 3 steps
tests/test_derived_target_listing.py:189 · its file's page
What it checks (3)
assert unbuilt["exists"] is Falsenot attributedassert "staleness" not in unbuilt, "a database that was never built has no staleness"not attributedassert "age_days" not in unbuilt, "nor an age"not attributed
Where the product reaches it
main→build_server(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 10 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-INDEX-003 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-002 measured
- REQ-DDB-MCP-003 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-WIKI-034 measured
- REQ-DDB-WIKI-054 measured