test_clew_documents_itself_with_its_own_wiki¶
Tests › tests/test_docs_current.py
What this test is for
Why it exists
DOGFOOD: clew's own `.clew.yaml` builds its wiki — every shipped doc has a kind, the agent docs are kept apart, and the MCP tool handlers are declared as product flows.
Given
- —
When
config, problems = load_wiki_config(REPO)docs = [*REPO.glob("*.md"), *(REPO / "docs").glob("*.md")]kinds = { d.relative_to(REPO).as_posix(): doc_kind(d.relative_to(REPO).as_posix(), config.doc_kinds) for d in docs }all(kinds.values())
Then
- ✓ problems equals []
- ✓ all(kinds.values()) holds
- ✓ kinds["AGENTS.md"] equals "agents"
- ✓ kinds["SKILLS.md"] equals "agents"
- ✓ {(f.entry, f.file) for f in config.flows} is at least { ("dossier", "clew/mcp_server/tools_query.py"), ("search", "clew/mcp_server/tools_query.py"), ("index", "clew/mcp_server/server.py"), }
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 this wiki from the index · 42 of 400 steps
… 343 later steps
3 more
- `main` (clew/guard/main.py) · 4 of 357 steps
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 3 of 142 steps
- clew — `main` (clew/cli.py) · 3 of 400 steps
tests/test_docs_current.py:120 · its file's page
What it checks (4)
assert problems == []not attributedassert all(kinds.values()), {k: v for k, v in kinds.items() if not v}observesallassert kinds["AGENTS.md"] == "agents" and kinds["SKILLS.md"] == "agents"observesdoc_kindviakindsassert {(f.entry, f.file) for f in config.flows} >= { ("dossier", "clew/mcp_server/tools_query.py"), ("search", "clew/mcp_server/tools_query.py"), ("index", "clew/mcp_server/server.py"), }not attributed
Where the product reaches it
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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-012 measured
- REQ-DDB-WIKI-031 measured
- REQ-DDB-WIKI-054 inferred