test_status_reports_which_tier_chose_the_seeds

Tests › tests/test_tiers.py

passed Passed in the packaged run.

What this test is for

Why it exists

RECORDED IS NOT ENOUGH — it has to be REPORTED. A tiered resolution whose winner never reaches a consumer is the same opacity as an untiered one with more moving parts, so `status` carries the section beside scope and coverage.

Given

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

When

  1. _options_meta(db)
  2. _stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=["%mine%"]), {}))
  3. _stamp(db, _entry_patterns(argparse.Namespace(entry_patterns=None), {}))
→

Then

  1. ✓ _options_meta(db) equals {}
  2. ✓ _options_meta(db) equals { f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}": TIER_EXPLICIT, f"{OPTION_ENTRY_PATTERNS}.{EXPLICIT_KEY}": "%mine%", }
  3. ✓ _options_meta(db)[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] equals TIER_HEURISTIC

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:492 · its file's page

What it checks (3)

  1. assert _options_meta(db) == {}, "a nonexistent index reports nothing, not a default" observes _options_meta
  2. assert _options_meta(db) == { f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}": TIER_EXPLICIT, f"{OPTION_ENTRY_PATTERNS}.{EXPLICIT_KEY}": "%mine%", } observes _options_meta
  3. assert _options_meta(db)[f"{OPTION_ENTRY_PATTERNS}.{TIER_KEY}"] == TIER_HEURISTIC observes _options_meta

Where the product reaches it

  • index → _index_action → build_or_refresh → db_status → _options_meta (flow)

Call flow

test_status_reports_which_tier_chose_the_seeds→_options_meta→_stamp→_entry_patterns

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_status_reports_which_tier_chose_the_seeds · 3 checks_entry_patternsstring_listREQ-DDB-CONFIG-001 · measured_options_metaREQ-DDB-CONFIG-006 · measured_stampwrite_build_signatureREQ-DDB-CONFIG-007 · measured_options_meta_meta_sectionREQ-DDB-MCP-001 · measured_stampwrite_build_signatureREQ-DDB-PIPE-005 · measured
Also reaches 5 requirements

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