test_a_manifest_that_states_no_prefixes_does_not_claim_the_tier

Tests › tests/test_tiers.py

passed Passed in the packaged run.

What this test is for

Why it exists

A `--shared-key-patterns` file declaring only writers has stated NOTHING about alias prefixes, so recording `tier=explicit` would be a provenance record that is checkable and wrong — the failure `_scope_provenance` calls out.

Given

  1. manifest = tmp_path / "patterns.yaml"
  2. manifest.write_text("writers:\n - name_prefix: 'App_Set_'\n", encoding="utf-8")
→

When

  1. alone = resolve_key_alias_prefixes(manifest)
  2. beside_a_declaration = resolve_key_alias_prefixes(manifest, {KEY_ALIAS_FIELD: ["DECL_KEY_"]})
→

Then

  1. ✓ alone.values equals DEFAULT_KEY_ALIAS_PREFIXES
  2. ✓ alone.tier equals TIER_HEURISTIC
  3. ✓ beside_a_declaration.tier equals TIER_DECLARED
  4. ✓ set(beside_a_declaration.values) equals {"DECL_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES}

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

What it checks (4)

  1. assert alone.values == DEFAULT_KEY_ALIAS_PREFIXES observes resolve_key_alias_prefixes via alone
  2. assert alone.tier == TIER_HEURISTIC observes resolve_key_alias_prefixes via alone
  3. assert beside_a_declaration.tier == TIER_DECLARED, ( "the flag stated nothing about prefixes — the DECLARATION did" ) observes resolve_key_alias_prefixes via beside_a_declaration
  4. assert set(beside_a_declaration.values) == {"DECL_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES} observes resolve_key_alias_prefixes via beside_a_declaration

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_manifest_that_states_no_prefixes_does_not_claim_the_tier→resolve_key_alias_prefixes

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_a_manifest_that_states_no_prefixes_does_not_claim_the_tier · 4 checksresolve_key_alias_prefixesREQ-DDB-CONFIG-006 · measuredresolve_key_alias_prefixesREQ-DDB-SCHEMA-005 · measured
Also reaches 2 requirements

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