You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(devtools): stop test ownership from overcounting package imports #608
devtools verify-test-ownership can overcount broad package imports as unit-test ownership for every descendant module.
Evidence from current master:
devtools verify-test-ownership --json reports production_modules: 689 and covered: 771. A per-module ownership gate should not be able to cover more modules than exist.
devtools/verify_test_ownership.py resolves imports with this descendant rule:
if a test imports imp, every production module whose dotted name starts with imp + "." is counted as covered.
A broad import such as from devtools import verify is parsed as importing devtools, which then marks all devtools.* modules as covered.
tests/unit/devtools/test_verify_test_ownership.py checks that the committed manifest passes, but does not include a regression proving package imports cannot cover unrelated descendants.
This makes the gate a false-assurance mechanism: it can say every production module has an importing unit test even when a package/facade import is doing most of the work.
Acceptance criteria
Make ownership matching exact by default: importing a package or facade does not cover all descendants.
If facade ownership is desired, declare it explicitly in docs/plans/test-ownership.yaml or another manifest with a bounded path/prefix and reason.
covered in JSON output cannot exceed production_modules.
Add regression tests where from devtools import verify or import polylogue does not cover unrelated modules.
Re-run devtools verify-test-ownership --json and address any newly uncovered modules honestly.
Superseded by #590. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.
Activity
Sinity commentedon May 1, 2026
Superseded by #590. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.