Skip to content

fix(cursor-review): resolve PR merge base before review - #175

Merged
huntcsg merged 1 commit into
mainfrom
cursor-review-fixed-merge-base
Aug 17, 2026
Merged

huntcsg merged 1 commit into
mainfrom
cursor-review-fixed-merge-base

Conversation

@huntcsg

@huntcsg huntcsg commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve the PR head's merge base against the current target-branch tip once
  • use that exact commit for generated-file classification, size counting, and reviewed diff generation
  • cover an unrebased PR after main advances with a regression test

Testing

  • go test ./... in scripts/check-pr-size
  • python3 -m unittest discover -s .github/cursor-review/tests -p 'test_*.py' -v
  • workflow-pins test suite and checker
  • git diff --check

@mattmillerai
mattmillerai self-requested a review August 17, 2026 19:05
@huntcsg
huntcsg marked this pull request as ready for review August 17, 2026 19:08
@huntcsg
huntcsg merged commit cc38d46 into main Aug 17, 2026
7 of 8 checks passed
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 46849fa7-7c00-4bf8-8462-4451ced39dd0

📥 Commits

Reviewing files that changed from the base of the PR and between cf55ea4 and 2266baf.

📒 Files selected for processing (3)
  • .github/workflows/cursor-review.yml
  • scripts/check-pr-size/main.go
  • scripts/check-pr-size/main_test.go

📝 Walkthrough

Walkthrough

The PR size check now resolves the merge base between the target branch and PR head. It uses that revision for classification and reviewed-diff generation. An integration test covers an advanced target branch.

Changes

Merge-base PR review

Layer / File(s) Summary
Resolve and apply the merge base
.github/workflows/cursor-review.yml, scripts/check-pr-size/main.go
The check validates and logs the merge base, then uses it for file diffing, classification, generated-attribute lookup, comment discounting, and reviewed-diff generation.
Validate divergent branch behavior
scripts/check-pr-size/main_test.go
The integration test verifies fork-point resolution and confirms that the diff contains only PR-branch changes.

Suggested reviewers: mattmillerai, synap5e

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor-review-fixed-merge-base
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch cursor-review-fixed-merge-base

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

@huntcsg
huntcsg deleted the cursor-review-fixed-merge-base branch August 17, 2026 19:08
@coderabbitai
coderabbitai Bot requested review from mattmillerai and synap5e August 17, 2026 19:09
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.

3 participants