20 / 57 · 17 Git & Version Control · Pull Request Workflows← prev⊞ allnext →☰ Read as one page
3.3PR Sizing: Small Is Beautiful
Large PRs are reviewed poorly. Research shows that review quality drops significantly after 400 lines of changes. For test code, the threshold is even lower because test logic is harder to follow than application logic.
| PR Size | Lines Changed | Review Quality | Typical Review Time |
|---|---|---|---|
| Small | < 200 | High -- every line gets attention | 15-30 minutes |
| Medium | 200-400 | Moderate -- key areas reviewed | 30-60 minutes |
| Large | 400-800 | Low -- skim major sections | 1-2 hours |
| Huge | 800+ | Rubber stamp -- too much to process | "LGTM" |
How to Keep PRs Small
- Split by feature area: Instead of one PR with 20 test files, submit separate PRs for login tests, checkout tests, and payment tests.
- Split by type of change: One PR for new tests, another for refactoring existing tests, a third for infrastructure changes.
- Split by layer: One PR for page objects, another for test specs that use them.
- Use stacked PRs: PR 1 adds the base infrastructure. PR 2 (based on PR 1) adds the first set of tests. PR 3 adds more tests.
When Large PRs Are Unavoidable
Sometimes you must submit a large PR (e.g., migrating a test framework). In these cases:
- Add a detailed PR description explaining the scope
- Use PR comments to guide the reviewer through the changes
- Break the review into sessions: "Please review
page-objects/first, thenspecs/" - Consider a walkthrough meeting for PRs over 1000 lines