Repository navigation
fix(pr-review): judge earlier findings per head, rebase-safe follow-up delta - #1017
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…p delta The repeat filter dropped any new finding with the same path and category within three lines of an open or dismissed one. That swallowed a new bug next to an old one, and missed an old issue whose code moved. It now drops only near-exact restatements (same path, category, nearby line and a title sharing most of its words). The kickoff and the system prompt ask the reviewer to judge each open finding at the new head, following moved code, never treating modified lines as a fix, and leaving it open when unsure. fetchChangedPaths was a three-dot compare between the last reviewed head and the new one, so after a force-push rebase onto a newer base it listed every file the base branch changed. fetchChangesSince keeps that compare when the earlier head is still an ancestor. When history was rewritten it diffs each head against the pull request's base and keeps only the files whose own change differs, ignoring hunk-header line shifts. Without a base, or when a comparison hits the 300-file cap, the delta is unknown and the kickoff asks for a full review.
Makisuo
force-pushed
the
fix/pr-review-follow-up-delta
branch
from
September 23, 2026 22:36
abf6f81 to
3e1bb74
Compare
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.
Follow-up to #1001, #1014 and #1016, rebased onto main. The kickoff's changed-files line keeps the exact shape
followUpScope(#1014) parses, so the coverage gate reads a rebase-safe delta the same way.Earlier findings
The mechanical repeat filter dropped any new finding with the same path and category within three lines of an open or dismissed one, which suppressed a new bug sitting next to an old one and missed an old issue whose code moved.
withoutRepeatsnow drops only near-exact restatements: same path, category, a line within 3, and titles sharing at least 60% of their words.PR_REVIEW_SYSTEM_PROMPTask the reviewer to judge each open finding at the new head: follow moved code, modified lines are not a fix, leave it open when unsure, never re-file an open finding, but do file a different defect nearby.Follow-up delta across a rebase
fetchChangedPaths(previousSha, headSha)was a three-dot compare, so after a force-push rebase it listed every file the base branch changed.VcsProviderClient.fetchChangesSincereturns{ paths, rewritten }.ahead/identicalthe forward diff is used as before. Otherwise each head is compared against the PR base and only files whose own change differs are kept (vcs/range-diff.ts, hunk-header line numbers ignored; binary/oversized files, added and dropped files count as changed).paths: undefinedand the kickoff asks for a full review (previously a >300-file compare was truncated silently).Tests
range-diff.test.ts, newfindings.test.tscases (new bug beside an old one kept, moved code left to the model, kickoff wording), andGithubProvider.pulls.test.tscases for the ancestor path, a rebase that excludes base-branch files, and both fallbacks.bun run testfor pr-review and the GitHub vendor: backend 112 and apps/ai chat 185 passing.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit