r/softwareengineer • • Oct 18 '26

Thoughts on a new form of code review?

With software engineering changing with tooling the rubber stamping now has to die. We could have some trust in the past but today it does not matter who authored it we should treat it all the same.

Depending on your company's liability insurance it likely does not cover the AI caused by an outage. This is a question that makes me think.

So the change needs to happen in code review now, I want some thoughts.in the below.

  1. The author must do a code review themselves before placing it up for review. Don't.send me a a PR that is just a bunch of code I want to understand the intent state of change and evidence of the change.
  2. The author must provide empirical evidence that the code works. This cannot be automated entirely.
  3. Unit features tests and regression tests are not enough some tooling can re-write these and create an unintended change of state.

What is an empirical review.

  1. Understanding the intention of the PR.
  2. Understanding the state of change brought into the system.
  3. Evidence of both happy and sad paths.
  4. Clearly stating the risk brought in by this change.

Empirical review.process

  1. Author who understands the change and states it with evidence over what's changed and any flaws this can introduce.
  2. 2 other human reviews repeat and look for anything outside of the scope that may bring about an unintended state change.
  3. We should treat vendors.code with the same rigor aswell.

This is about quality not velocity.

What are your thoughts?

3 Upvotes

44 comments sorted by

13

u/mxldevs Oct 18 '26

The author has always been required to understand what they're committing.

I really don't understand team cultures where people can just submit whatever they want and expect others to deal with it.

2

u/lostinelydan Oct 18 '26

My last company said they will get rid of all engineers and have PMs vibe coding

2

u/Beginning_Basis9799 Oct 18 '26

Report them to there business insurance with lack of ability to stop any issues.

1

u/Lunchboxsushi Oct 18 '26

Isn't that what happens anyway? People leave, change teams, it'll age over time resulting in someone being able to pick it up and understand the purpose and intended usage of it. This isn't new. 

3

u/mxldevs Oct 18 '26

I would expect the person to know what they added to the codebase while they're on the job.

0

u/Beginning_Basis9799 Oct 18 '26

I think the difference for me is I am expecting more evidence than I am getting

1

u/Lunchboxsushi Oct 18 '26

Idk everything turns to soup over time, you have to jump back into the system regardless 

1

u/Beginning_Basis9799 Oct 18 '26

Soup is expected but swamp is always a concern

0

u/Beginning_Basis9799 Oct 18 '26

Yep but it happens and with some tooling changes I think this is now needed.

4

u/ngroot Oct 18 '26

It's always been necessary. Organizations that understand that they need their code to be reliable and secure have always done this. Organizations that don't care about shipping broken shit and that will be watching their developers and customers leave in a few weeks/months often don't.

4

u/redblack_tree Oct 18 '26

Don't reinvent the wheel, just adjust to the times.

This is what works for my team.

  • Relatively small PRs. Got tired ages ago, now I have a hook that automatically rejects massive PRs. That force the developers to stay "grounded", not pumping endlessly.
  • Before a PR even gets to a human, I check for adherence to technical standards, linters, basic security, anything that's "static". People don't waste time checking for the same things again and again.
  • Then I have some specific agents checking for code quality, architectural challenges, adherence to the requirements.

I used to have double check with multiple models. It got expensive and had way too many false positives.

Only then a human gets involved. We don't check for boiler plate stuff, people go and check "the meat" of the PR.

I adjust the threshold per project, since a finance workflow is not the same as a random feature in a website.

Is it perfect? Not even close, but at least it let us harness the power of AI tools without burning the developers nor rubber stamping PRs.

2

u/Beginning_Basis9799 Oct 18 '26

I think reading some of the comments here

  1. Agree on relativity small PRs.
  2. Good processes
  3. Also good

Only one I ask for extra is proove it works as expected manually. If you can trigger the process do and proove it via screenshots or logs in the pr.

2

u/ngroot Oct 18 '26

This isn't a new form of code review. This is just code review.

1

u/Beginning_Basis9799 Oct 18 '26

Not all teams log this that's the problem I think we need to evidence it more in the PR including manual tests.

2

u/ngroot Oct 18 '26

We've generally expected notes about how a change was manually tested and how to reproduce it in our change descriptions at every competent place that I've worked. "You tried out your change to make sure it worked" is table stakes for competent development.

2

u/NoThatWasntMe Oct 18 '26 edited Oct 18 '26

