Summary
[tool.pytest.ini_options] testpaths silently overrides the root-dir input of the run-tests-uv action. In a repo with testpaths = ["tests"], the package's own doctests execute nowhere — not locally, not in CI — while CI reports green.
Why this is easy to miss
run-tests-uv invokes pytest with --doctest-modules but no path argument. Collection is therefore driven entirely by testpaths. The action's root-dir input only feeds --cov=, so it looks like the package dir is being collected when it is not. Coverage numbers can even look plausible because --cov still names the package.
Unlike ruff-ruleset drift, this failure mode does not turn a repo red. It keeps it green while testing nothing, so it is invisible until someone widens testpaths and watches the collected-item count jump.
Observed impact
Found in 3 of 8 repos in a single wave-0 rollout batch:
| repo |
before |
after widening testpaths |
i2mint/focal |
1 item collected |
7 — focal/tests/test_extension_store.py plus all module doctests had never run |
i2mint/dol_cookbook |
pipes.py 0% covered |
100% |
i2mint/reci |
testpaths pointed at a tests/ dir that does not exist → silent pytest rootdir fallback |
|
i2mint/doodad still has 3 latent doctest failures hidden this way (see i2mint/doodad), and i2mint/ij has 2 broken doctests plus one that hangs indefinitely (see i2mint/ij).
Proposed fix
Options, roughly in order of preference:
- Make
run-tests-uv pass an explicit path (the package dir) rather than relying on testpaths, so the action's contract matches its documented behaviour.
- Have
read-ci-config warn loudly when testpaths is set and excludes the package directory, so the repo owner sees it in the CI log.
- Add a
wads audit check: "package contains >>> doctests but testpaths omits the package dir" → surface as a repo_audit finding.
⚠️ Hazard for any fleet-wide sweep
Do not naively widen testpaths across the fleet. At least one repo (i2mint/ij) has a package doctest that hangs indefinitely — pytest <pkg> --doctest-modules never terminates. Any sweep needs a per-repo timeout and a way to quarantine hangers.
Reproduce
In an affected repo:
python -m pytest --collect-only -q # what CI actually collects
python -m pytest <pkgdir> --doctest-modules --collect-only -q # what you assumed it collects
Surfaced during the 2026-07-30 wave-0 rollout batch. Cross-ref: the running sweep journal in #51.
Summary
[tool.pytest.ini_options] testpathssilently overrides theroot-dirinput of therun-tests-uvaction. In a repo withtestpaths = ["tests"], the package's own doctests execute nowhere — not locally, not in CI — while CI reports green.Why this is easy to miss
run-tests-uvinvokes pytest with--doctest-modulesbut no path argument. Collection is therefore driven entirely bytestpaths. The action'sroot-dirinput only feeds--cov=, so it looks like the package dir is being collected when it is not. Coverage numbers can even look plausible because--covstill names the package.Unlike ruff-ruleset drift, this failure mode does not turn a repo red. It keeps it green while testing nothing, so it is invisible until someone widens
testpathsand watches the collected-item count jump.Observed impact
Found in 3 of 8 repos in a single wave-0 rollout batch:
testpathsi2mint/focalfocal/tests/test_extension_store.pyplus all module doctests had never runi2mint/dol_cookbookpipes.py0% coveredi2mint/recitestpathspointed at atests/dir that does not exist → silent pytest rootdir fallbacki2mint/doodadstill has 3 latent doctest failures hidden this way (see i2mint/doodad), andi2mint/ijhas 2 broken doctests plus one that hangs indefinitely (see i2mint/ij).Proposed fix
Options, roughly in order of preference:
run-tests-uvpass an explicit path (the package dir) rather than relying ontestpaths, so the action's contract matches its documented behaviour.read-ci-configwarn loudly whentestpathsis set and excludes the package directory, so the repo owner sees it in the CI log.wadsaudit check: "package contains>>>doctests buttestpathsomits the package dir" → surface as arepo_auditfinding.Do not naively widen
testpathsacross the fleet. At least one repo (i2mint/ij) has a package doctest that hangs indefinitely —pytest <pkg> --doctest-modulesnever terminates. Any sweep needs a per-repo timeout and a way to quarantine hangers.Reproduce
In an affected repo:
Surfaced during the 2026-07-30 wave-0 rollout batch. Cross-ref: the running sweep journal in #51.