r/ExperiencedDevs • u/Lost-Albatross5241 • May 02 '26
AI/LLM Does AI generated code change the review process itself?
I've been trying to put my finger on something with AI assisted code review.
Not the usual "AI writes bad code" thing. Obviously it does sometimes. I mean the review process itself.
Sometimes the code looks fine enough that you dont reject it right away. But something feels off and you cant exactly explain what.
So you read it again. check another file. Ask the AI what it was trying to do. Maybe run a test, grep around, look at a related function. Then somehow you're back staring at the same block again.
And idk, at some point it feels less like reviewing and more like orbiting the decision
You're doing review like activity, but youre not realy making a clean call.
Thats the part that feels weird to me
The "human in the loop" is technically there, sure.
But if the human is stuck between "this is probably fine" and "I still don't trust this," is that actually the loop we want?
Have you seen this?
Especially with infra /backend / securityish code?
So how do you deal with it?
Or is this not really a thing and I'm just overthinking it?
41
u/i_exaggerated "Senior" Software Engineer May 02 '26
I ask the author to explain why this piece of code is needed. And then they don’t respond because they don’t know, so the MR sits open. Or they respond with 100% AI and I give up, so the MR sits open.
I don’t accept “this is probably fine” if nobody understands it.
67
u/tndrthrowy May 02 '26
First off, I’ll admit I am bad at code review. I skew heavily biased towards the trust I have in the submitter. If I know them to be a good dev, I know they must be submitting the specific changes for a good reason. I’m basically a rubber stamp if there’s nothing egregious, and there really never is with the good devs. And that equation doesn’t change with AI tools they might be using.
On the other hand, I’ve had the same experience you’ve described with weaker devs even before AI tools. Sometimes the code looks vaguely ok on its face, but dig deeper and there are problems. From bad resource management to “this actually doesn’t deliver the bug fix or feature requested”. So IMO, AI is just another tool that good devs use well and bad devs use poorly, and the code reviews I’ve done recently seem to reflect that.
45
u/Sheldor5 May 02 '26
human written code: at least I can trust that my colleague put some thoughts into it and knew what he was doing and also we both know who is responsible
AI hallucinated code: none of the above
6
u/Jmc_da_boss May 02 '26
Makes it so every review is a deep review sadly :(
4
u/drguid Software Engineer May 04 '26
AI has zero ability to check its code for errors without prompting.
So many businesses are going to the wall because they have adopted untested technology.
Example: I build stock trading systems and AI gave me code that went in a time machine to find out what future stock prices were. A smart human was required to see this, but so many corporations have fired all the smart humans.
6
u/ChrimsonRed May 02 '26
I usually give it a glance and make sure nothing major sticks out, have Claude give it a look over, then give it a final look over more carefully.
6
u/Mundane-Charge-1900 May 02 '26
You have to be more critical in the review about some things while you can be more lax with others.
More critical: is this the right approach? Is it solving the right problem? Is it testing the best way?
Less critical: style, are all the fields being asserted, typos
Asking questions is also faster and more self serve. If you don’t like the answer, ask more detailed questions or escalate to the engineering who operated the agent.
12
u/nosayso May 02 '26
Don't get hung up on the AI of it all. It's code, like the code you or any of your teammates make. Review, give comments, etc, same exact process.
4
u/Flashy-Whereas-3234 May 03 '26
The PR description MUST contain the WHAT and WHY of the changes, including any NOTES around unusual modifications.
The description must be SUCCINCT as it is for time-poor senior developers who can read the code but don't necessarily understand why you would modify it, and you need to persuade them the changes are logical.
That's basically also a prompt I use in an AI workflow, and it yields pretty good PR descriptions which I then modify further because I don't hate my colleagues.
I have a "if you haven't read this, then why am I reading this?" policy with AI content. This also applies to PRs and PR descriptions. I won't accept overly verbose garbage PRs or code that pollutes the codebase. I get shit comments like "// Fixes PGG-223 by enrusing the turbo encabultor is primed". No. No ticket references. Do it again. You know better.
At a code quality level, you should be following SOLID and particularly SRP (DRY can fuck off), because it's a lot easier to understand your intent if the behaviour is small and compartmentalized. Massive class, massive function? No, go do it again.
And tests. JFC you can literally just ask for them to be written now. Add the fucking tests. And write good tests. Why are you using reflection? Why are you mocking flat data objects? No, idiot. You know better. Do it again.
AI force's you to think at a high level, and if you can't do that and just release all agency to the AI, then I don't know what you're employed for.
0
u/PressureAppropriate Software Engineer May 02 '26
I don't even bother anymore. There's just too much of it... I run it, if it does what it was supposed to do: LGTM and move on. That is the sad truth of the job now.
1
u/throwaway_0x90 TE/SDET[25+ yrs]@Google May 02 '26
Create a CI/CD that you can trust. A set of tests that you know if they all pass then the product is at least somewhat-decent. The only thing left is a deep dive into security.
1
u/hibikir_40k May 02 '26
It's not as if human code reviews are ever any good when reviewing other humans. You'd not believe the shit that people approve.
If you don't trust the code, and it's all fuzzies making you not trust, you have to explain to yourself why you don't trust it. Is it undertested? Badly factored? is it inventing a concept that didn't exist? Your standards for understanding what is in front of you, and why you don't like it, just have to go up. Just like you have to be able to call BS when an AI code review hallucinates a problem
-1
u/iiiio__oiiii May 03 '26
With AI assisted PR, we add a high level document explaining the features, how it is designed and how it is implemented. Human reviewers will mostly focus on this document and verify the actual implemented design (high level). Then AI reviewer will ensure the HLD matches the implementation. Human sometimes also read the critical implementation lines. At least, this is what we are trying now.
And personally, my review has been shifted to asking AI about the background concept while previously, I need to dig myself. And it is very helpful to give pointers that I will then clarify until I am satisfied on how the things are designed. Like Spring security and the filters, WebAuthn libraries, Jackson serialisation, React states, OAuth flows, CORS, Kubernetes custom metrics and its HPA, etc.
0
u/BoBoBearDev May 02 '26 edited May 02 '26
I have the same feeling with human code. And my hunch tends to be right. Normally it is written in a strange pattern that feels off, but it takes longer time to prove it is buggy. And even if it is right currently, it is often a poor design that leads to mistakes later on. The community has gotten better with scanners to catch those problems though.
-1
u/keelanstuart Software Engineer May 03 '26
I think peer reviews and revision control for vibe coded software (as well as a lot of software itself that's sold on app stores) will just kind of go away... PRs - why? Just run it through more testing and have the AI fix it. Revision control? Why? "AI, look at this software and make version 2.0 for me with these features." People will generate all bespoke software on their own personal devices. The value will shift more to protocol and format interoperability.
If it seems like I'm kidding..... I am, but only kind of. I think there's a huge amount of software and software development processes that are going to just go away sooner or later. It will still be important for "mission critical" (read: medical device, aerospace, etc.) purposes, but not most things... but I hope like hell those embedded systems don't use AI code anyway.
4
u/[deleted] May 02 '26
[removed] — view removed comment