test_reports_declared_requirements¶
Tests › tests/guard/test_guard_contract.py
What this test is for
Why it exists
The test says nothing about why.
Given
config_file = tmp_path / ".clew.yaml"config_file.write_text("requirements:\n file: docs/requirements.yaml\n format: yaml\n")
When
resolved = build_effective_contract(load_config(config_file))["resolved"]
Then
- ✓ resolved["requirements"]["declared"] is True
- ✓ resolved["requirements"]["file"] equals "docs/requirements.yaml"
- ✓ resolved["requirements"]["format"] equals "yaml"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
`main` (clew/guard/main.py) · 10 of 357 steps
… 16 earlier steps
… 321 later steps
3 more
- Build this wiki from the index · 4 of 400 steps
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 3 of 142 steps
- clew — `main` (clew/cli.py) · 3 of 400 steps
tests/guard/test_guard_contract.py:70 · its file's page
What it checks (3)
assert resolved["requirements"]["declared"] is Trueobservesbuild_effective_contractviaresolvedassert resolved["requirements"]["file"] == "docs/requirements.yaml"observesbuild_effective_contractviaresolvedassert resolved["requirements"]["format"] == "yaml"observesbuild_effective_contractviaresolved
Where the product reaches it
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-012 measured
- REQ-DDB-GUARD-015 measured
- REQ-DDB-GUARD-024 inferred