test_clew_documents_itself_with_its_own_wiki

Tests › tests/test_docs_current.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. config, problems = load_wiki_config(REPO)
  2. docs = [*REPO.glob("*.md"), *(REPO / "docs").glob("*.md")]
  3. kinds = { d.relative_to(REPO).as_posix(): doc_kind(d.relative_to(REPO).as_posix(), config.doc_kinds) for d in docs }
  4. all(kinds.values())
→

Then

  1. ✓ problems equals []
  2. ✓ all(kinds.values()) holds
  3. ✓ kinds["AGENTS.md"] equals "agents"
  4. ✓ kinds["SKILLS.md"] equals "agents"
  5. ✓ {(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

callercallercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyother filesother filesother filesother filesother filestry (line 708)tryopt (line 445)optloop (line 417)loopopt (line 420)optalt (line 421)altloop (line 135)looploop (line 632)looptry (line 752)tryloop (line 1312)loopopt (line 1314)optbuild_wiki1. build_wiki → load_wiki_config1load_wiki_config2. load_wiki_config → _read_section2_read_section▶ test enters3–6. load_wiki_config → _overlaid3_overlaid +3 more7. _requirements_section → read_requirements_section7read_requirements_section8. read_requirements_section → _validate_node8_validate_node9–11. _validate_node → _validate_map_of9_validate_map_of +2 more12–13. _validate_node → _validate_dict_node12_validate_dict_node +1 more14–16. _validate_dict_node → _suggest_key14_suggest_key +2 more17. _validate_dict_node → _validate_node17_validate_node18–21. load_wiki_config → _top_level18_top_level +3 more22. _strings → all22all23–25. all → _events23_events +2 more26–28. load_wiki_config → _strings26_strings +2 more29. _audiences → _unknown29_unknown30–37. load_wiki_config → _pinned_catalogs30_pinned_catalogs +7 more38. _declared_report → read_guard_section38read_guard_section39–41. load_wiki_config → _issues39_issues +2 more42. _sbom → all42all43–47. load_wiki_config → _one_of43_one_of +4 more48. _comments → all48all49–55. load_wiki_config → _doc_tags49_doc_tags +6 more56. build_wiki → report_limit56report_limit57. build_wiki → _build_site57_build_site

… 343 later steps

3 more

tests/test_docs_current.py:120 · its file's page

What it checks (4)

  1. assert problems == [] not attributed
  2. assert all(kinds.values()), {k: v for k, v in kinds.items() if not v} observes all
  3. assert kinds["AGENTS.md"] == "agents" and kinds["SKILLS.md"] == "agents" observes doc_kind via kinds
  4. assert {(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

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)
  • build_wiki → load_wiki_config (flow)

Call flow

test_clew_documents_itself_with_its_own_wiki→load_wiki_config→doc_kind→all

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.

test_clew_documents_itself_with_its_own_wiki · 4 checksload_wiki_config_requirements_sectionread_requirements_sectionREQ-DDB-GUARD-012 · measureddoc_kindREQ-DDB-WIKI-031 · measuredallREQ-DDB-WIKI-054 · inferred
Also reaches 3 requirements

Its run touches their code; that is reach, not proof.