test_a_misspelled_entry_field_is_refused¶
Tests › tests/test_buildoptions.py
What this test is for
Why it exists
THE QUIET LEVEL, AND THE WHOLE REASON THE INLINE FORM IS VALIDATED HARDER THAN A FILE. `key_arg_idx` parses to a perfectly valid mapping; `load_shared_key_patterns` reads `entry.get("key_arg_index", 0)`, so the misspelling is indistinguishable from an omission and the whole dataflow layer is keyed off argument 0 — with the build reporting success and the edges looking legitimate. Nothing downstream can catch this, which is why it is caught here.
Verifies REQ-DDB-CONFIG-008
Given
- —
When
bo.apply_options( _args(), {"shared_key_patterns": {"writers": [{"pattern": "S_*", "key_arg_idx": 1}]}}, Path("/repo"), )message = str(caught.value)
Then
- ✓ raises bo.BuildOptionError
- ✓ message contains "key_arg_idx"
- ✓ message contains "key_arg_index"
- ✓ message contains "writers[1]"
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:291 · its file's page
What it checks (3)
assert "key_arg_idx" in message, "name the offending field"not attributedassert "key_arg_index" in message, "and the spelling that would have worked"not attributedassert "writers[1]" in message, "and where it sits, since a list has many entries"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_misspelled_entry_field_is_refused→apply_options→_argsWhat 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 |