🔍 Are pull requests still right for reviewing AI-written code? Developers debate
In brief
- 🔍 The asker says a PR assumes the submitter wrote and understands the code.
- 🧪 One camp wants end-to-end tests to replace human review.
- 👥 Others hold that whoever submits code must understand it.
- 📉 A small thread: about 10 comments when read.
🔍 An Ask HN post asks whether pull requests are still the right way to review AI-written code: they predate AI and assume the submitter wrote and understands the code. In the still small discussion (about 10 comments) one commenter calls for replacing reviews with comprehensive automated end-to-end tests; others reply that the PR remains necessary as a statement of intent to merge and that engineers must understand their code. Another suggestion is that AI PRs should include a link to the live model conversation. 💬
The asker (user davidest) argues that pull requests were designed before AI and assume the person who opened one wrote the code and understands it, which is no longer always true. He asks how others deal with this and whether the PR concept should be updated.
🛠️ Replies diverge. One commenter defends the PR as a collection of commits, a staging area for discussion and, above all, a signal of intent to merge into a target branch; that is needed whoever or whatever writes it. He proposes updating the idea of AI coding for PRs: a human PR is an implicit promise of further human effort when reviewers ask questions, so an AI-driven PR could include a link to the live conversation and some complimentary tokens for reviewers to elicit more AI effort.
🧪 The opposing camp calls its view unpopular: replace human PR reviews with comprehensive end-to-end tests for functionality, performance and security, with humans only getting agents unstuck. A user asks how to build a pipeline one trusts that way and how to judge test quality; mutation testing does not cover everything. Another says he has worked this way for half a year and current models cope, but with extensive documentation on vision, strategy, architectural decision records and hundreds of checking loops.
👥 Several describe human practices: chatting with the reviewer beforehand about the idea, and for large PRs asking the author to explain what happens and why, in effect reviewing the human rather than the code. One warns that if AI does the review, its comments should be posted or the loop circles. Another says that if you do not understand the code you are derelict in your duty as an engineer, the team must push back, and PRs are still necessary.
These are opinions and experiences of individual users in a small thread; points and comment counts are no evidence.