test_a_stated_document_beats_the_declaration_and_reaches_the_loader¶
Tests › tests/test_buildoptions.py
What this test is for
Why it exists
The end of the wire, checked rather than assumed: `_declared_or_flag` must pass a stated MAPPING through instead of calling `Path()` on it, and the real loader must parse it. Without both halves the option validates cleanly and then crashes the build (or worse, is quietly ignored).
Verifies REQ-DDB-CONFIG-008
Given
decl = {SECTION_SHARED_KEY: {"writers": [{"name_prefix": "FROM_DECL_"}]}}args = _args()
When
bo.apply_options( args, {"shared_key_patterns": {"writers": [{"name_prefix": "STATED_"}]}}, Path("/repo"), )resolved = _declared_or_flag(args.shared_key_patterns, decl, SECTION_SHARED_KEY)writers, readers = load_shared_key_patterns(resolved)
Then
- ✓ [w.prefix for w in writers] equals ["STATED_"]
- ✓ readers equals []
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 2 of 142 steps
… 123 earlier steps
… 13 later steps
2 more
- clew — `main` (clew/cli.py) · 2 of 400 steps
- Build this wiki from the index · 1 of 400 steps
tests/test_buildoptions.py:449 · its file's page
What it checks (2)
assert [w.prefix for w in writers] == ["STATED_"]not attributedassert readers == []not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_a_stated_document_beats_the_declaration_and_reaches_the_loader→_args→apply_options→_declared_or_flag→load_shared_key_patternsWhat 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 (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CONFIG-008 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-SCHEMA-005 measured
- REQ-DDB-SCHEMA-012 measured