mirror of
https://github.com/codeflash-ai/codeflash-agent.git
synced 2026-05-04 18:25:19 +00:00
- sessions.md: hard compaction limits, no-polling, file read budget - debugging.md: root cause first, isolated testing, subprocess logging - github.md: strengthen MCP-first enforcement - error-handling.md (packages): no silent swallowing, protect ast.parse - test-coverage.md (packages): every module needs tests, known gaps
935 B
935 B
Test Coverage Requirements
Every module needs unit tests
If you add or modify a module, it must have a corresponding test file. No exceptions for "infrastructure" or "worker" code -- those break the hardest in E2E.
Modules that currently have zero unit tests and have broken in production:
pipeline/_candidate_gen.py-- candidate generation strategiesanalysis/_discovery_worker.py-- pytest test collection subprocess
Other untested modules that need coverage:
codegen/_create_pr.pyai/_tabulate.pybenchmarking/_trace_db.pybenchmarking/_benchmark_worker.py
Test the error paths
The happy path usually works. What breaks in E2E is:
- Malformed input (bad XML, raw source where markdown expected, missing config keys)
- Subprocess crashes (exit code != 0 with no output)
- Version mismatches (pytest 9 vs 8, different config section names)
Write tests for these cases, not just the golden path.