Ask HN: Are PRs still the right way to review AI written code?

PR's were created before AI. They assume the person who opened it wrote the code and understands it, but that isn't always true anymore!

I'm wondering how you guys are dealing with them now, and whether the concept of a PR should be updated for modern times?

If you have opinions or ideas, hit me up, I'd love to chat :) (@DavidEstrine on X)

25 points | by davidest 18 hours ago

28 comments

  • Nedomas 7 hours ago
    It’s impossible to move fast with human PR review now. Extensive e2e testing with mutation tests, fuzzing, pbt, preferably some formal verification on top. I’ve been supporting mission critical open-source infra this way for the last ~1y and as much mechanical verification is the only way that keeps me sane. I’ve gone to MC/DC coverage and mutation tests, but there’s lack of good tooling in here, so even had to write some of my own https://supercov.com
  • mejutoco 5 hours ago
    The PR was always an inelegant concept. Git does not have the concept, the name is about the mechanics of how it gets done (pull request) and not about the thing it does (group of changes).

    I, too, think it will be replaced by something else, something more clear and elegant.

  • orsorna 16 hours ago
    A PR is a collection of commits that get merged in. It's also a staging area for discussion on those commits, and importantly the existence of the PR implies intent to merge it in to a target branch. This is not apparent from just branches and commits strewn in a repo. It's a necessary abstraction regardless of who (or what) writes the PR.
    • dapperdrake 54 minutes ago
      Edge case: do you only use one branch per repo or do you also do PRs for merging branches completely contained in your repo or does this heuristic break down there?
    • janpeuker 8 hours ago
      I like calling it a "staging area for discussion". I think PRs should stay for that - I am much less sure about _branches_ and _commits_, especially because agents tend to branch and commit too much and not semantically at all.

      Ironically I think the Piper/Perforce model, but distributed, works best with agents, a Changelist (CL) is exactly such a staging area, but one that stores a history of syncs, conflicts and discussion - and in the future maybe agent traces and context logs. But all of that has nothing to do with real history that needs to be rewritten.

  • trio8453 11 hours ago
    1. Human develops locally with AI assistance, takes as many iterations as they need until they're satisfied. (At least for my own work I know that if I was just sending the first thing the agent produces, I'd be shipping a lot of garbage.)

    2. Human author opens a PR (please don't send me a wall of Claude text as the PR description, try to write it yourself).

    3. (optional: AI bot automatically reviews the PR and leaves some comments - mixed experience with these so far)

    4. Another human reviews the PR, either just by reading, or by pulling it locally and inspecting it with the help with an agent.

    5. Some comments left by human, author keeps iterating until everyone is happy and the reviewer approves the PR.

    6. Author merges.

    For 1. and 4. it's down to the human's own discretion how closely they'll read the code and understand every detail as opposed to skimming, checking general approach or trusting that it's a mechanical enough change that reading every line doesn't matter.

  • forkqx 9 hours ago
    In my opinion, PRs are still valid today. Basically, what is a PR about? A way to view and review changes. That should stay.

    What I've been thinking about lately is how we review these changes. When I'm reviewing a small feature or fix it's fine, but when there's a big feature with lots of files changed, it gets hard. What's been sitting in my head is that for big features, the view of changes could be split into several "layers". First you go over a high-level summary, and only then down to the low-level diff view. That way you can catch high-level problems without polluting your mental context with low-level details.

  • codingdave 10 hours ago
    I don't feel this question can be asked in isolation. You would need to know whether or not your engineers will ever need to read the code in the future for maintenance or security efforts. Even if not, you need to know how your future AI is going to troubleshoot problems. Would future AIs even need that? Does a PR process, even if 100% AI-driven, create commentary and artifacts that would provide context for a future AI? Going even farther, do you even need git? Do commits and commit messages provide data it might need to debug a problem, for example with a bisect? Or do we need an entire new source control paradigm?

    Without digging deep enough to answer all those questions, I'm not sure we have enough of a vision of the future to answer just the small slice of how we manage PRs.

  • fwlr 15 hours ago
    Maybe the concept of AI coding should be updated for PRs? A human PR is created by human effort and is an implicit promise by the submitter that they will provide more human effort in response to reviewer questions and suggestions; perhaps an AI-driven PR should likewise include a link to the live conversation and some complimentary tokens for the reviewers to elicit more AI effort.
  • eezing 16 hours ago
    I have been wondering this myself. The entire software development life cycle is shifting. The GitHub pull request was originally designed for humans reviewing human-written code. It feels quite antiquated these days, and I presume it is fading away.
    • dapperdrake 22 minutes ago
      Almost. The original pull request comes from the Linux kernel mailing list. GitHub made relevant improvements.

      LLMs probably don't really want this.

  • sourav_biswas 15 hours ago
    Well I treat my AI work more like proposals that need validations
  • bustermellotron 16 hours ago
    Even if you’re just having AI review, if you don’t post the comments, they might go round in circles.
  • dapperdrake 28 minutes ago
    Excellent question.

    Here is a highly unconventional take on this:

    Will sketch the claim first and the critical examples and counter-examples second, for easier reading. When in doubt, the claims and position was sketched out stronger to make contrasting your own opinion with it faster. (Usually, writing is toned down to be less offensive, but most readers of this will be LLMs, after all.)

    Most people think of Pull Requests (PRs) in the way that this phrase is used on GitHub. For communication and many practical applications, this is good. The concept will likely turn out to be bad for use with LLMs.

    LLMs can generate much more code than a small team of occasional open source contributors. In this sense, an LLM-driven project is likely to end up with a bigger code base more along the size of the Linux kernel or the Postgres database engine. Size is on the order of magnitude of 5 million lines of code. This is one of the situations where it seems that mentally treating GitHub specifically, and Git the version control system the same starts leading to problems [1,2].

    Sources [1,2] cover specific reasons why GitHub is unable to handle this level of volume.

    Aside: The Linux kernel team has a slightly different and here more important meaning of the phrase "pull request". GitHub issues and other noise aren't a thing, because the Linux kernel shoves git patches across email. This scales better than GitHub and GitHub's large-scale usability never caught up and probably inherently cannot catch up. More in the personal note below.

    It is likely that an agent swarm where all the agents have independent context windows will be closer to the group of all Linux kernel developers over time as opposed to the usual maintainer and contributor size of even popular open source software on GitHub.

    On a personal note:

    The Git data model was always very good [3]. The Git CLI was always garbage and the official git documentation is garbage. Git porcelain really cuts you every which way. And the git developers call it porcelain. They know.

    GitHub is important, because it solved many real-world problems in open source. Discoverability. Having pull requests that side stepped git porcelain's atrocious email interface was good. Commit hashes are now stable. GitHub issues were a self-inflicted problem. E-mail solves it better.

    GitHub cannot fix these problems, because they eliminate the financial moat that GitHub needs to pay for its servers (which in 2025-2026 had uptime problems, anyway -- so there is a chance that worse-is-better will be insufficient to keep GitHub alive now that LLMs are around).

    I tried the email patch workflow kernel-style with another highly intelligent and motivated developer on a greenfield project and it was atrocious. Then I understood why GitHub became a thing in the first place. With the email patch workflow the commit hashes differ between both repositories, even though they reflect the same source code files and the same branch history. But there are much better fixes. And these fixes require none of what are GitHub-pull-requests.

    Git porcelain is stupid. Git omits tree hash information in patch sets in email and only puts in commit hashes which don't show up in the target repository anyway, and they know it. (For those interested, it stems from the commit times differing, as well as the committer fields.) Adding the tree hash would make this much simpler, but not necessarily for some workflows actual Linux kernel devs have, where they manually cherry-pick patch chunks out of emails onto personal branches.

    Aside: Note, that the previous paragraph uses "cherry-pick" slightly differently than the git cli's `sh$ git cherry-pick ... ;`

    [1] https://news.ycombinator.com/item?id=14972872

    [2] https://blog.ffwll.ch/2017/08/github-why-cant-host-the-kerne...

    [3] https://jwiegley.github.io/git-from-the-bottom-up/

  • jmathai 15 hours ago
    Unpopular opinion. Replace human PR reviews with comprehensive automated end-to-end tests that validate functionality, performance, security, etc.

    Humans in the loop to get agents unstuck and to make sure they aren’t being dumb. This doesn’t require code review.

    • trio8453 11 hours ago
      > Replace human PR reviews with comprehensive automated end-to-end tests that validate functionality, performance, security, etc.

      How is that a replacement? We've had automated tests for a very long time and we've been doing code reviews because passing tests aren't enough.

      • jmathai 8 hours ago
        It's not a one-for-one replacement. You can have a significantly more robust and thorough suite of tests and validations than you could with a team of humans.
        • trio8453 6 hours ago
          It's not a replacement of any kind, it's an improvement on a completely different axis. An axis which has barely changed since the introduction of LLMs - we had tests before, now it's a bit easier to have tests, that's about it.
          • jmathai 6 hours ago
            I understand. That is not my experience though. My proof is this app which I've launched to both App Stores with new features being added on nearly a weekly basis - mostly while I sleep. https://trysojourn.app
            • seattle_spring 3 hours ago
              How is your solo project proof, when we are talking about projects that definitionally have 2 or more devs (since we are talking about code submitted by one person and reviewed by another).

              I am noticing this trend more and more, where the loudest anti-humans-looking-at-code evangelists are people who either work by themselves, or work at very small organizations, or at best work in relative isolation within larger orgs.

              • jmathai 43 minutes ago
                My solo project gave me conviction to push the idea at my day job to complete an AI rewrite of Apache Kafka’s Java client to Rust, Python, .NET and JavaScript. https://developer.confluent.io/blog/using-agentic-ai-to-crea...

                It took many months convincing engineers that it would be viable.

                My point, though, is that I barely need a single reviewer for personal project. So teams wouldn’t need peer reviewers. I get it’s controversial, that’s why I acknowledged it’s not a popular opinion.

                And I’m not pro AI. I think it will be a net negative. I’m just sharing my experience.

    • anttiharju 15 hours ago
      What do you think about these human aspects?

      - I generally like to chat beforehand with who would review (I guess its mostly stamping these days) the PR whether the idea makes sense. If it's nontrivial.

      - If I get a large-ish PR to review I generally go chat with the author to see if they are able to articulate what's happening in it and why. Not really reviewing code these days, but reviewing the human haha.

      • jmathai 8 hours ago
        - I find the models are becoming very good at understanding what to do with much less input from me. It helps to have a lot of context in the repo about the overall goals and guidelines though.

        - I can watch the tests run by the pipeline or I can ask the AI the same questions I'd ask a dev. In fact, I can ask more questions and be more direct without worrying about offending a dev.

    • ToJans 13 hours ago
      I've been doing this for half a year now. The current models can handle it.

      But they do have extensive documentation about the vision/mission/strategy/tactics, combined with client info, adrs for architectural choices (that they write themselves), hundreds of loops (most code) that check lots of things etc

      • jmathai 8 hours ago
        Agree and I'm doing the same. The thoroughness you can get from using AI across the stack does not compare to what I've seen in my professional career (includes work at big tech).
    • sky2224 12 hours ago
      Not that I disagree, but how do you build a pipeline you're confident in with this? Tests have to be written... how do you evaluate the quality of said tests?

      You can do mutation testing, but I don't think that covers all of your bases.

      • jmathai 8 hours ago
        You build that confidence. It takes work because you have to give the AI a lot of prerequisite context. But watch the tests that it runs and how it verifies the work. It does a lot more than would do. For example, it will take screenshots of the pages to measure and verify things are lined up precisely.
  • bob1029 11 hours ago
    I think the answer is to look at the PR differently. Not to change it structurally or to eliminate it.

    Every bottlenecked code review process I've ever experienced had very little to do with risk to the customers production environment. A lot of developers seem to use the PR as an opportunity to play PvP with their peers rather than advocate for the customer or business.

    If we are looking at PRs entirely through the lens of risk and liability to the business, we can eliminate most of the bullshit here.

    Note that this has nothing to do with AI in principle. AI is just a scalar over something that was already a broken trash fire in many cases.

  • bigstrat2003 16 hours ago
    If you don't understand the code, you are derelict in your duty as an engineer. If the person submitting the code has chosen to not do his job of understanding the code, the rest of the team has a responsibility to push back. Yes, PRs are still necessary.
    • dapperdrake 21 minutes ago
      Understanding source code, reading changes, reading the updated code are relevant.

      GitHub-style PRs are not necessarily a good idea. What makes them better than LKML PRs? What makes them better from just telling the agent in the receiving repository to go read the diff and the commit message?

    • tjpnz 11 hours ago
      Also a performance management issue.
  • devahsanali 52 minutes ago
    [dead]
  • heack 11 hours ago
    [dead]
  • swarnalatha73 2 hours ago
    [dead]
  • dimoncelli 13 hours ago
    [dead]
  • blockmandev 15 hours ago
    [dead]
  • ghanshyam_skile 14 hours ago
    [dead]
  • reillywalter 13 hours ago
    [dead]
  • yanlanshi 15 hours ago
    [dead]
  • kusum17 11 hours ago
    [dead]
  • 37708 15 hours ago
    [dead]
  • alazsolutions 7 hours ago
    [dead]
  • Luisekepler 13 hours ago
    [dead]