Problem
docs/CODE_REDUCTION_PLAN.md §1 found four modules with no production importer. Deleting them in de7551a orphaned two more that had been reachable only through them:
Reachability is a property of the import graph, not of a file, so a single-pass manual scan is invalidated by its own remediation. Both orphans kept passing tests the whole time, because the last importer standing was their own test file — a passing test proves something about a module's behaviour, never that anything calls it.
The fixed-point rule is now documented in §1, but it is not mechanised, so the next deletion will do this again.
Scope
Add a check to the existing tests/repo/ lane that walks the src import graph and fails on any module with zero src importers.
- Roots are
src/entrypoints/** plus src/extension/manifest-policy.ts, which is consumed by wxt.config.ts and so reports zero src importers while being very much alive.
- "Only its own test imports it" must fail, not pass.
- Any exemption belongs in an explicit allowlist that names why each entry is exempt, so the check is not quietly disabled the first time it is inconvenient.
Acceptance criteria
Problem
docs/CODE_REDUCTION_PLAN.md§1 found four modules with no production importer. Deleting them inde7551aorphaned two more that had been reachable only through them:src/background/filed-returns-download-result.ts— viafiled-returns-single-artifact-download-completion.ts(since removed)src/connectors/gst/filed-returns-detail-page-guard.ts— viafiled-returns-download.ts(cleanup tracked in fix(download): single-period acquisition hardening follow-ups from PR #96 review #101)Reachability is a property of the import graph, not of a file, so a single-pass manual scan is invalidated by its own remediation. Both orphans kept passing tests the whole time, because the last importer standing was their own test file — a passing test proves something about a module's behaviour, never that anything calls it.
The fixed-point rule is now documented in §1, but it is not mechanised, so the next deletion will do this again.
Scope
Add a check to the existing
tests/repo/lane that walks thesrcimport graph and fails on any module with zerosrcimporters.src/entrypoints/**plussrc/extension/manifest-policy.ts, which is consumed bywxt.config.tsand so reports zero src importers while being very much alive.Acceptance criteria
masteronfiled-returns-detail-page-guard.ts, and passes once fix(download): single-period acquisition hardening follow-ups from PR #96 review #101's cleanup lands.