test_a_clean_target_still_reports_its_zeros

Tests › tests/test_diagnostics.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE LOAD-BEARING TEST. A silent zero is indistinguishable from a diagnostic that never ran, from an index built before the diagnostic existed, and from a detector that is structurally blind to the target — and this repo has made the third mistake and written it down as a correct negative, on a target whose real accessors were macros with 1,093 call sites and no `kind='function'` rows.

Given

  1. db = _corpus(tmp_path / "clew.db", [("function", "run"), ("function", "main")])
→

When

  1. meta = dg.collect(db, tmp_path / "absent.Doxyfile", None, None, None).as_meta()
→

Then

  1. ✓ meta["accessor_families_count"] equals "0"
  2. ✓ meta["unclaimed_event_aliases_count"] equals "0"
  3. ✓ meta["accessor_names_examined"] equals "2"
  4. ✓ meta["event_vocabulary_source"] equals dg.SOURCE_BUILT_IN

tests/test_diagnostics.py:194 · its file's page

What it checks (4)

  1. assert meta["accessor_families_count"] == "0" observes collect via meta
  2. assert meta["unclaimed_event_aliases_count"] == "0" observes collect via meta
  3. assert meta["accessor_names_examined"] == "2", "a zero needs the corpus it was measured over" observes collect via meta
  4. assert meta["event_vocabulary_source"] == dg.SOURCE_BUILT_IN observes collect via meta

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_clean_target_still_reports_its_zeros→_corpus→collect

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_clean_target_still_reports_its_zeros · 4 checkscollectresolve_shared_key_patternsREQ-DDB-CONFIG-006 · measuredcollectREQ-DDB-CONFIG-007 · measuredcollectload_thread_patternsREQ-DDB-SCHEMA-001 · measuredcollectresolve_shared_key_patternsREQ-DDB-SCHEMA-005 · measuredcollectload_lock_patternsREQ-DDB-SCHEMA-011 · measuredcollectload_lock_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 7 requirements

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