test_docs_are_grouped_by_kind_and_agent_docs_are_included

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

What this test is for

Why it exists

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.

Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-022 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052

Given

  1. page = site["docs.html"]
  2. 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)
→

When

  1. —
→

Then

  1. ✓ kind("tutorial") contains "prose/README"
  2. ✓ kind("agents") contains "prose/AGENTS"
  3. ✓ page.index('data-kind="tutorial"') is less than page.index('data-kind="agents"')
  4. ✓ site contains "prose/AGENTS.html"

tests/test_wiki_site.py:830 · its file's page

What it checks (4)

  1. assert found is not None, name not attributed
  2. assert "prose/README" in kind("tutorial") and "prose/AGENTS" in kind("agents") not attributed
  3. assert page.index('data-kind="tutorial"') < page.index('data-kind="agents"') not attributed
  4. assert "prose/AGENTS.html" in site not attributed

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Requirements it verifies (15)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-011catalogunknown
REQ-DDB-WIKI-012catalogunknown
REQ-DDB-WIKI-013catalogunknown
REQ-DDB-WIKI-014catalogunknown
REQ-DDB-WIKI-015catalogunknown
REQ-DDB-WIKI-018catalogunknown
REQ-DDB-WIKI-020catalogunknown
REQ-DDB-WIKI-021catalogunknown
REQ-DDB-WIKI-022catalogunknown
REQ-DDB-WIKI-023catalogunknown
REQ-DDB-WIKI-025catalogunknown
REQ-DDB-WIKI-031catalogunknown
REQ-DDB-WIKI-044catalogunknown
REQ-DDB-WIKI-050catalogunknown
REQ-DDB-WIKI-052catalogunknown