Review behavior with multi-commit PRs: analyzing intermediate vs final state
Current Behavior
When reviewing pull requests with multiple commits, the reviewer appears to analyze commits individually rather than the final cumulative state. This creates situations where feedback references code that exists in early commits but was modified or removed in subsequent commits.
Technical Details
The review process seems to examine:
- Individual commit diffs in isolation
- Files at specific commit points
- Patterns from intermediate states
Rather than:
- The total diff from base to head
- Files in their final state
- The cumulative effect of all commits
Use Case Example
A developer workflow often involves:
- Making initial changes (commit A)
- Receiving feedback or realizing improvements needed
- Making corrections in follow-up commits (commit B, C)
Current behavior may flag issues from commit A even after they're resolved in commits B or C.
Potential Enhancements
Consider implementing one of these approaches:
Option 1: Review only the cumulative diff
- Analyze base→head changes as a single unit
- Focus on final file states
Option 2: Maintain commit awareness
- Clearly indicate which commit is being reviewed
- Note when issues are resolved in later commits
Option 3: Progressive review
- Track fixes across commits
- Acknowledge when earlier issues are addressed
Benefits
This would reduce confusion when developers have already addressed feedback within the same PR through subsequent commits, making the review process more aligned with typical development workflows.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