test_a_family_spanning_both_sides_is_first_party

Tests › tests/test_diagnostics.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE STATED RULE FOR AN EXPRESSIBLE AMBIGUITY. A prefix can collect functions from both a repo and its submodule, and then the classification could silently pick either side. Fail-closed here means OURS — the same asymmetry `scope._is_dependency_of_parent` and `locks._origin_per_mutex` argue: if any part of the family is this repo's, declaring a prefix IS an action the operator can take, and calling it external would remove it from the list they act on.

Given

  1. db = _attributed_corpus( tmp_path / "clew.db", [("function", f"Store_Set_{key}", 1) for key in ("A", "B")] + [("function", f"Store_Set_{key}", 2) for key in ("C", "D")], [(1, "src/store.c", None), (2, "extern/dep/store_extra.c", "extern/dep")], )
→

When

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

Then

  1. ✓ meta["accessor_families_first_party_count"] equals "1"
  2. ✓ meta["accessor_families_external_count"] equals "0"
  3. ✓ meta["accessor_families"] contains "Store_Set_* (4 keys)"

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

What it checks (3)

  1. assert meta["accessor_families_first_party_count"] == "1" observes collect via meta
  2. assert meta["accessor_families_external_count"] == "0" observes collect via meta
  3. assert "Store_Set_* (4 keys)" in meta["accessor_families"], ( "all four keys count toward the family; only its ORIGIN is at issue" ) 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_family_spanning_both_sides_is_first_party→_attributed_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_family_spanning_both_sides_is_first_party · 3 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.