Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 057653b

Browse files
docs: add regression test policy for bug fix PRs (#320)
* docs: add regression test policy for bug fix PRs - add regression testing subsection to CONTRIBUTING.md testing requirements - add bug fix checklist to PR template with regression test checkboxes - define criteria for when regression tests are required or omittable - include table of qualifying regression test types 📝 - Generated by Copilot * ci: restrict Pester tests matrix to Ubuntu only 📦 - Generated by Copilot * Revert "ci: restrict Pester tests matrix to Ubuntu only" This reverts commit 9a3377f.
1 parent 4a1dbe4 commit 057653b

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ Closes #
4242
- [ ] Documentation updated in this PR
4343
- [ ] Documentation issue filed
4444

45+
## Bug Fix Checklist
46+
47+
*Complete this section for bug fix PRs. Skip for other contribution types.*
48+
49+
- [ ] Linked to issue being fixed
50+
- [ ] Regression test included, OR
51+
- [ ] Justification for no regression test:
52+
4553
## Checklist
4654

4755
- [ ] My code follows the [project conventions](copilot-instructions.md)

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,41 @@ All contributions require appropriate tests. This policy supports code quality a
214214
- Bug fixes require regression tests that reproduce the fixed behavior.
215215
- Refactoring changes must not reduce test coverage.
216216

217+
### Regression Testing
218+
219+
At least half of all bug fix PRs must include a regression test.
220+
221+
A regression test is required when:
222+
223+
- The bug affected user-facing functionality
224+
- The fix changes control flow
225+
- The bug could reasonably recur
226+
227+
A regression test may be omitted when:
228+
229+
- The bug was in documentation only
230+
- The fix is purely cosmetic (whitespace, formatting)
231+
- A test is technically impractical (requires external services that cannot be mocked)
232+
233+
#### What Counts as a Regression Test
234+
235+
| Test Type | Counts as Regression Test |
236+
|----------------------------------------|------------------------------------------|
237+
| Unit test verifying the fix | Yes |
238+
| Integration test covering the scenario | Yes |
239+
| Manual test documented in PR | Only if automated test is impractical |
240+
| Informal local verification | No |
241+
242+
#### Bug Fix PR Requirements
243+
244+
When submitting a bug fix:
245+
246+
1. Link to the issue being fixed
247+
2. Include a regression test, or document why one is omitted
248+
3. Describe what the test verifies
249+
250+
Reviewers verify regression tests are included. Compliance is tracked over time via PR labels (`has-regression-test`, `regression-test-omitted`).
251+
217252
### Running Tests
218253

219254
Once a `tests/` directory exists, run the full test suite:

0 commit comments

Comments
 (0)