test_unresolved_note_is_emitted_only_when_it_applies¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
THE PAYLOAD HAS TO SAY IT, because a consumer reading a NULL `default_value` will otherwise conclude the manifest was silent — and for a UDM row that conclusion is wrong. The ingot half is the control: a repository whose every declared default WAS resolved must get no note at all, or the note becomes boilerplate that asserts a policy which did not apply and stops being read.
Given
udm_root = _repo(tmp_path / "udm", {"widgetbus_001.yaml": UDM_MANIFEST}, UDM_DEFINES)note = discover(udm_root).as_meta()["unresolved_note"]ingot_root = _repo(tmp_path / "ingot", {"widgetbus.toml": MANIFEST}, DEFINES)
When
- —
Then
- ✓ note contains "default_value"
- ✓ note contains "enum_set"
- ✓ note contains "unresolved_fields"
- ✓ discover(ingot_root).as_meta()["unresolved_note"] 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) · 4 of 142 steps
… 8 earlier steps
… 126 later steps
2 more
- Build, refresh and check the index · 4 of 153 steps
- clew — `main` (clew/cli.py) · 4 of 400 steps
tests/test_datamodel.py:665 · its file's page
What it checks (3)
assert "default_value" in note and "enum_set" in notenot attributedassert "unresolved_fields" in notenot attributedassert discover(ingot_root).as_meta()["unresolved_note"] == ""observes_repoviaingot_root
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_unresolved_note_is_emitted_only_when_it_applies→_repoWhat 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 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-INDEX-005 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-013 measured