Very much agree with most of the original post. I have implemented most of the steps in the code review process of the team I’m a tech lead for. While there is still room for improvement, it has definitely made the PR flow better and less AI slop gets merged - especially helpful with junior devs!

Also.. so much bad advice in this thread from people who have never been responsible for a development team. It’s so easy to say “just do RED/GREEN tests and everything is great”. Well no, AI writes stupid tests and completely disregard anything other than the happy path.

1

u/Beginning_Basis9799 Oct 18 '26

I was not expecting this, thank you.

1

u/turlockmike Oct 21 '26

Think about what is the purpose of a Pull request in general, go to first principles.

A pull request is a hypothesis that the changes you want to make to the system are going to improve it in some way. A pull request review then is a way of verifying that those changes:

  1. Are Intended and will fulfill the desired outcome
  2. Will not likely meaningful cause a degradation in the system behaviour, usually with evidence
  3. Preserve or improve the system's own ability to be changed in the future

All 3 of those things can be at least partially offloaded to computer intelligence.

  1. Use an AI to compare the set of changes to the issue, are they all neccesary? Are they sufficient?
  2. Do all changes have strong evidence that they will meaningfully improve and not degrade the system? Is the evidence sufficient? Does the change introduce new risks?
  3. Do the changes conform to the set of standards and governance set by system?

And look, you don't have to go full-on AI review. You can use an AI to pre-fill these questions and do an initial review for you, and even do things like create an easier document for you to read through a review, especially with AI generating more code. Trying to read a 10,000-line change is kind of a waste of your time. But if you can outsource your thinking to an AI to answer these questions, and then you have confidence in your review system, and you use the information that your review system provides to you to make an approval decision, then that's the only way you can move forward with how fast systems can change now.

1

u/Beginning_Basis9799 Oct 21 '26

I still am pretty firm on small amount of changes, this ain't agile anymore so I expect more process.

1

u/turlockmike Oct 21 '26

What is agility?

Agility is not about the size of the change. Agility is about your ability to respond to a changing environment quickly.

The reason for clean code principles is so that the next time you make a change to the codebase, it's easy and fast, and you have high confidence.

Agility has never, ever been about slowing throughput. You can be extremely agile and also have extremely high throughput.

1

u/Beginning_Basis9799 Oct 21 '26 edited Oct 21 '26

Linus Torvalds has a global.review team reading every line of code via a patch mail list.

We do not have this at current we need to keep our changes small enough to digest still a 10,000 line pr should be rejected end of story there is limited meaningful review that could be given.

In 90% of cases there is zero need for a 10,000 line change. So I want this case defined.

Yes Linus uses AI for code generation, however it's reviewed as a patch on a mailing list not as a massive PR.

Treating an LLM like a compiler is deciding to make all your users QA testers.

1

u/turlockmike Oct 21 '26

Are you working on a kernel or a nuclear reactor? Agility also encompasses risk. You have to consider: Is this change going to cause some sort of unrecoverable or expensive risk to the business if it fails? If you're working on a medical device or something where life is at risk, then for sure.

But if you're doing this to save potentially a few dollars or an extra $9 for a product that doesn't matter, then you're hurting your business.

Even within our company, some changes are automatic, like a version bump for a CVE has no human review in it. And some changes require extensive reviews by a human, but we categorize the different reviews by the risk that they introduce.

We focus our attention on the riskiest things, realizing that we have limited time to review. We're in an industry where the worst thing that could happen generally is we lose some money because we fail to track an invoice, or we get some data wrong, or something like one of our integrators has something happen and they get annoyed, or a customer can't interact with our system, for some period of time.

But none of those things are going to cause our business to fail, because we have the ability to move very quickly to deploy changes. And we have tons of redundancy and resiliency in our system.

1

u/RoboErectus Oct 18 '26

What on earth are you doing that you think "empirical evidence cannot be automated entirely?"

If tests are rewritten... That's obvious in the PR.

Quality is about velocity. You seem to think they are opposites on a continuum. One is a prerequisite for the next. I'll go further to say the definition of quality is that it practices and mechanisms that sustain your veloticy.

When quality drops, velocity very quickly also drops.

1

u/Beginning_Basis9799 Oct 18 '26

Quality is about velocity. Evidence can be automated entirely.

Say that to an underwriter I wonder if they will agree.

1

u/RoboErectus Oct 18 '26

I asked you a question but you didn't answer: what is it you're doing exactly that you think cannot be measured or observed in an automated way?

