test_comments_are_read_without_a_built_index¶
Tests › tests/test_wiki_comments.py
What this test is for
Why it exists
Found end to end (2.1): reading through `answering` refused an unbuilt target. A comment belongs to the repository, so reading one needs no index.
Given
repo = tmp_path / "repo"repo.mkdir()
When
_mcp, server = build_server(st.TargetRegistry(tmp_path / "state"))CommentStore.for_repo(tmp_path / "state", str(repo)).add( page="a.html", anchor="", quote="", body="hi" )reply = await server.index(None, action="comments", target=str(repo))
Then
- ✓ reply["count"] equals 1
- ✓ reply["comments"][0]["body"] equals "hi"
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 · 18 of 153 steps
… 12 steps between
… 31 steps between
… 67 steps between
… 5 later steps
7 more
- clew-mcp — `main` (clew/mcp_server/server.py) · 9 of 17 steps
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 4 of 142 steps
- clew — `main` (clew/cli.py) · 4 of 400 steps
- Build this wiki from the index · 3 of 400 steps
- Look up one name: everything the index holds about it · 3 of 226 steps
- `main` (clew/guard/main.py) · 3 of 357 steps
- `main` (scripts/incremental_probe.py) · 1 of 3 steps
tests/test_wiki_comments.py:106 · its file's page
What it checks (1)
assert reply["count"] == 1 and reply["comments"][0]["body"] == "hi"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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-002 measured
- REQ-DDB-MCP-003 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-WIKI-034 measured
- REQ-DDB-WIKI-054 measured