test_entry_patterns_declaration_replaces_the_guesses_not_the_facts

Tests › tests/test_declaration.py

passed Passed in the packaged run.

What this test is for

Why it exists

#34: a repo whose handlers are reached only through indirect dispatch has no static caller for them, so liveness marks them orphan. Naming that convention reclaims them — measured on a C++ codebase, declaring its dispatch naming takes orphans from 61 to 17, and the survivors (now_ms, parse_bool, read_file, slurp) are genuine utility leaves.

Given

  1. args = argparse.Namespace(entry_patterns=None)
  2. decl = {SECTION_ENTRY_PATTERNS: ["%trampoline%", "dispatch_%"]}
→

When

  1. declared = _entry_patterns(args, decl)
  2. list(_entry_patterns(args, {}).values)
  3. _entry_patterns(args, {})
3 more
  1. explicit = argparse.Namespace(entry_patterns=["only_this"])
  2. list(_entry_patterns(explicit, decl).values)
  3. _entry_patterns(explicit, decl)
→

Then

  1. ✓ set(ENTRY_PATTERN_FACTS) is at most set(declared.values)
  2. ✓ declared.values contains "%trampoline%"
  3. ✓ declared.values contains "dispatch_%"
  4. ✓ declared.values does not contain "%init%"
  5. ✓ list(_entry_patterns(args, {}).values) equals DEFAULT_ENTRY_PATTERNS
  6. ✓ list(_entry_patterns(explicit, decl).values) equals [*ENTRY_PATTERN_FACTS, "only_this"]

tests/test_declaration.py:119 · its file's page

What it checks (5)

  1. assert set(ENTRY_PATTERN_FACTS) <= set(declared.values), "facts must survive" observes _entry_patterns via declared
  2. assert "%trampoline%" in declared.values and "dispatch_%" in declared.values observes _entry_patterns via declared
  3. assert "%init%" not in declared.values, "a declaration replaces the guesses" observes _entry_patterns via declared
  4. assert list(_entry_patterns(args, {}).values) == DEFAULT_ENTRY_PATTERNS observes list
  5. assert list(_entry_patterns(explicit, decl).values) == [*ENTRY_PATTERN_FACTS, "only_this"] observes list

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → list (flow)

Call flow

test_entry_patterns_declaration_replaces_the_guesses_not_the_facts→_entry_patterns→list

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_entry_patterns_declaration_replaces_the_guesses_not_the_facts · 5 checks_entry_patternsstring_listREQ-DDB-CONFIG-001 · measured_entry_patternsresolve_layeredREQ-DDB-CONFIG-006 · measured
Also reaches 2 requirements

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