Skip to content

feat(pr-patrol): detect shared commits in overlap warnings#1825

Merged
OAGr merged 1 commit intomainfrom
claude/frosty-jennings
Mar 7, 2026
Merged

feat(pr-patrol): detect shared commits in overlap warnings#1825
OAGr merged 1 commit intomainfrom
claude/frosty-jennings

Conversation

@OAGr
Copy link
Contributor

@OAGr OAGr commented Mar 7, 2026

Summary

  • PR Patrol's overlap detection now checks for shared commits between overlapping PR pairs (stacked branches)
  • If all overlapping files come from shared commits, the warning is suppressed entirely with a log entry
  • If some files are from shared commits but others aren't, only genuine overlaps are reported with a note about the stacked relationship
  • Commit SHAs are cached across pairs to minimize API calls

Fixes false positive warnings like the one on #1822/#1811 where one branch was stacked on the other.

Test plan

  • TypeScript type-check passes (tsc --noEmit)
  • 2674/2675 crux tests pass (1 pre-existing failure unrelated to changes)
  • Verify with pnpm crux pr-patrol --dry-run --once against live repo

🤖 Generated with Claude Code

When two PRs share commits (stacked branches), their file overlap is
expected and not a real conflict risk. PR Patrol now fetches commit
lists for overlapping PR pairs, identifies shared commits, and filters
out files attributable to those shared commits before posting warnings.

If all overlapping files come from shared commits, the warning is
suppressed entirely (logged as "stacked branches"). If only some files
are shared, the warning is posted for the remaining genuine overlaps
with a note about the stacked relationship.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

Warning

Rate limit exceeded

@OAGr has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a505a2f0-4031-47ef-9e99-2df3e0c5fe4e

📥 Commits

Reviewing files that changed from the base of the PR and between bc2e2ae and a1f3e98.

📒 Files selected for processing (1)
  • crux/pr-patrol/index.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/frosty-jennings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@OAGr OAGr marked this pull request as ready for review March 7, 2026 01:53
@OAGr
Copy link
Contributor Author

OAGr commented Mar 7, 2026

⚠️ PR Overlap Warning

This PR shares 1 file(s) with PR #1824:

  • crux/pr-patrol/index.ts

Coordinate to avoid merge conflicts.

Posted by PR Patrol — informational only.

@OAGr
Copy link
Contributor Author

OAGr commented Mar 7, 2026

⚠️ PR Overlap Warning

This PR shares 1 file(s) with PR #1826:

  • crux/pr-patrol/index.ts

Coordinate to avoid merge conflicts.

Posted by PR Patrol — informational only.

@OAGr OAGr merged commit 3e54e82 into main Mar 7, 2026
14 of 15 checks passed
@OAGr OAGr deleted the claude/frosty-jennings branch March 7, 2026 01:57
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