Problems with AI PRs and code reviews are a self-inflicted problem.

Originally published on LinkedIn

๐—ฃ๐—ฟ๐—ผ๐—ฏ๐—น๐—ฒ๐—บ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—”๐—œ ๐—ฃ๐—ฅ๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„๐˜€ ๐—ฎ๐—ฟ๐—ฒ ๐—ฎ ๐˜€๐—ฒ๐—น๐—ณ-๐—ถ๐—ป๐—ณ๐—น๐—ถ๐—ฐ๐˜๐—ฒ๐—ฑ ๐—ฝ๐—ฟ๐—ผ๐—ฏ๐—น๐—ฒ๐—บ.

One of the big complaints about AI-assisted development is that AI generates more code than humans can physically review.

That can be true. But I think people are looking at the problem backwards.

Weโ€™re using the old PR/review process in a completely different development model.

Before AI, a PR came with assumptions:

๐Ÿ‘ค A human read and refined the ticket. โ“ A human asked questions about the requirements. ๐Ÿง  A human designed the solution. ๐Ÿ’ป A human wrote the code. ๐Ÿงช A human ran it and checked that it worked.

The PR was a second review.

The reviewer might be more senior, looking for architecture, standards, patterns, security or maintainability.

But most reviewers werenโ€™t pulling down every PR and testing every scenario just to prove the developer had done their job.

There was an assumption the implementation at least vaguely worked.

Why? ๐—”๐—ฐ๐—ฐ๐—ผ๐˜‚๐—ป๐˜๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜†.

The engineer was accountable for the implementation. The reviewer was accountable for reviewing it. Those are not the same job.

AI changes this when we automate the human out of the loop of design and remove accountabilty.

Weโ€™re engineers. We love automation.

A ticket arrives. AI analyses it, decides what to build, creates a design nobody reviewed, writes the code and tests, runs the pipeline... and a giant PR lands in front of a human.

Theyโ€™ve never seen the design, may barely understand the requirements, and then have to validate thousands of generated lines of code.

Then we complain: โ€œThis PR is impossible to review.โ€

Well, yes. You created that problem.

Now take a different process.

A human is deeply involved in requirements, planning and design. They know what is being built, challenge the approach, and define scenarios, constraints, tests and safety rails.

Then AI builds it.

That same accountable engineer reviews the implementation against a plan they understand. They pull it down. Run it locally. Test it. Confirm the behaviour. Make sure the damn thing actually works.

That isnโ€™t really a traditional PR review.

Itโ€™s the implementation loop engineers have always had: write code, run it, test it, fix it.

Push all human involvement to the far end and you donโ€™t have a code-review problem.

You have a missing-accountability problem.

Throwing more AI at the review stage isnโ€™t the answer either, this compounds the lack of accountability.

AI code review is useful. I use it. But I use it as another reviewer of my code.

I donโ€™t take its feedback as gospel. I review the review, decide which findings matter, and decide what remedial actions should be taken.

AI can dramatically increase how much software we build.

But if humans can no longer understand, verify and take responsibility for what is produced, the problem isnโ€™t that AI writes code too quickly.

๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ต๐˜‚๐—บ๐—ฎ๐—ป ๐—ถ๐˜€ ๐—ถ๐—ป ๐˜๐—ต๐—ฒ ๐˜„๐—ฟ๐—ผ๐—ป๐—ด ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ ๐—ถ๐—ป ๐˜๐—ต๐—ฒ ๐—น๐—ผ๐—ผ๐—ฝ.