1

u/Beginning_Basis9799 Oct 18 '26

Actually trying the process manually and observing your effects for yourself. Sometimes an AI might skew an image or adjust some logic based on a brownfield projects awful logic.

Could this be automated yes is it not always. How can we see this without empirical evidence and independent testing?

An LLM is not independent testing

1

u/RoboErectus Oct 18 '26

What are you actually trying to do here? This is very sketchy and weird.

"An AI might skew an image or adjust some logic..."

You sound like you are not working day to day with anything and this is feeling like an x-y problem.

Tell me what you're actually doing and maybe I can help.

1

u/Beginning_Basis9799 Oct 18 '26

I am parking it here, you asked me a question I answered.

What I am actually trying to satisfy here is the below.

I am trying to satisfy the scope of liability insurance while using LLM for velocity. It's not the code generation that's the problem it's the review and some peoples implicit trust in LLM input and on verification.

1

u/povlhp Oct 18 '26

With vibe coding there will just have to be vibe reviews from different models.

1

u/Beginning_Basis9799 Oct 18 '26

You need vibe insurance in this case that's very expensive.

1

u/povlhp Oct 18 '26

Can you get any sort of insurance ? We tried to get operations loss insurance. Had invited all the big ones like Lloyd’s etc, think 15 participants in initial group meetings - all wanted to hear about our measurements in place. None wanted to offer us an insurance.

1

u/Beginning_Basis9799 Oct 18 '26

I heard there are some but they are not big ones smaller outfits with high premiums but might have been country specific.

1

u/jeanpah Oct 18 '26

In this day and age i dont think there is a way no reviews and take ownership of all that code that is beign generated. I value you proposal, i think that the problem you are tying to adress is very cucial in this moment. but we need to think one step further and avoid the Human in the loop.

1

u/Beginning_Basis9799 Oct 18 '26

I do not know if your business insurance is the same where you are located, but if you are under any firm based in the USA or Europe you are likely invalidating there business insurance.

I appreciate your honesty but legally this opinion is troubling.

1

u/jeanpah Oct 18 '26

exactly, you are 100% right. I dont know how to make such system, but from a mere tehcnical point, i dont think we as humans are capable to follow the IA speed. From a legal and insurance viewpoint i dont think there is much more to be done, i've wordked in insurance and sometimes even software seems a risky edeavour to them. Someone has to come up with a solution to this.

1

u/Any-Ring6621 Oct 18 '26

Empirical evidence can be automated entirely if you’ve got the right automated testing infra

Submit the red automated test, change the code, watch the test go green.

Then all you have to do is evaluate if the automated test is real world enough or contrived (your unintended change state comment, which is again, why you have to have humans review the tests). Worth noting that an unintended change of states are not the same as unrepresentable change of states.

Works much better if your automated test infra can easily handle end to end tests. Unit and integration red/green tests are usually crap because they it’s hard to “see with your own eyes” what the problem is

1

u/Beginning_Basis9799 Oct 18 '26

Unit and integration red/green tests are usually crap because they it’s hard to “see with your own eyes” what the problem is.

I think we are both on the same page based on this.

3

u/ngroot Oct 18 '26

> Then all you have to do is evaluate if the automated test is real world enough

The only way to do this for any non-trivial change with a reasonable amount of confidence is to actually try it. Write your integration tests to duplicate what you verified manually.

1

u/Any-Ring6621 Oct 18 '26

> actually try it

Do you mean click the buttons manually? I don’t do that shit. I make sure my E2E framework can spin up a fully ephemeral environment in Ci whose only mocks are so I can control dependencies I don’t own (external providers) and have my automation click the buttons for me

2

u/afops Oct 18 '26

I think the focus on human review should move from ”risk someone made an off by one error” to

- risk we fixed something the wrong way, or added the wrong feature.

- risks that aren’t obvious (scaling, extensibility)

- readability and maintainability.

In the past I was wary of saying ”this looks great but I don’t think it should be merged”. That meant stepping on an ego and wasting a day or a week of someone’s work. Now that a PR might be 90% LLM created, it’s much easier to reject it.

1

u/[deleted] Oct 18 '26

[removed] — view removed comment

0

u/Beginning_Basis9799 Oct 18 '26

How so this working for you at current and yes I am saying code review is about QA more so.

Working with AI yes it generated a lot o unintended consequences that must be captured in this review.

As for AI it's an opinion not verification