test_every_harvester_subclass_is_reachable_from_the_plan

Tests › tests/test_shared_parse.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE GUARD THAT WOULD HAVE CAUGHT `macro_refs`, AND THE REASON IT IS STRUCTURAL.

Given

  1. for mod in pkgutil.iter_modules(clew.__path__): importlib.import_module(f"clew.{mod.name}")
  2. defined = { cls.stage for cls in Harvester.__subclasses__() if cls.__module__.startswith("clew.") }
→

When

  1. warmed = {h.stage for h in build_harvest_plan().active()}
  2. fields = set(HarvestPlan.__dataclass_fields__)
  3. missing = defined - warmed - _CONDITIONAL_STAGES
→

Then

  1. ✓ missing is false
  2. ✓ {"dispatch", "subscribe"} is at most fields

tests/test_shared_parse.py:360 · its file's page

What it checks (2)

  1. 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 attributed
  2. assert {"dispatch", "subscribe"} <= fields not 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

test_every_harvester_subclass_is_reachable_from_the_plan→build_harvest_plan

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_every_harvester_subclass_is_reachable_from_the_plan · 2 checksbuild_harvest_planshared_key_harvesterresolve_shared_key_patternsREQ-DDB-CONFIG-006 · measuredbuild_harvest_planlock_harvestermanifest_keyhash_fileREQ-DDB-INDEX-002 · inferredbuild_harvest_planincludes_harvesterREQ-DDB-INDEX-010 · measuredbuild_harvest_planproperty_key_harvesterREQ-DDB-INDEX-011 · measuredbuild_harvest_planREQ-DDB-PIPE-003 · measuredbuild_harvest_plangate_harvesterREQ-DDB-PIPE-007 · measuredbuild_harvest_planjs_symbol_harvesterREQ-DDB-PIPE-012 · measuredbuild_harvest_plandocstring_harvesterREQ-DDB-PIPE-013 · measuredbuild_harvest_plandefaults_harvesterREQ-DDB-PIPE-015 · measuredbuild_harvest_planspawn_harvesterREQ-DDB-SCHEMA-001 · measuredbuild_harvest_plandispatch_harvesterREQ-DDB-SCHEMA-004 · inferredbuild_harvest_planshared_key_harvesterREQ-DDB-SCHEMA-005 · measured

and 2 more requirement paths, listed below.

Also reaches 15 requirements

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