test_the_alias_tier_is_stamped_beside_the_entry_pattern_tier

Tests › tests/test_tiers.py

passed Passed in the packaged run.

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

  1. db = tmp_path / "clew.db"
→

When

  1. 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_"]} ), } ), )
  2. section = _options_meta_section(db)
  3. recorded_explicit(section, OPTION_KEY_ALIAS_PREFIXES)
→

Then

  1. ✓ section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] equals TIER_HEURISTIC
  2. ✓ section[f"{OPTION_KEY_ALIAS_PREFIXES}.{TIER_KEY}"] equals TIER_DECLARED
  3. ✓ section does not contain f"{OPTION_KEY_ALIAS_PREFIXES}.{EXPLICIT_KEY}"
  4. ✓ 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

thread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyother filesother filesother filesother filestry (line 3260)try_first_build_worker65. _run_build_walked → db_status65db_status66. db_status → _options_meta66_options_meta67. _options_meta → _meta_section67_meta_section▶ test enters68. _meta_section → meta_section68meta_section69. db_status → stated_options69stated_options70. db_status → read_build_signature70read_build_signature

… 72 later steps

2 more

tests/test_tiers.py:347 · its file's page

What it checks (4)

  1. assert section[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] == TIER_HEURISTIC observes _options_meta_section via section
  2. assert section[f"{OPTION_KEY_ALIAS_PREFIXES}.{TIER_KEY}"] == TIER_DECLARED observes _options_meta_section via section
  3. assert f"{OPTION_KEY_ALIAS_PREFIXES}.{EXPLICIT_KEY}" not in section observes _options_meta_section via section
  4. assert recorded_explicit(section, OPTION_KEY_ALIAS_PREFIXES) == () observes recorded_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_explicit

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.

test_the_alias_tier_is_stamped_beside_the_entry_pattern_tier · 4 checks_entry_patternsstring_listREQ-DDB-CONFIG-001 · measuredresolve_key_alias_prefixesREQ-DDB-CONFIG-006 · measuredwrite_build_signatureREQ-DDB-CONFIG-007 · measured_options_meta_section_options_meta_meta_sectionREQ-DDB-MCP-001 · measuredwrite_build_signatureREQ-DDB-PIPE-005 · measuredresolve_key_alias_prefixesREQ-DDB-SCHEMA-005 · measured
Also reaches 6 requirements

Its run touches their code; that is reach, not proof.