review: treat a new negative assertion as a decision, not as coverage - #2861
Open
EmilianoU26 wants to merge 1 commit into
Open
review: treat a new negative assertion as a decision, not as coverage#2861EmilianoU26 wants to merge 1 commit into
EmilianoU26 wants to merge 1 commit into
Conversation
An assertion that a behavior is ABSENT (`not in`, `assertNotIn`, `not.toContain`, `pytest.raises` on a call that used to succeed) is part of the behavior change, not test coverage — and it arrives in the diff wearing coverage's clothes, so scope-creep detection walks past it. Three things the review now does: - Scope check: a new negative assertion needs the stated-intent line that authorizes the removal. With nothing to cite, it is scope creep signed as coverage. - The testing specialist states the revert cost in the finding. Once merged, restoring the old behavior makes these tests fail, so whoever reverts looks like the author of the regression. - The one that is easy to miss: a PRE-EXISTING negative assertion emptied by this diff. A rename or removal makes a standing `assert "<old token>" not in output` true forever, so it stops guarding without ever going red. Grep the diff for renamed or deleted identifiers, then grep the suite for negative assertions naming the old token — including the ones inside tests that assert something else. The scope-check bullet is edited in `scripts/resolvers/review.ts`, which feeds both `/review` and `/ship`; `review/SKILL.md` and `ship/sections/plan-completion.md` are the regenerated output. `review/specialists/testing.md` is hand-maintained. Kept deliberately terse in the skeleton: `/review` sits close to its `maxSkeletonBytes` ratchet, so the always-loaded bullet is one line and the detail that earns its keep lives in the specialist, which loads on demand. Parity suite: 21/21. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
An assertion that a behavior is ABSENT (
not in,assertNotIn,not.toContain,pytest.raiseson a call that used to succeed) is part of thebehavior change, not test coverage — and it arrives in the diff wearing
coverage's clothes, so scope-creep detection walks past it.
Three things the review now does:
authorizes the removal. With nothing to cite, it is scope creep signed as
coverage.
restoring the old behavior makes these tests fail, so whoever reverts looks
like the author of the regression.
this diff. A rename or removal makes a standing
assert "<old token>" not in outputtrue forever, so it stops guarding without ever going red. Grep thediff for renamed or deleted identifiers, then grep the suite for negative
assertions naming the old token — including the ones inside tests that assert
something else.
The scope-check bullet is edited in
scripts/resolvers/review.ts, which feedsboth
/reviewand/ship;review/SKILL.mdandship/sections/plan-completion.mdare the regenerated output.
review/specialists/testing.mdis hand-maintained.Kept deliberately terse in the skeleton:
/reviewsits close to itsmaxSkeletonBytesratchet, so the always-loaded bullet is one line and thedetail that earns its keep lives in the specialist, which loads on demand.
Parity suite: 21/21.
🤖 Generated with Claude Code