test_every_harvester_subclass_is_reachable_from_the_plan¶
Tests › tests/test_shared_parse.py
What this test is for
Why it exists
THE GUARD THAT WOULD HAVE CAUGHT `macro_refs`, AND THE REASON IT IS STRUCTURAL.
Given
for mod in pkgutil.iter_modules(clew.__path__): importlib.import_module(f"clew.{mod.name}")defined = { cls.stage for cls in Harvester.__subclasses__() if cls.__module__.startswith("clew.") }
When
warmed = {h.stage for h in build_harvest_plan().active()}fields = set(HarvestPlan.__dataclass_fields__)missing = defined - warmed - _CONDITIONAL_STAGES
Then
- ✓ missing is false
- ✓ {"dispatch", "subscribe"} is at most fields
tests/test_shared_parse.py:360 · its file's page
What it checks (2)
assert not missing, ( f"harvester stage(s) {sorted(missing)} run outside the shared parse, so each one " "re-parses every indexed file — the defect that cost 29.5 s of a 130 s cold build " "when macro_refs did it. Add the harvester to HarvestPlan and to active()." )not attributedassert {"dispatch", "subscribe"} <= fieldsnot attributed
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.
and 2 more requirement paths, listed below.
Also reaches 15 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-INDEX-002 inferred
- REQ-DDB-INDEX-010 measured
- REQ-DDB-INDEX-011 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-007 measured
- REQ-DDB-PIPE-012 measured
- REQ-DDB-PIPE-013 measured
- REQ-DDB-PIPE-015 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-004 inferred
- REQ-DDB-SCHEMA-005 measured
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-WIKI-034 measured