Skip to content

docs: require tests that prove every behavior-changing PR - #305

Merged
leo-aa88 merged 1 commit into
mainfrom
docs/mandatory-pr-tests
Aug 29, 2026
Merged

docs: require tests that prove every behavior-changing PR#305
leo-aa88 merged 1 commit into
mainfrom
docs/mandatory-pr-tests

Conversation

@leo-aa88

Copy link
Copy Markdown
Member

Description

The contributing guide used to bury tests under a short "new features must include tests" list, and the PR checklist had an "if applicable" escape hatch. That is gone.

CONTRIBUTING.md now opens with a TESTS ARE MANDATORY section that applies to every PR that can change behavior: bug fixes, features, refactors, performance work, breaking changes, interpreter/lexer/parser/AST/stdlib/harness changes. "I ran it locally" and "the old suite still passes" are explicitly not enough. New fixtures must prove the change: happy path, the original bug, error cases, edge cases, and adversarial cases.

The only exception is prose that cannot affect program behavior (docs, comments, license, templates, this file). This PR is that exception — it changes CONTRIBUTING.md and .github/PULL_REQUEST_TEMPLATE.md only.

The PR template no longer says "if applicable." The checklist now requires proof tests and forces docs-only PRs to say so in the Description instead of skipping in silence.

Related Issue

N/A — policy clarification, not a bugfix.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Performance improvement
  • Refactor

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have documented my changes in the code or documentation
  • I have added tests that prove my change works. Required for every bug fix, feature, refactor, performance change, and breaking change — not optional, not "if applicable". See CONTRIBUTING.md ("TESTS ARE MANDATORY").
  • Those tests cover the happy path, the original bug (for fixes), error cases, edge cases, and adversarial cases
  • If this PR cannot affect program behavior (docs/comments/license only), I explained that in the Description instead of skipping the items above in silence
  • I have run make format-check locally (or make format to fix)
  • I have run the unit tests locally
  • I have run the valgrind memory tests locally
  • All new and existing tests pass

Docs/comments/license-only: no interpreter or harness change, so there is nothing for test_cases/ or valgrind to prove. make format-check does not apply to Markdown.

Make the contributing guide impossible to misread: every bug fix, feature,
refactor, performance change, and breaking change must ship tests covering
the happy path, the original bug, errors, edges, and adversarial cases.
Close the "if applicable" loophole in the PR checklist.
@leo-aa88
leo-aa88 merged commit 4a3d3d3 into main Aug 29, 2026
2 checks passed
@leo-aa88
leo-aa88 deleted the docs/mandatory-pr-tests branch August 29, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant