Scope: organization
Status: enabled
Path: org/code-review-standards.md
Consistent code review practices reduce defects, spread knowledge, and build shared ownership. These guidelines apply to all repositories. They set expectations for both authors and reviewers.
- Scope tightly. A PR should do one thing. Refactoring, feature work, and dependency bumps belong in separate PRs.
- Write a meaningful description. Include: what changed, why it changed, and how to test it. Link the relevant issue or ticket.
- Self-review first. Read your own diff before requesting review. Catch typos, debug logs, and commented-out code yourself.
- Keep it reviewable. PRs over 400 lines of non-generated code are hard to review well. Break them up.
Use draft status to share work-in-progress or get early design feedback. Mark a PR ready for review only when it is genuinely ready to merge.
- Review the code, not the author. All feedback should be about the change, never about the person.
- Be specific. "This function is confusing" is not actionable. "This function has three responsibilities; I'd extract the validation logic into a helper" is.
- Distinguish blocking from non-blocking. Use prefixes:
[blocking]— must be addressed before merge[nit]— style or minor quality; author's call[question]— you want to understand, not necessarily change[suggestion]— a potentially better approach, but not required
- Correctness — Does the code do what the description claims? Are edge cases handled?
- Security — Does the change introduce injection, broken auth, or secret exposure? (See
org/secure-coding-standards.md.) - Tests — Are new behaviors tested? Are tests meaningful (not just coverage theater)?
- Readability — Will a new team member understand this in six months?
- Performance — Are there obvious N+1 queries, unbounded loops, or blocking calls in async contexts?
- First review within 1 business day of the ready-for-review signal.
- Re-review after author updates within 4 business hours.
A PR may be merged when:
- At least one approved review from a non-author team member.
- All
[blocking]comments are resolved. - CI is green (all required checks pass).
- The branch is up to date with the target branch.
Merging your own PR without review is permitted only for hotfixes during an active incident, and requires a follow-up review within 24 hours.
| Anti-pattern | Why it's harmful |
|---|---|
| Rubber-stamping without reading | Increases defect escape rate |
| Reviewing only what you wrote previously | Creates knowledge silos |
| Blocking on style preferences already caught by linter | Wastes author time; automate it |
| Leaving a PR without response for > 2 days | Blocks teammates and kills flow |
| Making sweeping architectural suggestions on a small PR | Wrong venue; open a design doc discussion |
Questions about this policy → #engineering-process on Slack.