test_the_alias_tier_is_stamped_beside_the_entry_pattern_tier¶
Tests › tests/test_tiers.py
What this test is for
Why it exists
Both layered options reach `build_meta` through the one producer that refuses values whose tier was discarded.
Given
db = tmp_path / "clew.db"
When
write_build_signature( db, options=options_meta( **{ OPTION_ENTRY_PATTERNS: _entry_patterns(argparse.Namespace(entry_patterns=None), {}), OPTION_KEY_ALIAS_PREFIXES: resolve_key_alias_prefixes( {KEY_ALIAS_FIELD: ["APP_KEY_"]} ), } ), )section = _options_meta_section(db)recorded_explicit(section, OPTION_KEY_ALIAS_PREFIXES)
Then
- ✓ section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] equals TIER_HEURISTIC
- ✓ section[f"{OPTION_KEY_ALIAS_PREFIXES}.{TIER_KEY}"] equals TIER_DECLARED
- ✓ section does not contain f"{OPTION_KEY_ALIAS_PREFIXES}.{EXPLICIT_KEY}"
- ✓ recorded_explicit(section, OPTION_KEY_ALIAS_PREFIXES) 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
… 64 earlier steps
… 72 later steps
2 more
- Build, refresh and check the index · 2 of 153 steps
- `main` (scripts/stage_probe.py) · 2 of 37 steps
tests/test_tiers.py:347 · its file's page
What it checks (4)
assert section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] == TIER_HEURISTICobserves_options_meta_sectionviasectionassert section[f"{OPTION_KEY_ALIAS_PREFIXES}.{TIER_KEY}"] == TIER_DECLAREDobserves_options_meta_sectionviasectionassert f"{OPTION_KEY_ALIAS_PREFIXES}.{EXPLICIT_KEY}" not in sectionobserves_options_meta_sectionviasectionassert recorded_explicit(section, OPTION_KEY_ALIAS_PREFIXES) == ()observesrecorded_explicit
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_the_alias_tier_is_stamped_beside_the_entry_pattern_tier→write_build_signature→options_meta→_entry_patterns→resolve_key_alias_prefixes→_options_meta_section→recorded_explicitWhat 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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-SCHEMA-005 measured