Compare commits

...

1 Commits

Author SHA1 Message Date
Otto (AGPT)
10753297b8 docs(skill): add coverage guidance to pr-address skill
When addressing PR comments, agents should verify new code they write
has test coverage. Codecov enforces patch coverage on changed lines,
so untested new code will fail the codecov/patch check.

Adds a Coverage section with the pytest --cov command and clear rules
for maintaining coverage when making fixes.

Related to SECRT-2217, SECRT-2216

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2026-04-07 10:38:21 +00:00

View File

@@ -141,6 +141,22 @@ Then commit and **push immediately** — never batch commits without pushing. Ea
For backend commits in worktrees: `poetry run git commit` (pre-commit hooks).
## Coverage
Codecov enforces patch coverage on new/changed lines — new code you write must be tested. Before pushing, verify you haven't left new lines uncovered:
```bash
cd autogpt_platform/backend
poetry run pytest --cov=. --cov-report=term-missing {path/to/changed/module}
```
Look for lines marked `miss` — those are uncovered. Add tests for any new code you wrote as part of addressing comments.
**Rules:**
- New code you add should have tests
- Don't remove existing tests when fixing comments
- If a reviewer asks you to delete code, also delete its tests, but verify coverage hasn't dropped on remaining lines
## The loop
```text