test_a_manifest_that_states_no_prefixes_does_not_claim_the_tier¶
Tests › tests/test_tiers.py
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
manifest = tmp_path / "patterns.yaml"manifest.write_text("writers:\n - name_prefix: 'App_Set_'\n", encoding="utf-8")
When
alone = resolve_key_alias_prefixes(manifest)beside_a_declaration = resolve_key_alias_prefixes(manifest, {KEY_ALIAS_FIELD: ["DECL_KEY_"]})
Then
- ✓ alone.values equals DEFAULT_KEY_ALIAS_PREFIXES
- ✓ alone.tier equals TIER_HEURISTIC
- ✓ beside_a_declaration.tier equals TIER_DECLARED
- ✓ 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)
assert alone.values == DEFAULT_KEY_ALIAS_PREFIXESobservesresolve_key_alias_prefixesviaaloneassert alone.tier == TIER_HEURISTICobservesresolve_key_alias_prefixesviaaloneassert beside_a_declaration.tier == TIER_DECLARED, ( "the flag stated nothing about prefixes — the DECLARATION did" )observesresolve_key_alias_prefixesviabeside_a_declarationassert set(beside_a_declaration.values) == {"DECL_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES}observesresolve_key_alias_prefixesviabeside_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
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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-SCHEMA-005 measured