Skip to content

docs(testing): add regression test tracking policy #176

Description

OSSF Silver Criterion

regression_tests_added50 (MUST) — At least 50% of bug fixes must include a regression test.

Description

Define a regression test tracking policy that ensures at least 50% of bug-fix PRs include a regression test. Issue #146 covers adding a regression test checkbox to the PR template; this issue covers the policy definition, tracking label, and measurement mechanism.

Acceptance Criteria

  • regression-test label is created in the repository
  • Policy is documented in CONTRIBUTING.md or the test policy document (docs(test-policy): create formal test policy document #145)
  • Policy defines: when regression tests are required, how to track compliance, what counts as a regression test
  • Bug-fix PRs are expected to check the regression test checkbox and apply the label
  • A mechanism exists to measure the 50% target (e.g., label-based query, CI check)

Implementation Guidance

  1. Create regression-test label (color suggestion: #B60205, description: "PR includes regression test for a bug fix").

  2. Add policy to CONTRIBUTING.md or test policy document:

## Regression Test Policy

Bug-fix pull requests should include a regression test that verifies the fix and
prevents the bug from reoccurring. Our target is for at least 50% of bug-fix PRs
to include regression tests.

When submitting a bug fix:
1. Check the "Regression test included" checkbox in the PR template
2. Apply the `regression-test` label if a test is included
3. If no regression test is feasible, explain why in the PR description
  1. Add a periodic query to measure compliance:
    • PRs with label bug AND label regression-test / PRs with label bug >= 50%

References

Relationships

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions