test_wiki_site.py¶
tests/test_wiki_site.py
The wiki site, round 2 (owner 2026-11-15, after the demo sites): W13, W14, W17, W18.
test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal
None test_wiki_site.test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal(tuple[Path, Path] repo, Path tmp_path, pytest.MonkeyPatch monkeypatch)
Undrawable discovered flows are reported, not fatal.
Checks
assert "ghost" in flows and "vendor/x.c" in flows and "not drawn" in flows
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-001 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _commit → git_argv |
| REQ-DDB-CONFIG-003 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-GUARD-012 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-024 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _prose → impact_path → load_guard_config → read_guard_config → load_config → apply_opt_in_languages |
| REQ-DDB-GUARD-027 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _product_section → compose → _walk → _nested_specs → git_text |
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-004 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _all_flows → entry_point_flows → _scripts → console_scripts |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → api_pages → connect |
| REQ-DDB-QUERY-003 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → symbol_pages → table_exists |
| REQ-DDB-QUERY-004 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → symbol_pages → _owners_by_file → file_owners |
| REQ-DDB-QUERY-010 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-SCHEMA-006 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → resolve_catalog_path |
| REQ-DDB-SCHEMA-015 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _product_section → compose → _nodes → link_ids |
| REQ-DDB-WIKI-001 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page → derive_flow |
| REQ-DDB-WIKI-002 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → parse_junit |
| REQ-DDB-WIKI-003 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki |
| REQ-DDB-WIKI-004 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → nodes_page |
| REQ-DDB-WIKI-005 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → report_limit |
| REQ-DDB-WIKI-007 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → valid_key |
| REQ-DDB-WIKI-010 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → parse_features |
| REQ-DDB-WIKI-011 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _render → sphinx_settings |
| REQ-DDB-WIKI-012 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → requirements_page |
| REQ-DDB-WIKI-013 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _burndown → burndown |
| REQ-DDB-WIKI-014 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-015 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _prose → impact_path |
| REQ-DDB-WIKI-016 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _coverage → parse_contexts |
| REQ-DDB-WIKI-017 | measured | |
| REQ-DDB-WIKI-018 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _all_flows → entry_point_flows |
| REQ-DDB-WIKI-019 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → build_graph |
| REQ-DDB-WIKI-020 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → write_quick_views → modal |
| REQ-DDB-WIKI-021 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → minimap_html |
| REQ-DDB-WIKI-022 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → requirements_page → requirement_pages |
| REQ-DDB-WIKI-023 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flows_index |
| REQ-DDB-WIKI-024 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → impact_page |
| REQ-DDB-WIKI-025 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → commit_published |
| REQ-DDB-WIKI-026 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → gather |
| REQ-DDB-WIKI-027 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _test_flows |
| REQ-DDB-WIKI-028 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _fetch_issues → provider_for |
| REQ-DDB-WIKI-029 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → write_exports |
| REQ-DDB-WIKI-031 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → find_decisions |
| REQ-DDB-WIKI-035 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page → test_node |
| REQ-DDB-WIKI-036 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → root_name |
| REQ-DDB-WIKI-040 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _product_section → compose |
| REQ-DDB-WIKI-041 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _slices_by_test |
| REQ-DDB-WIKI-042 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → requirements_page → requirement_pages → _ears_line |
| REQ-DDB-WIKI-043 | measured | |
| REQ-DDB-WIKI-044 | measured | |
| REQ-DDB-WIKI-045 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → symbol_pages → _section → _activity |
| REQ-DDB-WIKI-046 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → architecture_page |
| REQ-DDB-WIKI-047 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → _actor_of |
| REQ-DDB-WIKI-048 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → write_quick_views |
| REQ-DDB-WIKI-049 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page → with_values |
| REQ-DDB-WIKI-050 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-051 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → sbom_page |
| REQ-DDB-WIKI-052 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → tests_index |
| REQ-DDB-WIKI-053 | measured | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → _build_site → api_pages |
| REQ-DDB-WIKI-054 | inferred | test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal → build_wiki → load_wiki_config → _comments → all |
Source · 26 lines
def test_a_discovered_flow_that_cannot_be_drawn_is_listed_not_fatal(
repo: tuple[Path, Path], tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
"""FOUND BUILDING ENTROPIC AND SASSAFRAS-CLASS (round 4): one entry point the build discovered
on its own — a thread entry recorded at its header declaration, a `main` in vendored code —
could not be derived, and the whole site failed. A DISCOVERED flow that cannot be drawn is
listed on the Flows page with the reason; a DECLARED one still fails the build, since it is
the repository's own statement and a typo must not pass silently.
@brief Undrawable discovered flows are reported, not fatal.
"""
from clew.wiki import entrypoints
from clew.wiki.build import build_wiki
from clew.wiki.config import FlowSpec
real = entrypoints.entry_point_flows
def with_a_ghost(db, root, depth): # noqa: ANN001, ANN202
return [*real(db, root, depth), FlowSpec(entry="ghost", file="vendor/x.c", depth=depth)]
monkeypatch.setattr(entrypoints, "entry_point_flows", with_a_ghost)
html = build_wiki(repo[0], repo[1], tmp_path / "out")
flows = (html / "flows.html").read_text()
assert "ghost" in flows and "vendor/x.c" in flows and "not drawn" in flows
Activity · 9 steps
test_a_flow_entry_by_file_survives_distinct_identities
None test_wiki_site.test_a_flow_entry_by_file_survives_distinct_identities(tuple[Path, Path] repo, Path tmp_path)
derive_flow(file=...) finds each file's main whichever identity sorts first.
Checks
assert flow.steps, file
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_flow_entry_by_file_survives_distinct_identities → derive_flow → connect |
| REQ-DDB-QUERY-003 | measured | test_a_flow_entry_by_file_survives_distinct_identities → derive_flow → qualified_name_of |
| REQ-DDB-QUERY-010 | measured | test_a_flow_entry_by_file_survives_distinct_identities → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-WIKI-001 | measured | test_a_flow_entry_by_file_survives_distinct_identities → derive_flow |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-041 | measured | test_a_flow_entry_by_file_survives_distinct_identities → derive_flow |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 30 lines
def test_a_flow_entry_by_file_survives_distinct_identities(
repo: tuple[Path, Path], tmp_path: Path
) -> None:
"""FOUND IN CI (doxygen 1.9.8; 1.18 locally): the two `main`s can carry DIFFERENT definitions,
so they are two identities — and `identity_rowids` picked one by its default guess BEFORE the
file filter, leaving nothing for the other file. 51 wiki tests failed in CI and none locally.
The file now chooses the identity. Simulated here by giving the rows distinct definitions.
@brief derive_flow(file=...) finds each file's main whichever identity sorts first.
"""
import shutil
import sqlite3
from clew.wiki.flow import derive_flow
db = tmp_path / "split.db"
shutil.copy(repo[1], db)
conn = sqlite3.connect(db)
conn.execute(
"UPDATE memberdef SET definition = 'def ' || ? || '.main' WHERE name = 'main' AND "
"file_id IN (SELECT rowid FROM path WHERE name LIKE ?)",
("tools.other", "%tools/other.py"),
)
conn.commit()
conn.close()
for file in ("src/cli.py", "tools/other.py"):
flow = derive_flow(db, repo[0], "main", file=file, depth=1)
assert flow.steps, file
Activity · 12 steps
test_a_flow_entry_is_selected_by_file
None test_wiki_site.test_a_flow_entry_is_selected_by_file(tuple[Path, Path] repo)
derive_flow(file=...) walks only that file's identity.
Checks
assert [s.callee for s in flow.steps] == ["other"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_flow_entry_is_selected_by_file → derive_flow → connect |
| REQ-DDB-QUERY-003 | measured | test_a_flow_entry_is_selected_by_file → derive_flow → qualified_name_of |
| REQ-DDB-QUERY-010 | measured | test_a_flow_entry_is_selected_by_file → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-WIKI-001 | measured | test_a_flow_entry_is_selected_by_file → derive_flow |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-041 | measured | test_a_flow_entry_is_selected_by_file → derive_flow |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 11 lines
def test_a_flow_entry_is_selected_by_file(repo: tuple[Path, Path]) -> None:
"""TWO `main`s SHARE A NAME AND A DEFINITION: selecting by name alone merged their calls.
@brief derive_flow(file=...) walks only that file's identity.
"""
from clew.wiki.flow import derive_flow
flow = derive_flow(repo[1], repo[0], "main", file="tools/other.py", depth=1)
assert [s.callee for s in flow.steps] == ["other"]
Activity · 3 steps
test_a_flow_page_carries_a_quick_view_per_function
None test_wiki_site.test_a_flow_page_carries_a_quick_view_per_function(dict[str, str] site)
P5.6: quick views on flow pages.
Checks
assert 'data-modal="q-' in quick and ">load</a>" in quickassert template and 'data-view-panel="tests"' in template.group(1)assert "_static/clew-views.js" in page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 19 lines
def test_a_flow_page_carries_a_quick_view_per_function(site: dict[str, str]) -> None:
"""OWNER (round 5, P5.6): every entity gets a quick-view modal with the view strip. A flow
page lists a trigger per function on it, each opening its template, and loads the views
script; `load` is on the fixture's `load` flow.
@brief P5.6: quick views on flow pages.
"""
page = _flow_page(site)
quick = page.split('class="modal-list quick-views"', 1)[1].split("</ul>", 1)[0]
assert 'data-modal="q-' in quick and ">load</a>" in quick
template = re.search(
r'<template id="modal-q-\d+" data-title="load \(src/data\.py\)">(.*?)</template>',
page,
re.S,
)
assert template and 'data-view-panel="tests"' in template.group(1)
assert "_static/clew-views.js" in page
Activity · 6 steps
test_a_flow_pages_long_lists_fold_under_their_counts
None test_wiki_site.test_a_flow_pages_long_lists_fold_under_their_counts(dict[str, str] site)
Flow page lists fold.
Checks
assert '<details class="fold quick-fold"><summary>' in flow
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_a_flow_pages_long_lists_fold_under_their_counts(site: dict[str, str]) -> None:
"""UX review A-1 (owner Q/A 2026-11-22), found measuring the rebuilt dossier flow page: after
the diagram went into its own box the page was still 11,600 px, of it a recorded run's list of
discovered calls 5,777 and the quick-view list 3,527. Both fold under their counts; the
trace's summary line and any failure stay in view.
@brief Flow page lists fold.
"""
flow = _flow_page(site)
assert '<details class="fold quick-fold"><summary>' in flow
Activity · 2 steps
test_a_flow_step_carries_the_requirements_its_callee_implements
None test_wiki_site.test_a_flow_step_carries_the_requirements_its_callee_implements(dict[str, str] site)
Requirement badges on steps, linked to each requirement's page.
Checks
assert 'href="req-REQ-X-001.html"' in tableassert 'href="req-REQ-W-002.html"' in table
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 14 lines
def test_a_flow_step_carries_the_requirements_its_callee_implements(site: dict[str, str]) -> None:
"""P1e: requirement badges on steps. SPEC CHANGED (UX review D-10, owner Q/A 2026-11-22): each
badge opens the requirement's OWN page, which round 4 made the requirement's URL (owner:
"individual links that are self contained"), not an anchor on the index.
@brief Requirement badges on steps, linked to each requirement's page.
"""
page = _flow_page(site)
table = page[page.index('<table class="clew steps"') :]
table = table[: table.index("</table>")]
assert 'href="req-REQ-X-001.html"' in table
assert 'href="req-REQ-W-002.html"' in table
Activity · 5 steps
test_a_group_card_links_to_its_group_page
None test_wiki_site.test_a_group_card_links_to_its_group_page(dict[str, str] site)
P5.4: each card keeps its filter and gains a link to the group's page.
Checks
assert re.findall(r'<a class="g-page" href="reqgroup-([^"]+)\.html"', page) == [
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 9 lines
def test_a_group_card_links_to_its_group_page(site: dict[str, str]) -> None:
"""@brief P5.4: each card keeps its filter and gains a link to the group's page."""
page = site["requirements.html"]
assert re.findall(r'<a class="g-page" href="reqgroup-([^"]+)\.html"', page) == [
"REQ-W",
"REQ-X",
]
Activity · 2 steps
test_a_long_test_list_says_how_many_are_direct
None test_wiki_site.test_a_long_test_list_says_how_many_are_direct()
The requirement index's test summary splits direct from reached.
Checks
assert "3 direct · 3 reached through calls" in cell and "6 tests: 6 passed" in cell
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-026 | inferred | test_a_long_test_list_says_how_many_are_direct → _tests_cell → test_link |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 17 lines
def test_a_long_test_list_says_how_many_are_direct() -> None:
"""ROUND 4: with transitive inference a broad requirement lists hundreds of tests; the index
says how many are aimed at it directly and how many only reach it through calls.
@brief The requirement index's test summary splits direct from reached.
"""
from types import SimpleNamespace
from clew.wiki.tracepages import _tests_cell
row = SimpleNamespace(
tests=tuple((f"t{i}", "passed") for i in range(6)), inferred_tests=("t3", "t4", "t5")
)
cell = _tests_cell(row, {})
assert "3 direct · 3 reached through calls" in cell and "6 tests: 6 passed" in cell
Activity · 5 steps
test_a_modal_trigger_carries_its_content_inert_and_escaped
None test_wiki_site.test_a_modal_trigger_carries_its_content_inert_and_escaped()
P1b: modal triggers and templates.
Checks
assert 'data-modal="req-R-1"' in html and '<template id="modal-req-R-1"' in htmlassert 'data-title="R-1 <b>"' in html and "<p>body</p>" in html
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | measured | test_a_modal_trigger_carries_its_content_inert_and_escaped → modal |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 15 lines
def test_a_modal_trigger_carries_its_content_inert_and_escaped() -> None:
"""REPOSITORY TEXT NEVER BECOMES MARKUP: a trigger names a `<template>` whose content was
escaped by Python; the script clones it, it does not parse strings.
@brief P1b: modal triggers and templates.
"""
from clew.wiki.modal import modal
html = modal("req-R-1", "R-1", "R-1 <b>", "<p>body</p>")
assert 'data-modal="req-R-1"' in html and '<template id="modal-req-R-1"' in html
assert 'data-title="R-1 <b>"' in html and "<p>body</p>" in html
with pytest.raises(ValueError):
modal("bad key", "x", "x", "")
Activity · 6 steps
test_a_partner_site_carries_no_call_text
None test_wiki_site.test_a_partner_site_carries_no_call_text(tuple[Path, Path] repo, Path tmp_path)
W18 under `exclude_bodies`.
Checks
assert "SECRET_CALL_ARG" not in text and "SECRET_BODY_MARKER" not in text, page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-001 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _commit → git_argv |
| REQ-DDB-CONFIG-003 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-GUARD-012 | measured | test_a_partner_site_carries_no_call_text → build_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-024 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _prose → impact_path → load_guard_config → read_guard_config → load_config → apply_opt_in_languages |
| REQ-DDB-GUARD-027 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _product_section → compose → _walk → _nested_specs → git_text |
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-004 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _all_flows → entry_point_flows → _scripts → console_scripts |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → api_pages → connect |
| REQ-DDB-QUERY-003 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → symbol_pages → table_exists |
| REQ-DDB-QUERY-004 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → symbol_pages → _owners_by_file → file_owners |
| REQ-DDB-QUERY-010 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-SCHEMA-006 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → resolve_catalog_path |
| REQ-DDB-SCHEMA-015 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _product_section → compose → _nodes → link_ids |
| REQ-DDB-WIKI-001 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page → derive_flow |
| REQ-DDB-WIKI-002 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → parse_junit |
| REQ-DDB-WIKI-003 | measured | test_a_partner_site_carries_no_call_text → build_wiki |
| REQ-DDB-WIKI-004 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → nodes_page |
| REQ-DDB-WIKI-005 | measured | test_a_partner_site_carries_no_call_text → build_wiki → report_limit |
| REQ-DDB-WIKI-007 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → valid_key |
| REQ-DDB-WIKI-010 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → parse_features |
| REQ-DDB-WIKI-011 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _render → sphinx_settings |
| REQ-DDB-WIKI-012 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → requirements_page |
| REQ-DDB-WIKI-013 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _burndown → burndown |
| REQ-DDB-WIKI-014 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-015 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _prose → impact_path |
| REQ-DDB-WIKI-016 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _coverage → parse_contexts |
| REQ-DDB-WIKI-017 | measured | |
| REQ-DDB-WIKI-018 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _all_flows → entry_point_flows |
| REQ-DDB-WIKI-019 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → build_graph |
| REQ-DDB-WIKI-020 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → write_quick_views → modal |
| REQ-DDB-WIKI-021 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → minimap_html |
| REQ-DDB-WIKI-022 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → requirements_page → requirement_pages |
| REQ-DDB-WIKI-023 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flows_index |
| REQ-DDB-WIKI-024 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → impact_page |
| REQ-DDB-WIKI-025 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → commit_published |
| REQ-DDB-WIKI-026 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → gather |
| REQ-DDB-WIKI-027 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _test_flows |
| REQ-DDB-WIKI-028 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _fetch_issues → provider_for |
| REQ-DDB-WIKI-029 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → write_exports |
| REQ-DDB-WIKI-031 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → find_decisions |
| REQ-DDB-WIKI-035 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page → test_node |
| REQ-DDB-WIKI-036 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → root_name |
| REQ-DDB-WIKI-040 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _product_section → compose |
| REQ-DDB-WIKI-041 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _slices_by_test |
| REQ-DDB-WIKI-042 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → requirements_page → requirement_pages → _ears_line |
| REQ-DDB-WIKI-044 | measured | |
| REQ-DDB-WIKI-045 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → symbol_pages → _section → _activity |
| REQ-DDB-WIKI-046 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → architecture_page |
| REQ-DDB-WIKI-047 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → _actor_of |
| REQ-DDB-WIKI-048 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → write_quick_views |
| REQ-DDB-WIKI-049 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page → with_values |
| REQ-DDB-WIKI-050 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-051 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → sbom_page |
| REQ-DDB-WIKI-052 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → tests_index |
| REQ-DDB-WIKI-053 | measured | test_a_partner_site_carries_no_call_text → build_wiki → _build_site → api_pages |
| REQ-DDB-WIKI-054 | inferred | test_a_partner_site_carries_no_call_text → build_wiki → load_wiki_config → _comments → all |
Source · 13 lines
def test_a_partner_site_carries_no_call_text(repo: tuple[Path, Path], tmp_path: Path) -> None:
"""REDACTION ON THE OUTPUT: the dialog data is source text too.
@brief W18 under `exclude_bodies`.
"""
from clew.wiki.build import build_wiki
html = build_wiki(repo[0], repo[1], tmp_path / "partner", audience="partner")
for page in html.rglob("*.html"):
text = page.read_text()
assert "SECRET_CALL_ARG" not in text and "SECRET_BODY_MARKER" not in text, page
Activity · 5 steps
test_a_public_site_keeps_requirement_text_off_the_requirement_page
None test_wiki_site.test_a_public_site_keeps_requirement_text_off_the_requirement_page(tuple[Path, Path] repo, Path tmp_path)
R4: `exclude_requirement_text` reaches the requirement page and the issue link.
Checks
assert "Every item is parsed once" not in page and "Load the data" not in pageassert 'href="req-REQ-W-001.html"' in page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-001 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _commit → git_argv |
| REQ-DDB-CONFIG-003 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-GUARD-012 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-024 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _prose → impact_path → load_guard_config → read_guard_config → load_config → apply_opt_in_languages |
| REQ-DDB-GUARD-027 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _product_section → compose → _walk → _nested_specs → git_text |
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-004 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _all_flows → entry_point_flows → _scripts → console_scripts |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → api_pages → connect |
| REQ-DDB-QUERY-003 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → symbol_pages → table_exists |
| REQ-DDB-QUERY-004 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → symbol_pages → _owners_by_file → file_owners |
| REQ-DDB-QUERY-010 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-SCHEMA-006 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → resolve_catalog_path |
| REQ-DDB-SCHEMA-015 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _product_section → compose → _nodes → link_ids |
| REQ-DDB-WIKI-001 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page → derive_flow |
| REQ-DDB-WIKI-002 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → parse_junit |
| REQ-DDB-WIKI-003 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki |
| REQ-DDB-WIKI-004 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → nodes_page |
| REQ-DDB-WIKI-005 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → report_limit |
| REQ-DDB-WIKI-007 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → valid_key |
| REQ-DDB-WIKI-010 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → parse_features |
| REQ-DDB-WIKI-011 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _render → sphinx_settings |
| REQ-DDB-WIKI-012 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → requirements_page |
| REQ-DDB-WIKI-013 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _burndown → burndown |
| REQ-DDB-WIKI-014 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-015 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _prose → impact_path |
| REQ-DDB-WIKI-016 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _coverage → parse_contexts |
| REQ-DDB-WIKI-017 | measured | |
| REQ-DDB-WIKI-018 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _all_flows → entry_point_flows |
| REQ-DDB-WIKI-019 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → build_graph |
| REQ-DDB-WIKI-020 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → write_quick_views → modal |
| REQ-DDB-WIKI-021 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → minimap_html |
| REQ-DDB-WIKI-022 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → requirements_page → requirement_pages |
| REQ-DDB-WIKI-023 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flows_index |
| REQ-DDB-WIKI-024 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → impact_page |
| REQ-DDB-WIKI-025 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → commit_published |
| REQ-DDB-WIKI-026 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → gather |
| REQ-DDB-WIKI-027 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _test_flows |
| REQ-DDB-WIKI-028 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _fetch_issues → provider_for |
| REQ-DDB-WIKI-029 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → write_exports |
| REQ-DDB-WIKI-031 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → find_decisions |
| REQ-DDB-WIKI-035 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page → test_node |
| REQ-DDB-WIKI-036 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → root_name |
| REQ-DDB-WIKI-040 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _product_section → compose |
| REQ-DDB-WIKI-041 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _slices_by_test |
| REQ-DDB-WIKI-042 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → requirements_page → requirement_pages → _ears_line |
| REQ-DDB-WIKI-043 | measured | |
| REQ-DDB-WIKI-044 | measured | |
| REQ-DDB-WIKI-045 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → symbol_pages → _section → _activity |
| REQ-DDB-WIKI-046 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → architecture_page |
| REQ-DDB-WIKI-047 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → _actor_of |
| REQ-DDB-WIKI-048 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → write_quick_views |
| REQ-DDB-WIKI-049 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page → with_values |
| REQ-DDB-WIKI-050 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-051 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → sbom_page |
| REQ-DDB-WIKI-052 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → tests_index |
| REQ-DDB-WIKI-053 | measured | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → _build_site → api_pages |
| REQ-DDB-WIKI-054 | inferred | test_a_public_site_keeps_requirement_text_off_the_requirement_page → build_wiki → load_wiki_config → _comments → all |
Source · 12 lines
def test_a_public_site_keeps_requirement_text_off_the_requirement_page(
repo: tuple[Path, Path], tmp_path: Path
) -> None:
"""@brief R4: `exclude_requirement_text` reaches the requirement page and the issue link."""
from clew.wiki.build import build_wiki
html = build_wiki(repo[0], repo[1], tmp_path / "out", audience="public")
page = (html / "requirements.html").read_text() + (html / "req-REQ-W-001.html").read_text()
assert "Every item is parsed once" not in page and "Load the data" not in page
assert 'href="req-REQ-W-001.html"' in page
Activity · 5 steps
test_a_recorded_runs_discovered_calls_fold
None test_wiki_site.test_a_recorded_runs_discovered_calls_fold()
A-1: the imported trace keeps its summary, folds what it discovered.
Checks
assert "predicted steps confirmed" in html.split("<details", 1)[0]assert '<details class="fold"><summary>2 discovered calls not in the flow</summary>' in html
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-035 | measured | test_a_recorded_runs_discovered_calls_fold → imported_trace → overlay |
| REQ-DDB-WIKI-036 | measured | test_a_recorded_runs_discovered_calls_fold → imported_trace |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-049 | measured | test_a_recorded_runs_discovered_calls_fold → imported_trace → overlay → _step_values |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 25 lines
def test_a_recorded_runs_discovered_calls_fold() -> None:
"""@brief A-1: the imported trace keeps its summary, folds what it discovered."""
from clew.wiki.flow import Flow, Lane, Step
from clew.wiki.flowpage import imported_trace
step = Step("m", "m", "a", "a", "x", "x", "x.py", 1, 1)
flow = Flow("m", "m", 1, "files", (Lane("x", "x"),), (step,))
otlp = {
"resourceSpans": [
{
"scopeSpans": [
{
"spans": [
{"name": "m", "spanId": "1", "parentSpanId": ""},
{"name": "b", "spanId": "2", "parentSpanId": "1"},
{"name": "c", "spanId": "3", "parentSpanId": "1"},
]
}
]
}
]
}
html = imported_trace(flow, "t.json", otlp)
assert "predicted steps confirmed" in html.split("<details", 1)[0]
assert '<details class="fold"><summary>2 discovered calls not in the flow</summary>' in html1 more lines, not shown
Activity · 8 steps
test_a_requirement_has_its_own_page_with_its_whole_trace
None test_wiki_site.test_a_requirement_has_its_own_page_with_its_whole_trace(dict[str, str] site)
R4: the requirement page and its issue link.
Checks
assert "<summary>acceptance</summary>" not in pageassert 'href="req-REQ-W-001.html"' in pageassert '<template id="modal-req-' not in pageassert "Every item is parsed once" in bodyassert "src/data.py" in body and "test_load" in bodyassert 'href="flow-load.html"' in bodyassert "test_load" in tests and "of 1" in testsassert "REQ-W-001" in query["title"][0] and query["labels"] == ["req:REQ-W-001"]assert "clew-req: REQ-W-001" in query["body"][0]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 31 lines
def test_a_requirement_has_its_own_page_with_its_whole_trace(site: dict[str, str]) -> None:
"""THE ACCEPTANCE TEXT LEAVES THE TABLE (owner: the drop-down was noise) and lives on the
requirement's OWN PAGE with everything else that requirement links to: implementers, tests
with their link kind and extent, the flows passing through its implementers, and a prefilled
issue link that carries the id three ways — in the title, as a `req:` label, and as a marker
line. ROUND 4, R4 (owner 2026-11-16: "Dont show things by one giant scrolling page, but
individual links that are self contained"): a page per requirement replaces the modal.
@brief R4: the requirement page and its issue link.
"""
from html import unescape
from urllib.parse import parse_qs, urlsplit
page = site["requirements.html"]
assert "<summary>acceptance</summary>" not in page
assert 'href="req-REQ-W-001.html"' in page
assert '<template id="modal-req-' not in page
body = site["req-REQ-W-001.html"]
assert "Every item is parsed once" in body
assert "src/data.py" in body and "test_load" in body
assert 'href="flow-load.html"' in body
tests = body[body.index('class="clew req-tests') :]
assert "test_load" in tests and "of 1" in tests
href = unescape(
re.search(r'href="(https://github\.com/acme/demo/issues/new\?[^"]+)"', body).group(1)
)
query = parse_qs(urlsplit(href).query)
assert "REQ-W-001" in query["title"][0] and query["labels"] == ["req:REQ-W-001"]
assert "clew-req: REQ-W-001" in query["body"][0]
Activity · 16 steps
test_a_requirement_page_draws_its_evidence_chain
None test_wiki_site.test_a_requirement_page_draws_its_evidence_chain(dict[str, str] site)
P5.4: the implementers → tests → result diagram.
Checks
assert 'role="img"' in svg and "aria-label=" in svgassert ">load</text>" in svg and ">test_load</text>" in svg and ">passed</text>" in svgassert 'data-edge="test_load→load"' in svg
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_a_requirement_page_draws_its_evidence_chain(site: dict[str, str]) -> None:
"""OWNER (round 5, P5.4): the requirement's evidence as a diagram — implementers → tests →
result. Edges come from the row's `extent` (which implementers each test exercises), so a
drawn line is a measured or tagged link, never a guess. REQ-W-001: `test_load` passed and
exercises `load`.
@brief P5.4: the implementers → tests → result diagram.
"""
page = site["req-REQ-W-001.html"]
svg = page[page.index('<svg class="req-evidence"') :]
svg = svg[: svg.index("</svg>")]
assert 'role="img"' in svg and "aria-label=" in svg
assert ">load</text>" in svg and ">test_load</text>" in svg and ">passed</text>" in svg
assert 'data-edge="test_load→load"' in svg
Activity · 6 steps
test_a_requirement_page_links_to_its_map_overlay
None test_wiki_site.test_a_requirement_page_links_to_its_map_overlay(dict[str, str] site)
P5.4: "Show on the map" opens the overlay for this requirement.
Checks
assert 'href="map.html#req=REQ-W-001"' in site["req-REQ-W-001.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 5 lines
def test_a_requirement_page_links_to_its_map_overlay(site: dict[str, str]) -> None:
"""@brief P5.4: "Show on the map" opens the overlay for this requirement."""
assert 'href="map.html#req=REQ-W-001"' in site["req-REQ-W-001.html"]
Activity · 1 steps
test_a_step_brief_is_plain_text_and_the_home_card_counts_every_flow
None test_wiki_site.test_a_step_brief_is_plain_text_and_the_home_card_counts_every_flow(dict[str, str] site)
Brief markup and the flow count.
Checks
assert any(s["brief"] for s in steps)assert all("<" not in s["brief"] and "para>" not in s["brief"] for s in steps)assert f"{count} sequence diagrams" in site["index.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog | |
| REQ-DDB-WIKI-054 | inferred | test_a_step_brief_is_plain_text_and_the_home_card_counts_every_flow → all |
Source · 16 lines
def test_a_step_brief_is_plain_text_and_the_home_card_counts_every_flow(
site: dict[str, str],
) -> None:
"""FOUND ON THE ROUND-3 SCREENSHOTS: the step modal printed doxygen's `<para>…</para>` around
the brief, and the Flows card counted only declared flows ("2" on a site with 30).
@brief Brief markup and the flow count.
"""
blob = re.search(r'<script type="application/json"[^>]*>(.*?)</script>', _flow_page(site), re.S)
steps = json.loads(blob.group(1))
assert any(s["brief"] for s in steps)
assert all("<" not in s["brief"] and "para>" not in s["brief"] for s in steps)
count = sum(1 for n in site if n.startswith("flow-") and n.endswith(".html"))
assert f"{count} sequence diagrams" in site["index.html"]
Activity · 6 steps
test_a_step_links_to_its_call_site_not_the_callee_file
None test_wiki_site.test_a_step_links_to_its_call_site_not_the_callee_file(tuple[Path, Path] repo)
Flow steps carry the call site's file.
Checks
assert step.file == "src/out.py" and step.site_file == "src/data.py"assert (repo[0] / "src/data.py").read_text().splitlines()[
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_a_step_links_to_its_call_site_not_the_callee_file → derive_flow → connect |
| REQ-DDB-QUERY-003 | measured | test_a_step_links_to_its_call_site_not_the_callee_file → derive_flow → qualified_name_of |
| REQ-DDB-QUERY-010 | measured | test_a_step_links_to_its_call_site_not_the_callee_file → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-WIKI-001 | measured | test_a_step_links_to_its_call_site_not_the_callee_file → derive_flow |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-041 | measured | test_a_step_links_to_its_call_site_not_the_callee_file → derive_flow |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_a_step_links_to_its_call_site_not_the_callee_file(repo: tuple[Path, Path]) -> None:
"""THE LINE IS THE CALL SITE'S, so the file must be the caller's: `finish` is defined in
src/out.py but called at a line of src/data.py.
@brief Flow steps carry the call site's file.
"""
from clew.wiki.flow import derive_flow
flow = derive_flow(repo[1], repo[0], "load", depth=2)
step = next(s for s in flow.steps if s.callee == "finish")
assert step.file == "src/out.py" and step.site_file == "src/data.py"
assert (repo[0] / "src/data.py").read_text().splitlines()[
step.line - 1
].strip() == "return finish()"
Activity · 5 steps
test_a_step_opens_a_dialog_with_the_data_it_carries
None test_wiki_site.test_a_step_opens_a_dialog_with_the_data_it_carries(dict[str, str] site)
W18: per-step data (call text, callee signature, call-site link) and controls.
Checks
assert "<dialog" in page and 'data-flow-control="play"' in pageassert 'data-flow-control="pause"' in page and 'data-flow-control="step"' in pageassert 'parse(item, "SECRET_CALL_ARG")' in parse["call"]assert "raw, tag" in parse["signature"]assert parse["site"].startswith("src/data.py:") and "example.invalid" in parse["link"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 15 lines
def test_a_step_opens_a_dialog_with_the_data_it_carries(site: dict[str, str]) -> None:
"""@brief W18: per-step data (call text, callee signature, call-site link) and controls."""
page = _flow_page(site)
assert "<dialog" in page and 'data-flow-control="play"' in page
assert 'data-flow-control="pause"' in page and 'data-flow-control="step"' in page
blob = re.search(r'<script type="application/json"[^>]*>(.*?)</script>', page, re.S)
steps = json.loads(
blob.group(1).replace("<", "<").replace(">", ">").replace("&", "&")
)
parse = next(s for s in steps if s["callee"] == "parse")
assert 'parse(item, "SECRET_CALL_ARG")' in parse["call"]
assert "raw, tag" in parse["signature"]
assert parse["site"].startswith("src/data.py:") and "example.invalid" in parse["link"]
Activity · 9 steps
test_a_test_has_its_own_page_saying_what_it_checks_and_reaches
None test_wiki_site.test_a_test_has_its_own_page_saying_what_it_checks_and_reaches(dict[str, str] site)
R6/R7: the test page.
Checks
assert 'href="test-tests-test_data-py-test_load.html"' in reqassert "Passed in the packaged run." in pageassert "assert load([]) == 1" in pageassert ">test_load" in proof and ">load<" in proof and "REQ-W-001" in proofassert "Reaching is not proving" in pageassert "flow-test_load" not in page and "replay" not in page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 23 lines
def test_a_test_has_its_own_page_saying_what_it_checks_and_reaches(site: dict[str, str]) -> None:
"""OWNER 2026-11-16: tests did not link through from requirements, and "at minimum, I want to
see visually what a test is PROVING". A requirement's test links to the test's OWN page: the
packaged run's result, its checks, and a drawn chain from the test through its calls to each
implementer it reaches — labelled as reaching, not proving, without mutation records.
@brief R6/R7: the test page.
"""
req = site["req-REQ-W-001.html"]
assert 'href="test-tests-test_data-py-test_load.html"' in req
page = site["test-tests-test_data-py-test_load.html"]
assert "Passed in the packaged run." in page
assert "assert load([]) == 1" in page
proof = page[page.index('<svg class="proof') :]
proof = proof[: proof.index("</svg>")]
assert ">test_load" in proof and ">load<" in proof and "REQ-W-001" in proof
assert "Reaching is not proving" in page
## OWNER 2026-11-17 (round 5): "a test itself doesn't need a sequence diagram" — without a
## packaged run a test has no flow of its own (its slices of the master flows need per-test
## coverage, which this fixture does not give; tests/test_wiki_testslices.py covers them).
assert "flow-test_load" not in page and "replay" not in page
Activity · 10 steps
test_a_test_page_draws_its_call_flow_boxes
None test_wiki_site.test_a_test_page_draws_its_call_flow_boxes(dict[str, str] site)
P5.5: `test_load` → a box for `load`, linking its activity diagram.
Checks
assert "#act-s-load" in flow and ">load</a>" in flow
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 7 lines
def test_a_test_page_draws_its_call_flow_boxes(site: dict[str, str]) -> None:
"""@brief P5.5: `test_load` → a box for `load`, linking its activity diagram."""
(name,) = [k for k in site if k.startswith("test-") and k.endswith("test_load.html")]
flow = site[name].split('<div class="callflow">', 1)[1].split("</div>", 1)[0]
assert "#act-s-load" in flow and ">load</a>" in flow
Activity · 3 steps
test_a_test_page_pins_each_check_to_what_it_observes
None test_wiki_site.test_a_test_page_pins_each_check_to_what_it_observes(dict[str, str] site)
P5.5: the pinned check on the test's page.
Checks
assert "<code>assert load([]) == 1</code>" in itemassert '<span class="pin pin-direct">observes <code>load</code></span>' in item
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 13 lines
def test_a_test_page_pins_each_check_to_what_it_observes(site: dict[str, str]) -> None:
"""OWNER (round 5, P5.5): checks pinned by syntax tree. `test_load`'s one check,
`assert load([]) == 1`, observes `load` directly.
@brief P5.5: the pinned check on the test's page.
"""
(name,) = [k for k in site if k.startswith("test-") and k.endswith("test_load.html")]
page = site[name]
item = page.split('<ol class="asserts">', 1)[1].split("</ol>", 1)[0]
assert "<code>assert load([]) == 1</code>" in item
assert '<span class="pin pin-direct">observes <code>load</code></span>' in item
Activity · 5 steps
test_a_test_page_says_how_the_product_reaches_what_it_tests
None test_wiki_site.test_a_test_page_says_how_the_product_reaches_what_it_tests(dict[str, str] site)
P5.5: the product's path to the tested code.
Checks
assert "<code>main</code> → <code>load</code>" in contextassert 'href="flow-' in context
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_a_test_page_says_how_the_product_reaches_what_it_tests(site: dict[str, str]) -> None:
"""OWNER (round 5, P5.5): context paths. `test_load` calls `load`; the product flow from
`main` reaches it, so the page shows that path and links the flow.
@brief P5.5: the product's path to the tested code.
"""
(name,) = [k for k in site if k.startswith("test-") and k.endswith("test_load.html")]
context = site[name].split('<div class="context">', 1)[1].split("</div>", 1)[0]
assert "<code>main</code> → <code>load</code>" in context
assert 'href="flow-' in context
Activity · 4 steps
test_adr_status_is_read_in_every_common_shape
None test_wiki_site.test_adr_status_is_read_in_every_common_shape()
P3c-2: `Status:` inline, a `## Status` section, MADR front matter.
Checks
assert (inline.number, inline.title, inline.status, inline.date) == ("2", "X", "Proposed", "2026-02-01", )assert (section.number, section.status) == ("3", "Superseded by 4")assert (madr.title, madr.status, madr.date) == ("Z", "accepted", "2026-03-03")
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | measured | test_adr_status_is_read_in_every_common_shape → parse_adr |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 17 lines
def test_adr_status_is_read_in_every_common_shape() -> None:
"""@brief P3c-2: `Status:` inline, a `## Status` section, MADR front matter."""
from clew.wiki.adr import parse_adr
inline = parse_adr("0002-x.md", "# 2. X\n\nStatus: Proposed\nDate: 2026-02-01\n")
section = parse_adr("0003-y.md", "# Y\n\n## Status\n\nSuperseded by 4\n")
madr = parse_adr("0004-z.md", "---\nstatus: accepted\ndate: 2026-03-03\n---\n# Z\n")
assert (inline.number, inline.title, inline.status, inline.date) == (
"2",
"X",
"Proposed",
"2026-02-01",
)
assert (section.number, section.status) == ("3", "Superseded by 4")
assert (madr.title, madr.status, madr.date) == ("Z", "accepted", "2026-03-03")
Activity · 7 steps
test_an_empty_cell_reads_as_a_dash_and_an_empty_column_is_dropped
None test_wiki_site.test_an_empty_cell_reads_as_a_dash_and_an_empty_column_is_dropped()
The shared table helper.
Checks
assert re.findall(r"<th[^>]*>(\w)</th>", html) == ["a", "b"]assert html.count('class="none"') == 2 and re.search(r'<td class="n"[^>]*>y</td>', html)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | measured | test_an_empty_cell_reads_as_a_dash_and_an_empty_column_is_dropped → table |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 11 lines
def test_an_empty_cell_reads_as_a_dash_and_an_empty_column_is_dropped() -> None:
"""@brief The shared table helper."""
from clew.wiki.htmltable import table
html = table(["a", "b", "c"], [["x", "", ""], ["", "y", ""]], numeric=("b",))
assert re.findall(r"<th[^>]*>(\w)</th>", html) == ["a", "b"]
# Fixture string loosened (round 3, P1b): a cell now also carries its column's `data-label`
# for the narrow-screen card layout; the property asserted — right-aligned numeric — is unchanged.
assert html.count('class="none"') == 2 and re.search(r'<td class="n"[^>]*>y</td>', html)
Activity · 4 steps
test_an_unknown_doc_kind_is_a_problem
None test_wiki_site.test_an_unknown_doc_kind_is_a_problem(Path tmp_path)
P3c-2: doc kinds are a closed set.
Checks
assert load_wiki_config(tmp_path)[1]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-GUARD-012 | measured | test_an_unknown_doc_kind_is_a_problem → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog | |
| REQ-DDB-WIKI-054 | inferred | test_an_unknown_doc_kind_is_a_problem → load_wiki_config → _comments → all |
Source · 8 lines
def test_an_unknown_doc_kind_is_a_problem(tmp_path: Path) -> None:
"""@brief P3c-2: doc kinds are a closed set."""
from clew.wiki.config import load_wiki_config
(tmp_path / ".clew.yaml").write_text("wiki:\n doc_kinds: {README.md: novel}\n")
assert load_wiki_config(tmp_path)[1]
Activity · 3 steps
test_another_installed_theme_can_be_named
None test_wiki_site.test_another_installed_theme_can_be_named(Path tmp_path)
W13: `theme.name` selects a Sphinx theme; the clew stylesheet is then not imposed.
Checks
assert settings["html_theme"] == "alabaster" and "html_theme_path" not in settings
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | measured | test_another_installed_theme_can_be_named → sphinx_settings |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 9 lines
def test_another_installed_theme_can_be_named(tmp_path: Path) -> None:
"""@brief W13: `theme.name` selects a Sphinx theme; the clew stylesheet is then not imposed."""
from clew.wiki.config import ThemeSpec
from clew.wiki.theme import sphinx_settings
settings = sphinx_settings(ThemeSpec(name="alabaster"), tmp_path, tmp_path)
assert settings["html_theme"] == "alabaster" and "html_theme_path" not in settings
Activity · 4 steps
test_check_refuses_an_unknown_palette_token
None test_wiki_site.test_check_refuses_an_unknown_palette_token(tuple[Path, Path] repo, Path tmp_path)
A misspelled token would otherwise be a silent no-op.
Checks
assert "'acent'" in problems and "'nope.css' does not exist" in problems
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-001 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → pin_problems → git_text → git_argv |
| REQ-DDB-CONFIG-003 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-GUARD-012 | measured | test_check_refuses_an_unknown_palette_token → check_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-024 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog → load_guard_config → read_guard_config → load_config → apply_opt_in_languages |
| REQ-DDB-GUARD-027 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → catalog_requirements → read_catalog_at |
| REQ-DDB-QUERY-001 | measured | test_check_refuses_an_unknown_palette_token → check_wiki → _flow_problems → connect |
| REQ-DDB-QUERY-003 | measured | test_check_refuses_an_unknown_palette_token → check_wiki → _flow_problems → identity_rowids |
| REQ-DDB-QUERY-010 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → _flow_problems → identity_rowids |
| REQ-DDB-SCHEMA-006 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog → resolve_catalog_path |
| REQ-DDB-SCHEMA-015 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems → compose → _nodes → link_ids |
| REQ-DDB-WIKI-003 | measured | test_check_refuses_an_unknown_palette_token → check_wiki |
| REQ-DDB-WIKI-004 | measured | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → load_nodes |
| REQ-DDB-WIKI-005 | measured | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems |
| REQ-DDB-WIKI-006 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → _mutation_problems → parse_mutations |
| REQ-DDB-WIKI-010 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → _mapping_problems → parse_mapping |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-040 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → trace_problems → composite_problems |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog | |
| REQ-DDB-WIKI-054 | inferred | test_check_refuses_an_unknown_palette_token → check_wiki → load_wiki_config → _comments → all |
Source · 12 lines
def test_check_refuses_an_unknown_palette_token(repo: tuple[Path, Path], tmp_path: Path) -> None:
"""@brief A misspelled token would otherwise be a silent no-op."""
from clew.wiki.check import check_wiki
cfg = tmp_path / "w.yaml"
cfg.write_text(
"wiki:\n docs: [README.md]\n theme:\n palette: {acent: '#000'}\n css: nope.css\n"
)
problems = "\n".join(check_wiki(repo[0], repo[1], cfg))
assert "'acent'" in problems and "'nope.css' does not exist" in problems
Activity · 5 steps
test_decisions_are_listed_and_reach_the_requirements_they_name
None test_wiki_site.test_decisions_are_listed_and_reach_the_requirements_they_name(dict[str, str] site)
P3c-2: ADRs — a Decisions page (number, title, status, date, requirements named) and a Decisions section on each named requirement's page.
Checks
assert "Accepted" in row and "2026-01-02" in row and 'href="requirements.html#REQ-W-001"' in rowassert "adr/0001-use-sqlite" in pageassert "<h4>Decisions</h4>" in body and "Use SQLite for the store" in body
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 13 lines
def test_decisions_are_listed_and_reach_the_requirements_they_name(site: dict[str, str]) -> None:
"""@brief P3c-2: ADRs — a Decisions page (number, title, status, date, requirements named) and
a Decisions section on each named requirement's page."""
page = site["decisions.html"]
table = page[page.index('<table class="clew"') :]
row = table[table.index("Use SQLite for the store") :].split("</tr>")[0]
assert "Accepted" in row and "2026-01-02" in row and 'href="requirements.html#REQ-W-001"' in row
assert "adr/0001-use-sqlite" in page
## Round 4, R4: the requirement's own page holds what its modal did.
body = site["req-REQ-W-001.html"]
assert "<h4>Decisions</h4>" in body and "Use SQLite for the store" in body
Activity · 7 steps
test_docs_are_grouped_by_kind_and_agent_docs_are_included
None test_wiki_site.test_docs_are_grouped_by_kind_and_agent_docs_are_included(dict[str, str] site)
P3c-2: doc kinds.
Checks
assert found is not None, nameassert "prose/README" in kind("tutorial") and "prose/AGENTS" in kind("agents")assert page.index('data-kind="tutorial"') < page.index('data-kind="agents"')assert "prose/AGENTS.html" in site
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 21 lines
def test_docs_are_grouped_by_kind_and_agent_docs_are_included(site: dict[str, str]) -> None:
"""DIÁTAXIS, AND HUMAN VS AGENT DOCS (owner 2026-11-15): the Docs page groups the repository's
prose by declared kind; AGENTS.md is included without being listed and kept apart, as
agent-facing.
@brief P3c-2: doc kinds.
"""
page = site["docs.html"]
def kind(name: str) -> str:
found = re.search(
rf'<section class="doc-kind" data-kind="{name}">(.*?)</section>', page, re.S
)
assert found is not None, name
return found.group(1)
assert "prose/README" in kind("tutorial") and "prose/AGENTS" in kind("agents")
assert page.index('data-kind="tutorial"') < page.index('data-kind="agents"')
assert "prose/AGENTS.html" in site
Activity · 5 steps
test_each_requirement_group_has_its_own_page
None test_wiki_site.test_each_requirement_group_has_its_own_page(dict[str, str] site)
P5.4: one page per requirement group.
Checks
assert "REQ-W-001" in w and "REQ-W-002" in w and "REQ-X-001" not in wassert "REQ-X-001" in x and "REQ-W-001" not in xassert 'href="req-REQ-W-001.html"' in wassert 'class="seg c-PASS"' in w and "2 requirements" in wassert 'href="requirements.html"' in w, "a group page leads back to the index"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 15 lines
def test_each_requirement_group_has_its_own_page(site: dict[str, str]) -> None:
"""OWNER (round 5, P5.4): requirement groups get pages, and the group cards link to them. A
group page is a URL a reader can share: its tier bar, its counts, and ONLY its own
requirements, each linking to the requirement's page.
@brief P5.4: one page per requirement group.
"""
w, x = site["reqgroup-REQ-W.html"], site["reqgroup-REQ-X.html"]
assert "REQ-W-001" in w and "REQ-W-002" in w and "REQ-X-001" not in w
assert "REQ-X-001" in x and "REQ-W-001" not in x
assert 'href="req-REQ-W-001.html"' in w
assert 'class="seg c-PASS"' in w and "2 requirements" in w
assert 'href="requirements.html"' in w, "a group page leads back to the index"
Activity · 6 steps
test_entry_points_become_flows_without_being_declared
None test_wiki_site.test_entry_points_become_flows_without_being_declared(dict[str, str] site)
Auto-derived entry-point flows.
Checks
assert "flow-load" in flowsassert ">load<" in cli and ">other<" not in cliassert ">other<" in other and ">load<" not in otherassert "demo" in cli # the console script's name titles its flow
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_entry_points_become_flows_without_being_declared(site: dict[str, str]) -> None:
"""ENTIRELY GENERATED (owner 2026-11-15: two flows for clew was not comprehensive): every
entry point the repository has — a console script, a `main` outside test code, a thread's
entry — gets a flow; declared flows (roots chosen in `.clew.yaml`) are added on top.
@brief Auto-derived entry-point flows.
"""
flows = site["flows.html"]
assert "flow-load" in flows
cli = next(t for n, t in site.items() if n.startswith("flow-main-src-cli"))
other = next(t for n, t in site.items() if n.startswith("flow-main-tools-other"))
assert ">load<" in cli and ">other<" not in cli
assert ">other<" in other and ">load<" not in other
assert "demo" in cli # the console script's name titles its flow
Activity · 7 steps
test_every_page_carries_the_minimap_with_its_components_lit
None test_wiki_site.test_every_page_carries_the_minimap_with_its_components_lit(dict[str, str] site)
P1c-2: the sidebar minimap.
Checks
assert '<nav class="minimap"' in site["flow-load.html"]assert '<nav class="minimap"' not in site[name], nameassert lit == ["src"]assert re.search(r'href="map\.html#b=\d+"[^>]*data-comp="src"', flow)assert re.search(r'data-comp="src"[^>]*>.*?<span class="mm-name">src</span>', flow, re.S)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 25 lines
def test_every_page_carries_the_minimap_with_its_components_lit(site: dict[str, str]) -> None:
"""CROSS-TALK (owner 2026-11-15): the sidebar holds the system's block diagram on every page;
a flow page lights the components its steps pass through, and each box opens that
component on the map.
@brief P1c-2: the sidebar minimap.
"""
## ROUND 4, R2 (owner 2026-11-16: the unlabelled sidebar boxes were "easier to simply click
## into map"): the sidebar is now a LABELLED block list, in the web's order, each block a link
## to that block on the web. The property — every page carries it, a flow lights its blocks —
## is unchanged.
## SPEC CHANGED (UX review E-12, owner Q/A 2026-11-22, superseding "every page" of 2026-11-15):
## the block list sits on pages ABOUT the system — a page that lights its blocks, Flows,
## Architecture, Change impact — not on Docs or the index pages (the home page is the map).
assert '<nav class="minimap"' in site["flow-load.html"]
for name in ("index.html", "requirements.html"):
assert '<nav class="minimap"' not in site[name], name
flow = site["flow-load.html"]
lit = re.findall(r'\.minimap \[data-comp="([^"]+)"\]', flow)
assert lit == ["src"]
assert re.search(r'href="map\.html#b=\d+"[^>]*data-comp="src"', flow)
assert re.search(r'data-comp="src"[^>]*>.*?<span class="mm-name">src</span>', flow, re.S)
## (requirements.html carries no block list at all now, so nothing on it is lit.)
Activity · 8 steps
test_every_recognised_test_is_found_not_only_the_linked
None test_wiki_site.test_every_recognised_test_is_found_not_only_the_linked(repo)
`None` resolves every test the index recognises, a superset of the linked names.
Checks
assert linked == {"test_load"} and linked <= every
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-QUERY-001 | measured | test_every_recognised_test_is_found_not_only_the_linked → connect |
| REQ-DDB-QUERY-003 | measured | test_every_recognised_test_is_found_not_only_the_linked → _test_definitions → table_exists |
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-017 | measured | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-026 | measured | test_every_recognised_test_is_found_not_only_the_linked → _test_definitions |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_every_recognised_test_is_found_not_only_the_linked(repo) -> None:
"""@brief `None` resolves every test the index recognises, a superset of the linked names."""
from clew.query._common import connect
from clew.wiki.testpages import _test_definitions
_root, db = repo
with connect(db) as conn:
every = {d.name for d in _test_definitions(conn, None)}
linked = {d.name for d in _test_definitions(conn, {"test_load"})}
assert linked == {"test_load"} and linked <= every
Activity · 7 steps
test_flows_are_grouped_by_role
None test_wiki_site.test_flows_are_grouped_by_role(dict[str, str] site)
P1e: flows by role.
Checks
assert found is not None, nameassert "flow-load.html" in product and "flow-main-src-cli-py.html" in productassert "flow-main-tools-other-py.html" in tooling and "<details" in toolingassert "flow-main-tools-other-py.html" not in productassert 'data-role="threads"' not in pageassert page.index('data-role="product"') < page.index('data-role="tooling"')
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 25 lines
def test_flows_are_grouped_by_role(site: dict[str, str]) -> None:
"""OWNER 2026-11-15: "a bunch of scripts, not much by way of core function". The Flows page
groups flows by role — PRODUCT (console scripts, declared roots, mains outside tooling),
THREADS (thread entries; absent here, so no section), TOOLING (scripts/, acceptance/, tools/
by default) folded away.
@brief P1e: flows by role.
"""
page = site["flows.html"]
def role(name: str) -> str:
found = re.search(
rf'<section class="flow-role" data-role="{name}">(.*?)</section>', page, re.S
)
assert found is not None, name
return found.group(1)
product, tooling = role("product"), role("tooling")
assert "flow-load.html" in product and "flow-main-src-cli-py.html" in product
assert "flow-main-tools-other-py.html" in tooling and "<details" in tooling
assert "flow-main-tools-other-py.html" not in product
assert 'data-role="threads"' not in page
assert page.index('data-role="product"') < page.index('data-role="tooling"')
Activity · 8 steps
test_issue_links_follow_the_declared_or_remote_tracker
None test_wiki_site.test_issue_links_follow_the_declared_or_remote_tracker()
P1d: issue targets and prefilled URLs.
Checks
assert target_from_remote("git@github.com:acme/demo.git") == ("github", "acme/demo")assert target_from_remote("https://github.com/acme/demo") == ("github", "acme/demo")assert target_from_remote("https://dev.azure.com/org/proj/_git/repo") == ("ado", "org/proj")assert target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") == ("ado", "org/proj")assert target_from_remote("https://gitlab.example/x/y.git") is Noneassert parts.netloc == "dev.azure.com" and parts.path == "/org/proj/_workitems/create/Issue"assert query["[System.Tags]"] == ["req:REQ-1"] and "REQ-1" in query["[System.Title]"][0]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | measured | test_issue_links_follow_the_declared_or_remote_tracker → target_from_remote |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 22 lines
def test_issue_links_follow_the_declared_or_remote_tracker() -> None:
"""GITHUB AND AZURE DEVOPS, prefilled; the tracker is declared (`wiki.issues`) or read from
the `origin` remote; an unknown host gives no link rather than a guessed one.
@brief P1d: issue targets and prefilled URLs.
"""
from urllib.parse import parse_qs, urlsplit
from clew.wiki.issues import issue_url, target_from_remote
assert target_from_remote("git@github.com:acme/demo.git") == ("github", "acme/demo")
assert target_from_remote("https://github.com/acme/demo") == ("github", "acme/demo")
assert target_from_remote("https://dev.azure.com/org/proj/_git/repo") == ("ado", "org/proj")
assert target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") == ("ado", "org/proj")
assert target_from_remote("https://gitlab.example/x/y.git") is None
url = issue_url(("ado", "org/proj"), "REQ-1", "Title", "Body")
parts = urlsplit(url)
assert parts.netloc == "dev.azure.com" and parts.path == "/org/proj/_workitems/create/Issue"
query = parse_qs(parts.query)
assert query["[System.Tags]"] == ["req:REQ-1"] and "REQ-1" in query["[System.Title]"][0]
Activity · 12 steps
test_one_modal_component_serves_every_page
None test_wiki_site.test_one_modal_component_serves_every_page(dict[str, str] site)
P1b: the shared modal.
Checks
assert '<dialog id="clew-modal"' in text, nameassert 'aria-labelledby="clew-modal-title"' in text, nameassert "_static/clew.js" in text, nameassert "dialog.flow-step" not in page and '<dialog class="flow-step"' not in pageassert page.count("<dialog") == 1
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_one_modal_component_serves_every_page(site: dict[str, str]) -> None:
"""ONE COMPONENT: every content page carries the same labelled `<dialog>` and the script that
drives it; the flow page's step dialog is that component, not a second one.
@brief P1b: the shared modal.
"""
for name, text in site.items():
if name.endswith(".html") and name not in ("search.html", "genindex.html"):
assert '<dialog id="clew-modal"' in text, name
assert 'aria-labelledby="clew-modal-title"' in text, name
assert "_static/clew.js" in text, name
page = _flow_page(site)
assert "dialog.flow-step" not in page and '<dialog class="flow-step"' not in page
assert page.count("<dialog") == 1
Activity · 8 steps
test_only_a_heading_that_leads_with_a_version_is_a_milestone
None test_wiki_site.test_only_a_heading_that_leads_with_a_version_is_a_milestone(Path tmp_path)
Roadmap milestone detection.
Checks
assert [v for v, _h in roadmap_milestones(road)] == ["v0.8.0", "v0.9", "1.0.0"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | measured | test_only_a_heading_that_leads_with_a_version_is_a_milestone → roadmap_milestones |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_only_a_heading_that_leads_with_a_version_is_a_milestone(tmp_path: Path) -> None:
"""A VERSION MENTIONED IN PASSING is not a milestone: "Adopting design_master v1.0.28" names
another project's release.
@brief Roadmap milestone detection.
"""
from clew.wiki.charts import roadmap_milestones
road = tmp_path / "ROADMAP.md"
road.write_text(
"# Roadmap to v0.8.0\n## A. Tooling\n### Adopting design_master v1.0.28, in order\n"
"## Proposed v0.8.0 cut\n## v0.9 — later\n## Milestone 1.0.0\n"
)
assert [v for v, _h in roadmap_milestones(road)] == ["v0.8.0", "v0.9", "1.0.0"]
Activity · 4 steps
test_requirement_and_test_charts_are_drawn
None test_wiki_site.test_requirement_and_test_charts_are_drawn(dict[str, str] site)
W14: donuts of requirement tiers and test statuses, with their counts.
Checks
assert page.count('class="donut"') == 2assert 'data-label="PASS" data-count="2"' in page and 'data-label="GAP" data-count="1"' in pageassert ('data-label="passed" data-count="1"' in page and 'data-label="failed" data-count="1"' in page )
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_requirement_and_test_charts_are_drawn(site: dict[str, str]) -> None:
"""@brief W14: donuts of requirement tiers and test statuses, with their counts."""
page = site["requirements.html"]
assert page.count('class="donut"') == 2
# REQ-X-001 has no tagged test; test_load reaches `parse` in one call, so it is INFERRED.
assert 'data-label="PASS" data-count="2"' in page and 'data-label="GAP" data-count="1"' in page
assert (
'data-label="passed" data-count="1"' in page
and 'data-label="failed" data-count="1"' in page
)
Activity · 4 steps
test_requirement_groups_are_cards_that_filter_the_list
None test_wiki_site.test_requirement_groups_are_cards_that_filter_the_list(dict[str, str] site)
P1d: group cards.
Checks
assert cards == ["REQ-W", "REQ-X"]assert page.index('class="group-card"') < page.index('<table class="clew trace"')assert re.findall(r'<tr data-group="([^"]+)"', page) == ["REQ-W", "REQ-W", "REQ-X"]assert 'class="seg c-PASS"' in w[: w.index("</button>")]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 15 lines
def test_requirement_groups_are_cards_that_filter_the_list(site: dict[str, str]) -> None:
"""OWNER 2026-11-15: requirements front and centre, groups linked. Each group is a card with
its tier progress; the card filters the requirement list to that group.
@brief P1d: group cards.
"""
page = site["requirements.html"]
cards = re.findall(r'<button[^>]*class="group-card"[^>]*data-req-filter="([^"]+)"', page)
assert cards == ["REQ-W", "REQ-X"]
assert page.index('class="group-card"') < page.index('<table class="clew trace"')
assert re.findall(r'<tr data-group="([^"]+)"', page) == ["REQ-W", "REQ-W", "REQ-X"]
w = page[page.index('data-req-filter="REQ-W"') :]
assert 'class="seg c-PASS"' in w[: w.index("</button>")]
Activity · 7 steps
test_section_cards_carry_an_icon
None test_wiki_site.test_section_cards_carry_an_icon()
P1b: the inline icon set — currentColor, hidden from assistive tech; unknown names refuse.
Checks
assert svg.startswith("<svg") and 'aria-hidden="true"' in svg and "currentColor" in svg
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 11 lines
def test_section_cards_carry_an_icon() -> None:
"""@brief P1b: the inline icon set — currentColor, hidden from assistive tech; unknown names
refuse."""
from clew.wiki.icons import icon
svg = icon("requirements")
assert svg.startswith("<svg") and 'aria-hidden="true"' in svg and "currentColor" in svg
with pytest.raises(KeyError):
icon("nope")
Activity · 5 steps
test_source_bodies_and_diagrams_are_not_in_the_search_index
None test_wiki_site.test_source_bodies_and_diagrams_are_not_in_the_search_index(dict[str, str] site)
P5.1b: the search index holds names and prose, not bodies.
Checks
assert "secret_body_mark" not in index.lower() and "secret_body_marker" not in index.lower()assert '"pars' in index, "the function's own name must stay searchable"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_source_bodies_and_diagrams_are_not_in_the_search_index(site: dict[str, str]) -> None:
"""P5.1b (2.0.0, page weight). MEASURED on clew's own site: searchindex.js was 8.2 MB, 6.35 MB
of it 80,285 terms, because Sphinx's indexer strips the tags off RAW HTML and indexes the text —
every folded source body, activity statement and SVG label. A function is found by its heading,
signature and brief; code text is what the index's own code search is for. `SECRET_BODY_MARKER`
lives only in `parse`'s body; `parse` itself must stay findable.
@brief P5.1b: the search index holds names and prose, not bodies.
"""
import pathlib
index = (pathlib.Path(site["__html__"]) / "searchindex.js").read_text()
assert "secret_body_mark" not in index.lower() and "secret_body_marker" not in index.lower()
assert '"pars' in index, "the function's own name must stay searchable"
Activity · 4 steps
test_tables_become_cards_and_diagrams_pan_on_a_narrow_screen
None test_wiki_site.test_tables_become_cards_and_diagrams_pan_on_a_narrow_screen(dict[str, str] site)
P1b: responsive tables (a cell names its column) and pan/zoom diagram wrappers.
Checks
assert 'data-label="Name"' in html and 'data-label="Count"' in htmlassert "@media(max-width:760px)" in css and "attr(data-label)" in cssassert "data-pz" in _flow_page(site)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | measured | test_tables_become_cards_and_diagrams_pan_on_a_narrow_screen → table |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 11 lines
def test_tables_become_cards_and_diagrams_pan_on_a_narrow_screen(site: dict[str, str]) -> None:
"""@brief P1b: responsive tables (a cell names its column) and pan/zoom diagram wrappers."""
from clew.wiki.htmltable import table
html = table(["Name", "Count"], [["a", "1"]], numeric=("Count",))
assert 'data-label="Name"' in html and 'data-label="Count"' in html
css = site["_static/clew.css"]
assert "@media(max-width:760px)" in css and "attr(data-label)" in css
assert "data-pz" in _flow_page(site)
Activity · 6 steps
test_test_pages_are_kept_out_of_the_main_search
None test_wiki_site.test_test_pages_are_kept_out_of_the_main_search(dict[str, str] site)
Test pages not in the search index.
Checks
assert not [d for d in doc["docnames"] if d.startswith("test-")]assert any(k.startswith("test-") for k in site), "the test pages themselves are still built"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 15 lines
def test_test_pages_are_kept_out_of_the_main_search(site: dict[str, str]) -> None:
"""OWNER (Q/A 2026-11-20): test pages leave the main search (68% of its postings on clew);
they are found from the Tests tab's filter. Their pages still exist and link as before.
@brief Test pages not in the search index.
"""
import json
import pathlib
text = (pathlib.Path(site["__html__"]) / "searchindex.js").read_text()
doc = json.loads(text[text.index("(") + 1 : text.rindex(")")])
assert not [d for d in doc["docnames"] if d.startswith("test-")]
assert any(k.startswith("test-") for k in site), "the test pages themselves are still built"
Activity · 6 steps
test_the_default_theme_is_bundled_and_self_contained
None test_wiki_site.test_the_default_theme_is_bundled_and_self_contained(dict[str, str] site)
W13: the clew theme's stylesheet, tokens and fonts.
Checks
assert "--paper:" in css and "--acc:" in cssassert "@font-face" in site["_static/fonts/clew-fonts.css"]assert {"manrope.ttf", "newsreader.ttf", "jetbrains-mono.ttf"} <= set(site["__fonts__"].split())assert "OFL" in site["__licenses__"]assert "fonts.googleapis" not in text and "https://cdn" not in text, nameassert "_static/clew.css" in text, name
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_the_default_theme_is_bundled_and_self_contained(site: dict[str, str]) -> None:
"""THE FONTS SHIP WITH THEIR LICENCES and load same-origin; nothing on any page is remote.
@brief W13: the clew theme's stylesheet, tokens and fonts.
"""
css = site["_static/clew.css"]
assert "--paper:" in css and "--acc:" in css
assert "@font-face" in site["_static/fonts/clew-fonts.css"]
assert {"manrope.ttf", "newsreader.ttf", "jetbrains-mono.ttf"} <= set(site["__fonts__"].split())
assert "OFL" in site["__licenses__"]
for name, text in site.items():
if name.endswith(".html"):
assert "fonts.googleapis" not in text and "https://cdn" not in text, name
assert "_static/clew.css" in text, name
Activity · 9 steps
test_the_home_page_opens_on_the_map
None test_wiki_site.test_the_home_page_opens_on_the_map(dict[str, str] site)
Home = map, then summary, then cards.
Checks
assert "data-web" in home and "data-web-legend" in homeassert home.index("data-web") < home.index('class="charts"') < home.index('class="cards"')
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 11 lines
def test_the_home_page_opens_on_the_map(site: dict[str, str]) -> None:
"""Owner Q/A 2026-11-22 ("the map is home"): the home page opens on the map and its legend,
with the status donuts and the section cards below it.
@brief Home = map, then summary, then cards.
"""
home = site["index.html"]
assert "data-web" in home and "data-web-legend" in home
assert home.index("data-web") < home.index('class="charts"') < home.index('class="cards"')
Activity · 3 steps
test_the_home_page_says_what_it_is_and_where_to_go_before_the_map
None test_wiki_site.test_the_home_page_says_what_it_is_and_where_to_go_before_the_map(dict[str, str] site)
Home: purpose and doorways first.
Checks
assert 'class="home-lead"' in home and 'class="doorways"' in homeassert home.index('class="home-lead"') < home.index('class="doorways"') < home.index("data-web")assert 'href="requirements.html"' in doors and 'href="flows.html"' in doors
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 13 lines
def test_the_home_page_says_what_it_is_and_where_to_go_before_the_map(site: dict[str, str]) -> None:
"""UX review E-13 (owner Q/A 2026-11-22): home opened on a complex chart with no orienting
sentence. A one-line purpose and the main doorways come before the map.
@brief Home: purpose and doorways first.
"""
home = site["index.html"]
assert 'class="home-lead"' in home and 'class="doorways"' in home
assert home.index('class="home-lead"') < home.index('class="doorways"') < home.index("data-web")
doors = home.split('class="doorways"', 1)[1].split("</nav>", 1)[0]
assert 'href="requirements.html"' in doors and 'href="flows.html"' in doors
Activity · 5 steps
test_the_home_page_shows_requirements_and_tests_by_status
None test_wiki_site.test_the_home_page_shows_requirements_and_tests_by_status(dict[str, str] site)
The status charts are on the home page.
Checks
assert 'class="charts"' in home and "Requirements by tier" in home and "Tests by status" in homeassert 'href="requirements.html"' in home
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_the_home_page_shows_requirements_and_tests_by_status(site: dict[str, str]) -> None:
"""X-5 (owner review 2, 2026-11-22): "that pie graph chart of requirements/tests by status needs
to be top level viewable". The home page carries the same two donuts as the Requirements page,
linked to it.
@brief The status charts are on the home page.
"""
home = site["index.html"]
assert 'class="charts"' in home and "Requirements by tier" in home and "Tests by status" in home
assert 'href="requirements.html"' in home
Activity · 3 steps
test_the_map_is_a_section_between_flows_and_docs
None test_wiki_site.test_the_map_is_a_section_between_flows_and_docs(dict[str, str] site)
P1c: the system map page, in the top bar after Flows, with its lens controls.
Checks
assert positions == sorted(positions)assert 'class="web"' in page and "data-web-lens" in page and 'class="clew web-table"' in page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 12 lines
def test_the_map_is_a_section_between_flows_and_docs(site: dict[str, str]) -> None:
"""@brief P1c: the system map page, in the top bar after Flows, with its lens controls."""
index = site["index.html"]
nav = index[index.index('<nav class="nav"') : index.index("</nav>")]
positions = [nav.index(f">{s}<") for s in ("Requirements", "Flows", "Map", "Docs")]
assert positions == sorted(positions)
page = site["map.html"]
## ROUND 4, R3: the map page is the repository web (canvas, lens picker, block table) — the
## box map's `comp` groups and lens buttons were replaced by owner ruling 2026-11-16.
assert 'class="web"' in page and "data-web-lens" in page and 'class="clew web-table"' in page
Activity · 6 steps
test_the_repository_overrides_palette_and_adds_css
None test_wiki_site.test_the_repository_overrides_palette_and_adds_css(dict[str, str] site)
W13: `wiki.theme.palette` and `wiki.theme.css` reach every page.
Checks
assert "--acc:#123456" in site["_static/clew-theme.css"]assert ".repo-extra" in site["_static/extra.css"]assert ("_static/clew-theme.css" in site["index.html"] and "_static/extra.css" in site["index.html"] )
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 9 lines
def test_the_repository_overrides_palette_and_adds_css(site: dict[str, str]) -> None:
"""@brief W13: `wiki.theme.palette` and `wiki.theme.css` reach every page."""
assert "--acc:#123456" in site["_static/clew-theme.css"]
assert ".repo-extra" in site["_static/extra.css"]
assert (
"_static/clew-theme.css" in site["index.html"] and "_static/extra.css" in site["index.html"]
)
Activity · 3 steps
test_the_requirement_table_links_implementers_and_drops_empty_columns
None test_wiki_site.test_the_requirement_table_links_implementers_and_drops_empty_columns(dict[str, str] site)
The per-requirement table.
Checks
assert head[:3] == ["requirement", "tier", "implemented by"]assert "nodes" not in head and "mutations" not in headassert 'href="sym-src-data-py.html#s-load"' in rowassert re.search(r'href="https://example\.invalid/blob/[^/]+/src/data\.py#L\d+"', site["sym-src-data-py.html"], )assert "via-inferred" in inferred and "test_load" in inferred
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 26 lines
def test_the_requirement_table_links_implementers_and_drops_empty_columns(
site: dict[str, str],
) -> None:
"""EMPTY LINKAGE IS NOT A COLUMN: a column no requirement fills (nodes, mutations here) is not
drawn. Each implementer links to its source, and a test linked by inference says so.
@brief The per-requirement table.
"""
page = site["requirements.html"]
table = page[page.index('<table class="clew trace"') :]
table = table[: table.index("</table>")]
head = re.findall(r"<th>([^<]*)</th>", table)
assert head[:3] == ["requirement", "tier", "implemented by"]
assert "nodes" not in head and "mutations" not in head
row = table.split("REQ-W-001", 1)[1].split("</tr>")[0]
# Round 3, P1f (owner ruling: source links become DOSSIER REFERENCES): an implementer links
# to its symbol section, and that section links the source permalink.
assert 'href="sym-src-data-py.html#s-load"' in row
assert re.search(
r'href="https://example\.invalid/blob/[^/]+/src/data\.py#L\d+"',
site["sym-src-data-py.html"],
)
inferred = table.split("REQ-X-001", 1)[1].split("</tr>")[0]
assert "via-inferred" in inferred and "test_load" in inferred
Activity · 11 steps
test_the_requirements_page_summarises_each_requirement_group
None test_wiki_site.test_the_requirements_page_summarises_each_requirement_group(dict[str, str] site)
W14: per group — requirements, implemented, tested, tiers, below the layer minimum.
Checks
assert "summary.html" not in siteassert cells("REQ-W")[:10] == ["2", "2", "2", "1", "1", "0", "0", "0", "0", "1"]assert cells("REQ-X")[:10] == ["1", "1", "1", "1", "0", "0", "0", "0", "0", "1"]assert "only by call-graph inference" in pageassert page.index('data-req-filter="REQ-W"') < page.index("REQ-W-001")
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 25 lines
def test_the_requirements_page_summarises_each_requirement_group(site: dict[str, str]) -> None:
"""ONE PAGE FOR THE TRACE (owner 2026-11-15: requirements and summary filled the same role):
the group counts sit above the per-requirement table. A requirement tested in fewer layers than
`min_layers` is counted, so one-layer coverage is visible rather than reading as tested.
@brief W14: per group — requirements, implemented, tested, tiers, below the layer minimum.
"""
page = site["requirements.html"]
assert "summary.html" not in site
def cells(group: str) -> list[str]:
row = page.split(f"<td>{group}</td>", 1)[1].split("</tr>")[0]
return re.findall(r"<td[^>]*>([^<]*)</td>", row)
# requirements, implemented, tested, PASS, GAP, TARGET, NOT_RUN, MISSING, EXEMPT, below min
# layers. EXEMPT column added in round 4 (R8); the counts asserted are unchanged.
# REQ-W-002 spans two layers once test_load is inferred for `finish` (bdd + unit).
assert cells("REQ-W")[:10] == ["2", "2", "2", "1", "1", "0", "0", "0", "0", "1"]
assert cells("REQ-X")[:10] == ["1", "1", "1", "1", "0", "0", "0", "0", "0", "1"]
assert "only by call-graph inference" in page
# Round 3, P1d: the group CARDS now lead the page and the counts table sits below the list;
# the property — group counts come before the per-requirement rows — is held by the cards.
assert page.index('data-req-filter="REQ-W"') < page.index("REQ-W-001")
Activity · 7 steps
test_the_script_is_budgeted_and_no_theme_asset_is_remote
None test_wiki_site.test_the_script_is_budgeted_and_no_theme_asset_is_remote()
P1b: clew.js budget, nothing remote.
Checks
assert js.stat().st_size <= _JS_BUDGETassert "http://" not in text and "https://" not in text, pathassert "#m=" in source and "popstate" in source
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 19 lines
def test_the_script_is_budgeted_and_no_theme_asset_is_remote() -> None:
"""SELF-CONTAINED: no theme stylesheet, layout or script names an http(s) URL, and the one
script stays under its byte budget. Deep links and the back button are the script's job:
it reads the `#m=` hash and closes on `popstate`.
@brief P1b: clew.js budget, nothing remote.
"""
from clew.wiki.theme import THEMES
js = THEMES / "clew" / "static" / "clew.js"
assert js.stat().st_size <= _JS_BUDGET
for path in THEMES.rglob("*"):
if path.suffix in (".css", ".js", ".html"):
text = path.read_text(encoding="utf-8")
assert "http://" not in text and "https://" not in text, path
source = js.read_text(encoding="utf-8")
assert "#m=" in source and "popstate" in source
Activity · 9 steps
test_the_sequence_diagram_is_uml_proper
None test_wiki_site.test_the_sequence_diagram_is_uml_proper(dict[str, str] site)
W18: activation bars, a return arrow for the cross-lane call, a drawn loop frame, numbered steps, and lane heads at top and bottom.
Checks
assert 'class="act"' in svg and 'class="ret"' in svgassert 'class="frame"' in svg and ">loop<" in svgassert re.findall(r'class="num"[^>]*>(\d+)<', svg) == ["1", "2"]assert ">parse<" in svg and ">finish<" in svgassert svg.count('class="head"') == 2 * svg.count('class="lane"')
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 14 lines
def test_the_sequence_diagram_is_uml_proper(site: dict[str, str]) -> None:
"""@brief W18: activation bars, a return arrow for the cross-lane call, a drawn loop frame,
numbered steps, and lane heads at top and bottom."""
page = _flow_page(site)
# Locator narrowed (round 3, P1b): the top bar's menu icon is now the page's first <svg>.
start = page.index('<svg class="seq"')
svg = page[start : page.index("</svg>", start)]
assert 'class="act"' in svg and 'class="ret"' in svg
assert 'class="frame"' in svg and ">loop<" in svg
assert re.findall(r'class="num"[^>]*>(\d+)<', svg) == ["1", "2"]
assert ">parse<" in svg and ">finish<" in svg
assert svg.count('class="head"') == 2 * svg.count('class="lane"')
Activity · 8 steps
test_the_sidebar_puts_the_page_first_and_the_system_only_where_it_belongs
None test_wiki_site.test_the_sidebar_puts_the_page_first_and_the_system_only_where_it_belongs(dict[str, str] site)
Sidebar: contents first, system in context.
Checks
assert "minimap-block" not in docsassert "minimap-block" in flowassert side.index("Table of Contents") < side.index("minimap-block")
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 17 lines
def test_the_sidebar_puts_the_page_first_and_the_system_only_where_it_belongs(
site: dict[str, str],
) -> None:
"""UX review E-12 (owner Q/A 2026-11-22): the system block list sat on every page, Docs included,
above the page's own contents (clipped). The page's contents come first; the block list shows
on pages about the system (a page that lights its blocks, Flows, Architecture, Change impact).
@brief Sidebar: contents first, system in context.
"""
docs = site["docs.html"]
assert "minimap-block" not in docs
flow = _flow_page(site)
assert "minimap-block" in flow
side = flow[flow.index('class="sphinxsidebar"') :]
assert side.index("Table of Contents") < side.index("minimap-block")
Activity · 6 steps
test_the_site_has_an_architecture_tab
None test_wiki_site.test_the_site_has_an_architecture_tab(dict[str, str] site)
P5.6: the C4 page is built and the home page links it.
Checks
assert all(f'id="c4-l{n}"' in page for n in (1, 2, 3, 4))assert 'href="architecture.html"' in site["index.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog | |
| REQ-DDB-WIKI-054 | inferred | test_the_site_has_an_architecture_tab → all |
Source · 7 lines
def test_the_site_has_an_architecture_tab(site: dict[str, str]) -> None:
"""@brief P5.6: the C4 page is built and the home page links it."""
page = site["architecture.html"]
assert all(f'id="c4-l{n}"' in page for n in (1, 2, 3, 4))
assert 'href="architecture.html"' in site["index.html"]
Activity · 3 steps
test_the_site_has_an_sbom_page
None test_wiki_site.test_the_site_has_an_sbom_page(dict[str, str] site)
#70 (P5.8): the page is built and linked; the fixture has no SBOM, which it says.
Checks
assert "No SBOM was found" in page and "This repository" in pageassert 'href="sbom.html"' in site["index.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 7 lines
def test_the_site_has_an_sbom_page(site: dict[str, str]) -> None:
"""@brief #70 (P5.8): the page is built and linked; the fixture has no SBOM, which it says."""
page = site["sbom.html"]
assert "No SBOM was found" in page and "This repository" in page
assert 'href="sbom.html"' in site["index.html"]
Activity · 3 steps
test_the_step_table_and_the_diagram_stay_in_sync
None test_wiki_site.test_the_step_table_and_the_diagram_stay_in_sync(dict[str, str] site)
P5.6: live sync.
Checks
assert re.findall(r'<tr data-step="(\d+)"', table)[:2] == ["0", "1"]assert needle in page, needleassert "scrollIntoView" not in page
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 16 lines
def test_the_step_table_and_the_diagram_stay_in_sync(site: dict[str, str]) -> None:
"""OWNER (round 5; Q/A 2026-11-20 "live sync" = diagram ↔ step table): each table row names its
step, and the page script lights the row as the diagram plays or steps, and opens the step from
a row. SPEC CHANGED (owner review 2026-11-22, W-7): the row is NO LONGER scrolled into view —
on the dossier flow that scrolled the page and hid the diagram it was following.
@brief P5.6: live sync.
"""
page = _flow_page(site)
table = page.split('<table class="clew steps"', 1)[1].split("</table>", 1)[0]
assert re.findall(r'<tr data-step="(\d+)"', table)[:2] == ["0", "1"]
for needle in ("animationstart", "tr[data-step]"):
assert needle in page, needle
assert "scrollIntoView" not in page
Activity · 6 steps
test_the_tests_tab_lists_every_test_with_a_filter
None test_wiki_site.test_the_tests_tab_lists_every_test_with_a_filter(dict[str, str] site)
Tests tab.
Checks
assert re.search(r'<a href="test-[^"]*test_load\.html"><code>test_load</code></a>', table)assert 'data-filter-table="tests-all"' in page and "_static/clew-views.js" in pageassert 'href="tests.html"' in site["index.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 13 lines
def test_the_tests_tab_lists_every_test_with_a_filter(site: dict[str, str]) -> None:
"""OWNER (Q/A 2026-11-20): tests are their own category. The Tests tab lists every test the
index recognises — linked or not — each linked to its page when it has one, with a filter box.
@brief Tests tab.
"""
page = site["tests.html"]
table = page.split('<table class="clew tests-all"', 1)[1].split("</table>", 1)[0]
assert re.search(r'<a href="test-[^"]*test_load\.html"><code>test_load</code></a>', table)
assert 'data-filter-table="tests-all"' in page and "_static/clew-views.js" in page
assert 'href="tests.html"' in site["index.html"]
Activity · 5 steps
test_the_top_bar_holds_sections_and_search
None test_wiki_site.test_the_top_bar_holds_sections_and_search(dict[str, str] site)
Navigation and search placement.
Checks
assert f">{section}<" in nav, sectionassert "load" not in nav and "Demo" not in navassert '<form class="search"' in text and 'id="searchbox"' not in text, nameassert "flow-load" in site["flows.html"] and "prose/README" in site["docs.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 18 lines
def test_the_top_bar_holds_sections_and_search(site: dict[str, str]) -> None:
"""THE TOP BAR NAMES SECTIONS, not every page: flows sit under one Flows page and prose under
Docs. Search is a field in the top bar; the sidebar carries the page's contents only.
@brief Navigation and search placement.
"""
index = site["index.html"]
# Locator loosened (round 3, P1b): the nav now carries an id for its menu button.
nav = index[index.index('<nav class="nav"') : index.index("</nav>")]
for section in ("Docs", "Flows", "Requirements"):
assert f">{section}<" in nav, section
assert "load" not in nav and "Demo" not in nav
for name, text in site.items():
if name.endswith(".html") and name not in ("search.html", "genindex.html"):
assert '<form class="search"' in text and 'id="searchbox"' not in text, name
assert "flow-load" in site["flows.html"] and "prose/README" in site["docs.html"]
Activity · 9 steps
test_the_traceability_checklist_states_each_requirements_evidence
None test_wiki_site.test_the_traceability_checklist_states_each_requirements_evidence(dict[str, str] site)
P5.4 / S4: the traceability checklist page.
Checks
assert "supports evidence" in page and "compliant" not in page.lower()assert ('data-check="rationale" class="ok"' in w1 and 'data-check="verification" class="ok"' in w1 )assert 'data-check="rationale" class="gap"' in x1assert 'data-check="implemented" class="ok"' in w1assert "1 of 3 carry a rationale" in pageassert 'href="traceability.html"' in site["requirements.html"], "the checklist is reachable"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 24 lines
def test_the_traceability_checklist_states_each_requirements_evidence(site: dict[str, str]) -> None:
"""S4 (owner-approved, 2026-11-17): an IEEE 29148 traceability checklist — per requirement,
which attributes it carries (rationale, verification method, parent) and whether it is
implemented, tested and passing. Worded as SUPPORTING EVIDENCE, never as compliance: the page
measures what a catalogue and an index show, and a standard's conformance is an assessor's call.
@brief P5.4 / S4: the traceability checklist page.
"""
page = site["traceability.html"]
assert "supports evidence" in page and "compliant" not in page.lower()
def row(req: str) -> str:
return page.split(f'<tr data-req="{req}"', 1)[1].split("</tr>", 1)[0]
w1, x1 = row("REQ-W-001"), row("REQ-X-001")
assert (
'data-check="rationale" class="ok"' in w1 and 'data-check="verification" class="ok"' in w1
)
assert 'data-check="rationale" class="gap"' in x1
assert 'data-check="implemented" class="ok"' in w1
assert "1 of 3 carry a rationale" in page
assert 'href="traceability.html"' in site["requirements.html"], "the checklist is reachable"
Activity · 9 steps
test_the_views_script_is_budgeted
None test_wiki_site.test_the_views_script_is_budgeted()
Owner Q/A 2026-11-20: clew-views.js has its own budget, and names nothing remote.
Checks
assert js.stat().st_size <= _VIEWS_JS_BUDGETassert "http://" not in text and "https://" not in text
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 10 lines
def test_the_views_script_is_budgeted() -> None:
"""@brief Owner Q/A 2026-11-20: clew-views.js has its own budget, and names nothing remote."""
from clew.wiki.theme import THEMES
js = THEMES / "clew" / "static" / "clew-views.js"
assert js.stat().st_size <= _VIEWS_JS_BUDGET
text = js.read_text()
assert "http://" not in text and "https://" not in text
Activity · 5 steps
test_versions_burn_down_toward_roadmap_milestones
None test_wiki_site.test_versions_burn_down_toward_roadmap_milestones(tuple[Path, Path] repo, Path tmp_path)
W17: open requirements per recorded version, milestones from ROADMAP.md.
Checks
assert chart.count('class="pt"') == 2assert ">v1.0<" in chart and ">v1.5<" in chart and ">v2.0<" in chartassert 'class="milestone"' in chartassert 'class="burndown"' in trace
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-001 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _commit → git_argv |
| REQ-DDB-CONFIG-003 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-GUARD-012 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-024 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _prose → impact_path → load_guard_config → read_guard_config → load_config → apply_opt_in_languages |
| REQ-DDB-GUARD-027 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _product_section → compose → _walk → _nested_specs → git_text |
| REQ-DDB-PIPE-003 | measured | |
| REQ-DDB-PIPE-004 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _all_flows → entry_point_flows → _scripts → console_scripts |
| REQ-DDB-PIPE-011 | measured | |
| REQ-DDB-QUERY-001 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → api_pages → connect |
| REQ-DDB-QUERY-003 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → symbol_pages → table_exists |
| REQ-DDB-QUERY-004 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → symbol_pages → _owners_by_file → file_owners |
| REQ-DDB-QUERY-010 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page → derive_flow → _entry_rowids → function_candidates |
| REQ-DDB-QUERY-015 | measured | |
| REQ-DDB-SCHEMA-006 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _product_section → compose → _root_source → declared_catalog → resolve_catalog_path |
| REQ-DDB-SCHEMA-015 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _product_section → compose → _nodes → link_ids |
| REQ-DDB-WIKI-001 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page → derive_flow |
| REQ-DDB-WIKI-002 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → parse_junit |
| REQ-DDB-WIKI-003 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki |
| REQ-DDB-WIKI-004 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → nodes_page |
| REQ-DDB-WIKI-005 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → report_limit |
| REQ-DDB-WIKI-007 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → valid_key |
| REQ-DDB-WIKI-010 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → parse_features |
| REQ-DDB-WIKI-011 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _render → sphinx_settings |
| REQ-DDB-WIKI-012 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → requirements_page |
| REQ-DDB-WIKI-013 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _burndown → burndown |
| REQ-DDB-WIKI-014 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-015 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _prose → impact_path |
| REQ-DDB-WIKI-016 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _coverage → parse_contexts |
| REQ-DDB-WIKI-017 | measured | |
| REQ-DDB-WIKI-018 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _all_flows → entry_point_flows |
| REQ-DDB-WIKI-019 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → build_graph |
| REQ-DDB-WIKI-020 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → write_quick_views → modal |
| REQ-DDB-WIKI-021 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → minimap_html |
| REQ-DDB-WIKI-022 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → requirements_page → requirement_pages |
| REQ-DDB-WIKI-023 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flows_index |
| REQ-DDB-WIKI-024 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → impact_page |
| REQ-DDB-WIKI-025 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → commit_published |
| REQ-DDB-WIKI-026 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → gather |
| REQ-DDB-WIKI-027 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _test_flows |
| REQ-DDB-WIKI-028 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _fetch_issues → provider_for |
| REQ-DDB-WIKI-029 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → write_exports |
| REQ-DDB-WIKI-031 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → find_decisions |
| REQ-DDB-WIKI-035 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page → test_node |
| REQ-DDB-WIKI-036 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → root_name |
| REQ-DDB-WIKI-040 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _product_section → compose |
| REQ-DDB-WIKI-041 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _slices_by_test |
| REQ-DDB-WIKI-042 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → requirements_page → requirement_pages → _ears_line |
| REQ-DDB-WIKI-043 | measured | |
| REQ-DDB-WIKI-044 | measured | |
| REQ-DDB-WIKI-045 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → symbol_pages → _section → _activity |
| REQ-DDB-WIKI-046 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → architecture_page |
| REQ-DDB-WIKI-047 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → _actor_of |
| REQ-DDB-WIKI-048 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → write_quick_views |
| REQ-DDB-WIKI-049 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page → with_values |
| REQ-DDB-WIKI-050 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-051 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → sbom_page |
| REQ-DDB-WIKI-052 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → tests_index |
| REQ-DDB-WIKI-053 | measured | test_versions_burn_down_toward_roadmap_milestones → build_wiki → _build_site → api_pages |
| REQ-DDB-WIKI-054 | inferred | test_versions_burn_down_toward_roadmap_milestones → build_wiki → load_wiki_config → _comments → all |
Source · 22 lines
def test_versions_burn_down_toward_roadmap_milestones(
repo: tuple[Path, Path], tmp_path: Path
) -> None:
"""A ROADMAP HEADING NAMING A VERSION is a milestone; one not yet recorded is drawn ahead.
@brief W17: open requirements per recorded version, milestones from ROADMAP.md.
"""
from clew.wiki.build import build_wiki
out = tmp_path / "versions"
build_wiki(repo[0], repo[1], out, version="v1.0")
build_wiki(repo[0], repo[1], out, version="v1.5")
index = (out / "index.html").read_text()
chart = index[index.index('<svg class="burndown"') :]
chart = chart[: chart.index("</svg>")]
assert chart.count('class="pt"') == 2
assert ">v1.0<" in chart and ">v1.5<" in chart and ">v2.0<" in chart
assert 'class="milestone"' in chart
trace = (out / "v1.5" / "html" / "requirements.html").read_text()
assert 'class="burndown"' in trace
Activity · 12 steps
test_wiki_check_prints_ears_notes_without_failing_on_them
None test_wiki_site.test_wiki_check_prints_ears_notes_without_failing_on_them(repo, capsys)
P5.4 / S9: EARS notes from `clew wiki check`.
Checks
assert "note: REQ-W-001 is in no EARS pattern:" in errassert "note:" not in out, "notes are not problems"assert rc == (1 if check_wiki(root, db) else 0)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CLI-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → report_stats |
| REQ-DDB-CLI-002 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → _doxygen_or_partial → _doxygen_stage → _run_doxygen_from_args → run_doxygen → doxygen_supports_sqlite3 |
| REQ-DDB-CONFIG-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → pin_problems → git_text → git_argv |
| REQ-DDB-CONFIG-003 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog → _is_flat_req_list |
| REQ-DDB-CONFIG-004 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_preprocessor |
| REQ-DDB-CONFIG-005 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig |
| REQ-DDB-CONFIG-006 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _recorded_entry_patterns → recorded_explicit |
| REQ-DDB-CONFIG-007 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-CONFIG-009 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _apply_toolchain_exclusions → load_toolchain_config |
| REQ-DDB-GUARD-012 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → load_wiki_config → _requirements_section → read_requirements_section |
| REQ-DDB-GUARD-019 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → parse_doxygen_tags |
| REQ-DDB-GUARD-024 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → apply_autobrief |
| REQ-DDB-GUARD-027 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → catalog_requirements → read_catalog_at |
| REQ-DDB-INDEX-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _verify_extra_input_is_read → effective_file_patterns |
| REQ-DDB-INDEX-002 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → build_lock |
| REQ-DDB-INDEX-003 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → report_index_coverage |
| REQ-DDB-INDEX-004 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols |
| REQ-DDB-INDEX-005 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → stamp_external_provenance |
| REQ-DDB-INDEX-006 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main |
| REQ-DDB-INDEX-007 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → record_owners |
| REQ-DDB-INDEX-008 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_licenses |
| REQ-DDB-INDEX-009 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc |
| REQ-DDB-INDEX-010 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes |
| REQ-DDB-INDEX-011 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_property_keys |
| REQ-DDB-MCP-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → target_for |
| REQ-DDB-PIPE-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_database |
| REQ-DDB-PIPE-003 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → build_call_edges |
| REQ-DDB-PIPE-004 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → python_entry_seeds |
| REQ-DDB-PIPE-005 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-PIPE-006 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → run_rustdoc → _require_nightly_rustdoc → clean_subprocess_env |
| REQ-DDB-PIPE-007 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig_gates |
| REQ-DDB-PIPE-008 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs |
| REQ-DDB-PIPE-009 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → prune_dominated_fuzzy_call_edges |
| REQ-DDB-PIPE-010 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _build_inferred_edges |
| REQ-DDB-PIPE-011 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → try_fast_refresh → _fast_refresh_locked → _plan → _line_anchors → _harvest_one_file → _parseable_file |
| REQ-DDB-PIPE-012 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → build_harvest_plan → js_symbol_harvester |
| REQ-DDB-PIPE-013 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings |
| REQ-DDB-PIPE-014 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc → within_repo |
| REQ-DDB-PIPE-015 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_config_defaults |
| REQ-DDB-QUERY-001 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → _flow_problems → connect |
| REQ-DDB-QUERY-003 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → _flow_problems → identity_rowids |
| REQ-DDB-QUERY-004 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → symbol_pages → _owners_by_file → file_owners |
| REQ-DDB-QUERY-010 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → _flow_problems → identity_rowids |
| REQ-DDB-QUERY-011 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads → _ensure_threads_tables |
| REQ-DDB-SCHEMA-001 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads |
| REQ-DDB-SCHEMA-002 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _writer_dispatch_map |
| REQ-DDB-SCHEMA-003 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-004 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest |
| REQ-DDB-SCHEMA-005 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_key_alias_prefixes |
| REQ-DDB-SCHEMA-006 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-SCHEMA-007 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-009 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_event_edges |
| REQ-DDB-SCHEMA-011 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → extract_context_conflicts |
| REQ-DDB-SCHEMA-012 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest → declaration_origin |
| REQ-DDB-SCHEMA-013 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → import_data_model_keys |
| REQ-DDB-SCHEMA-014 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → refresh_main → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs → ensure_file_docs_table |
| REQ-DDB-SCHEMA-015 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → composite_problems → compose → _nodes → link_ids |
| REQ-DDB-WIKI-001 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main |
| REQ-DDB-WIKI-002 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _trace → requirement_evidence |
| REQ-DDB-WIKI-003 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki |
| REQ-DDB-WIKI-004 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → load_nodes |
| REQ-DDB-WIKI-005 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems |
| REQ-DDB-WIKI-006 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → _mutation_problems → parse_mutations |
| REQ-DDB-WIKI-007 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _diff → diff_versions |
| REQ-DDB-WIKI-010 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → _mapping_problems → parse_mapping |
| REQ-DDB-WIKI-011 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _render → sphinx_settings |
| REQ-DDB-WIKI-012 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → requirements_page |
| REQ-DDB-WIKI-013 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _burndown → burndown |
| REQ-DDB-WIKI-014 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-015 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → composite_problems → compose → _root_source → declared_catalog |
| REQ-DDB-WIKI-016 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _coverage → parse_contexts |
| REQ-DDB-WIKI-018 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _all_flows → entry_point_flows |
| REQ-DDB-WIKI-019 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → build_graph |
| REQ-DDB-WIKI-020 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → write_quick_views → modal |
| REQ-DDB-WIKI-021 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → minimap_html |
| REQ-DDB-WIKI-022 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → requirements_page → requirement_pages |
| REQ-DDB-WIKI-023 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → flows_index |
| REQ-DDB-WIKI-024 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → impact_page |
| REQ-DDB-WIKI-025 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → commit_published |
| REQ-DDB-WIKI-026 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → gather |
| REQ-DDB-WIKI-027 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _test_flows |
| REQ-DDB-WIKI-028 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _fetch_issues → provider_for |
| REQ-DDB-WIKI-029 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → write_exports |
| REQ-DDB-WIKI-031 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → find_decisions |
| REQ-DDB-WIKI-035 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _trace_run |
| REQ-DDB-WIKI-036 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → root_name |
| REQ-DDB-WIKI-037 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → open_main |
| REQ-DDB-WIKI-038 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → _markdown |
| REQ-DDB-WIKI-040 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → trace_problems → composite_problems |
| REQ-DDB-WIKI-041 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _flow → _flow_object → derive_flow |
| REQ-DDB-WIKI-042 | measured | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → _ears_notes |
| REQ-DDB-WIKI-043 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _propose_modes |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-045 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → symbol_pages → _section → _activity |
| REQ-DDB-WIKI-046 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → architecture_page |
| REQ-DDB-WIKI-047 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → _actor_of |
| REQ-DDB-WIKI-048 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → write_quick_views |
| REQ-DDB-WIKI-049 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _trace_run → overlay → _step_values |
| REQ-DDB-WIKI-050 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → flow_page |
| REQ-DDB-WIKI-051 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → sbom_page |
| REQ-DDB-WIKI-052 | catalog | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → tests_index |
| REQ-DDB-WIKI-053 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → wiki_main → _site → build_wiki → _build_site → api_pages |
| REQ-DDB-WIKI-054 | inferred | test_wiki_check_prints_ears_notes_without_failing_on_them → check_wiki → load_wiki_config → _comments → all |
Source · 17 lines
def test_wiki_check_prints_ears_notes_without_failing_on_them(repo, capsys) -> None:
"""S9: never a gate. `clew wiki check` prints a note for each requirement in no EARS pattern,
on stderr, and its exit code is exactly what the problems alone decide.
@brief P5.4 / S9: EARS notes from `clew wiki check`.
"""
from clew.wiki.check import check_wiki
from clew.wiki.command import wiki_main
root, db = repo
rc = wiki_main(["check", "--repo-root", str(root), "--index", str(db)])
out, err = capsys.readouterr()
assert "note: REQ-W-001 is in no EARS pattern:" in err
assert "note:" not in out, "notes are not problems"
assert rc == (1 if check_wiki(root, db) else 0)
Activity · 8 steps
test_with_ears_on_a_requirement_page_shows_its_pattern
None test_wiki_site.test_with_ears_on_a_requirement_page_shows_its_pattern(dict[str, str] site)
P5.4 / S9: the EARS badge.
Checks
assert '<span class="ears ears-none">not EARS</span>' in site["req-REQ-W-001.html"]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | |
| REQ-DDB-WIKI-012 | catalog | |
| REQ-DDB-WIKI-013 | catalog | |
| REQ-DDB-WIKI-014 | catalog | |
| REQ-DDB-WIKI-015 | catalog | |
| REQ-DDB-WIKI-018 | catalog | |
| REQ-DDB-WIKI-020 | catalog | |
| REQ-DDB-WIKI-021 | catalog | |
| REQ-DDB-WIKI-022 | catalog | |
| REQ-DDB-WIKI-023 | catalog | |
| REQ-DDB-WIKI-025 | catalog | |
| REQ-DDB-WIKI-031 | catalog | |
| REQ-DDB-WIKI-044 | catalog | |
| REQ-DDB-WIKI-050 | catalog | |
| REQ-DDB-WIKI-052 | catalog |
Source · 9 lines
def test_with_ears_on_a_requirement_page_shows_its_pattern(site: dict[str, str]) -> None:
"""S9 (owner-approved 2026-11-17): opt-in, never a gate. REQ-W-001's acceptance text ("Every
item is parsed once, then the load finishes.") follows no EARS pattern, so its page says so.
@brief P5.4 / S9: the EARS badge.
"""
assert '<span class="ears ears-none">not EARS</span>' in site["req-REQ-W-001.html"]