🔀 Reading: CONTRIBUTING.md
3 exercises — read a realistic open source CONTRIBUTING.md file and answer comprehension questions about contribution workflow, PR requirements, issue reporting etiquette, and licensing.
CONTRIBUTING.md essentials
- PR scope → one logical change per PR keeps review fast and focused
- Search closed issues too → "won't fix" and "resolved" are different outcomes
- CI must pass → PRs with failing tests won't be reviewed in quality projects
- Licence clause → grants project rights to your code; you keep authorship
- Branch naming → type/description (fix/, feat/, chore/, docs/) is the standard
0 / 3 completed
1 / 3
DataStream — CONTRIBUTING.md
{ex.passage} The CONTRIBUTING.md states: "Keep PRs focused: one logical change per PR. Large PRs are hard to review and will be asked to split." What is the primary reason open source projects enforce this rule?
Small, focused PRs: the gold standard in open source and professional engineering
The rule "one logical change per PR" exists for several deeply practical reasons:
1. Reviewer cognitive load: Reviewing code is mentally demanding. A PR with 15 changed files spanning a new feature, a bug fix, and a refactor forces reviewers to context-switch constantly. A 200-line single-purpose PR can be thoroughly reviewed in 15 minutes. A 1,200-line mixed PR may take hours — and reviewers are more likely to approve without truly understanding it.
2. Bisect-ability: If a bug appears after merging a large PR, narrowing down which change introduced the bug is much harder. Small, focused commits and PRs mean each merge has a clear, attributable purpose — making
3. Faster iteration: A focused PR that's mergeable now is better than a complete feature in one massive PR that sits in review for three weeks. Splitting work into logical chunks keeps the project moving.
4. Easier conflict resolution: When multiple contributors work in the same codebase, large PRs are more likely to touch the same files as others' in-progress work, creating painful merge conflicts.
What "one logical change" means in practice:
The rule "one logical change per PR" exists for several deeply practical reasons:
1. Reviewer cognitive load: Reviewing code is mentally demanding. A PR with 15 changed files spanning a new feature, a bug fix, and a refactor forces reviewers to context-switch constantly. A 200-line single-purpose PR can be thoroughly reviewed in 15 minutes. A 1,200-line mixed PR may take hours — and reviewers are more likely to approve without truly understanding it.
2. Bisect-ability: If a bug appears after merging a large PR, narrowing down which change introduced the bug is much harder. Small, focused commits and PRs mean each merge has a clear, attributable purpose — making
git bisect and rollbacks far more effective.3. Faster iteration: A focused PR that's mergeable now is better than a complete feature in one massive PR that sits in review for three weeks. Splitting work into logical chunks keeps the project moving.
4. Easier conflict resolution: When multiple contributors work in the same codebase, large PRs are more likely to touch the same files as others' in-progress work, creating painful merge conflicts.
What "one logical change" means in practice:
- Refactoring + feature → two PRs (refactor first, then feature on top)
- Bug fix + unrelated cleanup → two PRs
- Feature implementation → could be one PR, or a sequence (data model, then API layer, then UI)