Skip to content

SOP-005: Pull Request Review & Merge ​

Version: 1.0 · Owner: Developer (reviewer) · Gate: G2

Purpose & scope ​

Merge code only when automated guardrails pass and a qualified human approves. AI review is advisory unless configured as blocking for specific rules.

Roles ​

RoleRACI
DEV (author)R
DEV (reviewer)A — merge decision
ARCHC — when ADR/spec touched
CI systemA — objective gates

Prerequisites ​

Procedure ​

Author ​

  1. Push branch; ensure all CI checks triggered.
  2. Request reviewer (not self for T1/T2).
  3. Address AI review comments: fix or document dismiss reason in PR thread.

Reviewer ​

  1. Verify traceability — Spec link, ADR IDs, ticket ID present.
  2. AI review — Read Bugbot/CodeGuru summary; validate high-severity findings.
  3. Human spot-check — Focus: error handling, auth, idempotency, test quality (not manual test execution).
  4. Contract alignment — Spot-check that tests reference OpenAPI operation IDs.
  5. Approve — Only when all required CI checks green (see checklist below).

Merge ​

  1. Squash or merge per team convention; delete branch.
  2. Release pipeline triggered → SOP-006.

Required CI checks (minimum) ​

See Linters & static analysis for tool options. Checklist:

CheckT1T2T3
Format + lint + types✓✓✓
Unit tests✓✓✓
Contract tests✓✓✓
Integration✓✓optional
E2E✓✓optional
SAST + SCA✓✓✓
Secret scan✓✓✓
OPA policy✓✓✓
AI diff review✓✓advisory
1 human approval✓✓✓
ARCH approval (ADR/spec change)✓if touchedif touched

Definition of Done ​

  • [ ] All required checks green
  • [ ] ≥ 1 human approval
  • [ ] No unresolved Critical/High security findings
  • [ ] Merged to main

SLA & escalation ​

MilestoneSLA
First review≤ 1 business day
Author response to feedback≤ 1 business day

Escalation: review stale > 2 days → EM assigns reviewer.

Reference template only — no production code. Adapt in your own project.