NewsCrawler.org

Merging AI-written PRs without reading the code — and keeping quality

人間がコードを読まずにPRをマージする技術 ─ それでも、品質は手放さない
Image: zenn.dev

The author found 23 unreviewed pull requests from Claude Code waiting in GitHub notifications, and notes that while a human reads one PR, Claude submits two more. Reading every line proved unsustainable: the volume reached 10 PRs a day with about 300 lines of diff each, and within roughly two weeks close reading had turned into skimming. A bug in how one value was handled then reached production from a PR the author had approved, even though the problematic line was right there in the diff.

His conclusion is that human review quality falls as volume grows, so competing with AI on how much gets read is a losing game; code review exists to catch problems before shipping and to share understanding of the code, which makes humans reading every line a means, not the goal. In a blog post about its own code review, Anthropic says Claude itself writes about 90% of the Claude Code codebase, so the company moved most reading to machines and invested in making mistakes fast and easy to undo. Before a PR, Claude itself runs tests, the build and a linter[1] and shows the output; a separate agent with a fresh context reviews the diff; required CI[2] must pass before a merge; multiple agents search for bugs in parallel while other agents vote on whether the findings are genuine; security review runs independently. After merging, feature flags[3] let employees use the change first with a staged rollout, and a flag can be switched off without a redeploy; from June to September, merged PRs more than doubled and reverts dropped by more than 40%.

The number of human approvals scales with risk: low-risk changes — documentation, copy fixes, additions behind a flag — can merge without human approval, normal product changes need one, the riskiest code needs two, and the tier is set by the change itself, not the author. Agent approvals do not count as human ones, only trusted teams that own an area may use the low-risk lane, whoever instructs the AI carries the same responsibility as if they had written the code, and understanding is maintained by asking Claude to explain a section on demand, with lessons from missed bugs added to CLAUDE.md and REVIEW.md. The author keeps human reading for critical areas such as authentication and billing, and reports that required CI through branch protection, AI review as the default with human approval for critical changes, E2E tests[4] run only on the areas a PR touches, and auto-merging low-risk PRs with gh pr merge --auto sharply cut the PRs read at night.

Read the original zenn.dev

Sources

  • Zenn JA

    人間がコードを読まずにPRをマージする技術 ─ それでも、品質は手放さない

    50 likes16 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page