Tighten test-scope guidance: test only what the PR changes#68502
Merged
Conversation
Add an explicit rule to the Testing Standards and the code-review checklist clarifying that tests must be scoped to new behavior introduced by the PR. Pre-existing logic and standard-library functions are not ours to cover; tests that pass without the PR's change are padding, not coverage.
Previous phrasing only covered the "no more" direction. Rewrite to make both sides explicit: every changed behaviour must have a test that fails without the PR's change, and tests for pre-existing logic or stdlib are padding. Also surface the integration-test exception.
This was referenced Jun 13, 2026
jscheffl
approved these changes
Jun 13, 2026
pgagnon
pushed a commit
to pgagnon/airflow
that referenced
this pull request
Jun 15, 2026
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Jun 16, 2026
dingo4dev
pushed a commit
to dingo4dev/airflow
that referenced
this pull request
Jun 16, 2026
RulerChen
pushed a commit
to RulerChen/airflow
that referenced
this pull request
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human Summary
I've noticed that AI generated PRs often introduce a lot of unit tests.
In the past (pre-AI), I used to think that having a lot of unit tests is better than having less.
However, it now becomes a burden both for human-reviewing + it overloads the CI.
The idea is that unit tests will reach exactly 100% coverage (no more, no less) - exception is given when we test an integration/behavior, which requires exceeding this limit by nature.
AI Summary
Click here
Tests should be scoped to new behavior introduced by the PR — not to
pre-existing logic that was already there before the PR, and not to
standard-library or third-party functions. A test that passes without
the PR's change is padding, not coverage.
This adds that rule to two places:
AGENTS.md(Testing Standards) — so agents and contributors knowthe expectation when writing tests
.github/instructions/code-review.instructions.md(TestingRequirements) — so reviewers flag over-coverage during code review
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Sonnet 4.6) following the guidelines