test_overviews_declaration_example_loads_and_means_what_it_says

Tests › tests/test_declared_doxyfile.py

passed Passed in the packaged run.

What this test is for

Why it exists

F2: `kconfig: {path:}` (the key is `root`), `event_tags: {emits: produce}` (the roles are `producer` / `consumer`) and `doxyfile:` were documented and wrong. The block is loaded as written, so the reference cannot drift from the loader again.

Given

  1. text = (REPO / "docs" / "OVERVIEW.md").read_text(encoding="utf-8")
  2. block = re.search( r"```yaml\n# a --declare document, or <repo>/\.clew\.yaml\n(.*?)```", text, re.S )
3 more
  1. (tmp_path / "doxygen").mkdir()
  2. (tmp_path / "doxygen" / "project.doxyfile").write_text("INPUT = .\n", encoding="utf-8")
  3. (tmp_path / ".clew.yaml").write_text(block.group(1), encoding="utf-8")
→

When

  1. decl = load_declaration(tmp_path)
  2. declared_event_tags(decl)
→

Then

  1. ✓ block holds
  2. ✓ decl["kconfig"] equals {"root": "Kconfig"}
  3. ✓ set((declared_event_tags(decl) or {}).values()) equals {"producer", "consumer"}

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) · 19 of 142 steps

… 99 earlier steps

thread startthread startthread startthread startthread startclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyother filesother filesother filesother filesother filesalt (line 1171)altloop (line 135)loopopt (line 531)optopt (line 445)optloop (line 417)loopopt (line 420)optalt (line 421)altopt (line 533)optopt (line 547)opttry (line 548)try_first_build_worker100. declared_scope_rejection → _declared_index_scope100_declared_index_scope101. _declared_index_scope → load_declaration_located101load_declaration_located102–106. load_declaration_located → _read_mapping102_read_mapping +4 more107. _checked_list_section → all107all108–110. all → _events108_events +2 more111. _checked_section → _checked_requirements111_checked_requirements112. _checked_requirements → _validate_node112_validate_node113–115. _validate_node → _validate_map_of113_validate_map_of +2 more116–117. _validate_node → _validate_dict_node116_validate_dict_node +1 more118. _validate_dict_node → _suggest_key118_suggest_key119. _suggest_key → list119list120. _validate_dict_node → _validate_node120_validate_node121–122. _checked_section → _checked_tests121_checked_tests +1 more123. _checked_tests → 123… 1 call not run124. _checked_section → check_manifest_document124check_manifest_document125–127. check_manifest_document → _checked_document125_checked_document +2 more128. _checked_section → _check_section_keys128_check_section_keys129–130. _declared_index_scope → _existing_paths129_existing_paths +1 more

… 4 steps between

thread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyother filesother filesother filesother filescatch (line 3328)catch_first_build_worker135. _sub_index_scope → declared_sub_index_excludes135declared_sub_index_excludes136. declared_sub_index_excludes → load_declaration136load_declaration137. load_declaration → load_declaration_located137load_declaration_located▶ test enters138. _run_build_walked → _bounded_output138_bounded_output139. _bounded_output → all139all

… 3 later steps

3 more

tests/test_declared_doxyfile.py:71 · its file's page

What it checks (3)

  1. assert block, "OVERVIEW.md's declaration example block was not found" not attributed
  2. assert decl["kconfig"] == {"root": "Kconfig"} observes load_declaration via decl
  3. assert set((declared_event_tags(decl) or {}).values()) == {"producer", "consumer"} observes declared_event_tags

Where the product reaches it

  • main → propose_main → propose → build_context → load_declaration (flow)

Call flow

test_overviews_declaration_example_loads_and_means_what_it_says→load_declaration→declared_event_tags

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_overviews_declaration_example_loads_and_means_what_it_says · 3 checksload_declarationREQ-DDB-CONFIG-001 · measuredload_declaration… 4 calls …_validate_nodeREQ-DDB-GUARD-012 · measuredload_declaration… 4 calls …allREQ-DDB-WIKI-054 · inferred
Also reaches 3 requirements

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