Goal
Reach 100% unit test coverage incrementally, starting from the current baseline of 60% (34,694 statements, 13,771 missed).
Baseline (2026-04-23)
| Coverage |
Module |
Stmts |
Missed |
| 0% |
main.py |
95 |
95 |
| 0% |
tracer.py |
268 |
268 |
| 4% |
lsp/ |
681 |
652 |
| 15% |
telemetry/ |
33 |
28 |
| 20% |
cli_cmds/ |
2,782 |
2,238 |
| 20% |
tracing/ |
748 |
599 |
| 25% |
api/ |
487 |
365 |
| 25% |
optimization/ |
496 |
370 |
| 38% |
languages/ (base) |
1,830 |
1,129 |
| 43% |
benchmarking/ |
1,518 |
871 |
| 45% |
picklepatch/ |
163 |
90 |
| 60% |
verification/ |
1,813 |
727 |
| 62% |
setup/ |
803 |
307 |
| 63% |
result/ |
340 |
126 |
| 69% |
discovery/ |
1,200 |
369 |
| 71% |
code_utils/ |
2,634 |
760 |
| 71% |
github/ |
34 |
10 |
| 71% |
languages/javascript |
5,797 |
1,681 |
| 73% |
languages/java |
7,467 |
2,053 |
| 78% |
either.py |
27 |
6 |
| 81% |
languages/python |
4,587 |
875 |
| 86% |
models/ |
863 |
124 |
Plan
Phase 0 — Infrastructure
Set up pytest-cov in CI, configure .coveragerc, add a coverage gate that fails CI if coverage drops below the current baseline. Every PR must maintain or improve coverage.
Phase 1 — Zero/near-zero coverage (0–25%)
Modules with no or minimal tests. These are the highest-risk areas.
main.py, tracer.py, telemetry/
lsp/
tracing/
api/
optimization/
cli_cmds/
Phase 2 — Low coverage (38–63%)
Modules with some tests but significant gaps.
languages/ (base: function_optimizer.py, base.py, registry.py)
benchmarking/
picklepatch/
verification/
setup/
result/
Phase 3 — Medium coverage to 100% (69–86%)
Modules with decent coverage that need gap-filling.
discovery/
code_utils/
languages/javascript
languages/java
languages/python
models/
github/, either.py
Principles
- Every PR should maintain or improve coverage — never decrease it
- Prioritize modules by risk: core pipeline (
optimization, verification, benchmarking) before peripheral (lsp, telemetry)
- Unit tests should be fast and isolated — mock external services (AI API, GitHub API)
- Use the coverage report to identify untested branches, not just untested files
Goal
Reach 100% unit test coverage incrementally, starting from the current baseline of 60% (34,694 statements, 13,771 missed).
Baseline (2026-04-23)
main.pytracer.pylsp/telemetry/cli_cmds/tracing/api/optimization/languages/(base)benchmarking/picklepatch/verification/setup/result/discovery/code_utils/github/languages/javascriptlanguages/javaeither.pylanguages/pythonmodels/Plan
Phase 0 — Infrastructure
Set up
pytest-covin CI, configure.coveragerc, add a coverage gate that fails CI if coverage drops below the current baseline. Every PR must maintain or improve coverage.Phase 1 — Zero/near-zero coverage (0–25%)
Modules with no or minimal tests. These are the highest-risk areas.
main.py,tracer.py,telemetry/lsp/tracing/api/optimization/cli_cmds/Phase 2 — Low coverage (38–63%)
Modules with some tests but significant gaps.
languages/(base:function_optimizer.py,base.py,registry.py)benchmarking/picklepatch/verification/setup/result/Phase 3 — Medium coverage to 100% (69–86%)
Modules with decent coverage that need gap-filling.
discovery/code_utils/languages/javascriptlanguages/javalanguages/pythonmodels/github/,either.pyPrinciples
optimization,verification,benchmarking) before peripheral (lsp,telemetry)