← Back
AI Engineer December 4, 2026 11m

Should This Merge? — Itamar Friedman, Qodo

Not yet indexed — Search & Ask will be available once this episode finishes processing.

Read full transcript 10 segments
  1. We're probably all playing this game. Should this PR merge? Thanks to all the AI code generation tools out there, we can now take a task, break it down really quickly to many subtasks, act on each one of them quickly, but even simultaneously. Then it means that we have a pile of PRs that we need to deal with and review. And the SLA are getting worse. Now, the first thing you're all probably doing is injecting or using an AI empowered code review tool. That's helpful. Most AI code review tools, and Coder is one of them, is providing findings, telling us what's wrong like in different part of the code. That's great, but we're still having humans needing to review that, and that's not good. We have to automate this bottleneck. So in this call, I'm going to talk about a killer feature for AI. Should this PR merge? It's not only about telling what are the findings that we can act on, rather if it's okay to actually merge.

  2. And what's important in order to get there is understanding the merge risk. So we're going to talk about how to teach AI code review, when to stop and stop the PR and not approve it or when it can auto approve, where it needs to call a human for like high level judgment or speciality. Okay, so one of the things we talked about, and I guess like we don't need additional motivation, but it's still important, is that this these days like PRs are not getting arriving one by one. There might be arriving nine of them in four different repos, and we want them all to be approved all all at once. At the same time, there's some usefulness in having the PR unit. For example, if you need to reverse, recover, you need to blame small change that made some issue. So that why the PR are still useful so far. Now we want to automate both the PR process, the PR approval, and the work package approval. The first thing is that AI code review tools help us with findings, tell us what's wrong with certain parts of of the change that we're we're doing. But in order to automate, we also need to know what can go wrong. These are different questions.

  3. For example, can I revert? Can I undo what I just pushed? Um what are the possible failure modes? Is it recoverable? How bad it will be if it goes wrong? And so on. So there are a few question we want to ask because we don't want just like review merge risk two, merge risk medium. We need to break it down in order to be able to act upon. So the first question we want to ask, what's the potential damage? For example, if you're making a change change in a shared library that's in charge of transaction, it's probably worse than something on the your documentation side, which is important as well, of course, but it's not the same damage. The second question you want to ask yourself, what is the blast radius? Like what's the reach? What are the user different user stories or different component that this change might impact implicitly? And then we want to understand is it a one-way door or a two-way door? Can we go back and return back or once we push this code to production, we cannot go back? One of great example, although there are many, is migration of databases that is usually really hard to go back from.

  4. Now the the last thing I want you to think about is complexity. It's important. By the way, size doesn't mean complexity. Of course, there's correlation, but you can have like some change, algorithm change or concurrency change, ordering change and things like that that are really complex. And the problem is that not only human could, you know, have higher chance to have issues understanding it, but also AI. So you might want to treat differently the the PR high complexity or or low complexity. So kind of recap and I'm going to summarize and introduce three topics. Blast radius, behavioral complexity, and potential damage. These three are orthogonal and that's why they're each one of them is useful. Considering if you especially if you consider blast radius as the reach and not, you know, business criticality, I put that in the potential damage. So these are the three things you want to teach your AI code review tool to be able to estimate in high accuracy in order to automate the pull request process, pull request review process.

  5. So once you have these, okay, the first thing that people think about is putting them in the labels for for triage. I think it's important, but it's not enough. It doesn't like enable you enough information to to act on it. So what you want is like a senior reviewer level of description. It means not too much, not too little, concise. So here's an example of how you can do it. Merge risk overall medium because blast radius is high, complexity is medium, and potential damage is medium. And here's a little like one sentence of information for each and maybe some summary summary or property or what to do next. I do feel it's useful if you have more information that you can link to, like a full report, supporting code and checks, whatever, which is which is to to justify this. And also very useful to have some prompt for an agent if it wants to, you know, try to make a change that moves the merge risk from medium to low. We'll talk about it. That's like one of the major use cases for for for this estimation, okay?

  6. Now once you have this risk, I suggest it's not a one-time thing that you run but the end of the review and decide of to merge or not. Basically what you want to do is being able to mitigate and act upon. And it's also helps you to change the mindset of your developers. If you can reach the same specification, especially if it's exactly the same, but even similar specification, but with lower risk, that's exactly what you want to do in order to automate. So basically you want this estimation to be independent to the findings review. You can have them in one commit if you don't want too many commits, but I suggest to also have it independent because you want to have the risk being mitigated if possible and then re-estimated again. And that's like a separate unit. Now, eventually when you have that, this is the framework I suggest to think about. You're probably not going to automate your entire software, but you want to have three lanes. In case of low risk, then you want to even if it's just 30% by the way, you want to auto approve.

  7. That's amazing because that lane of 30% have really high throughput, right? Because it's auto approved and you can make it more than 30% because of it eventually on the overall throughput. And then if you think about additional lane actually suggest to divide into two, medium and high. And why? Because you might want to have different policies. If it's medium, maybe you want a human reviewer on the PR or on the work package as a whole. But if it's high, not only you want a reviewer on on the PR, maybe on the work package, maybe you want to review also the specification, the plans and and so on. Okay? So you choose your policy, but these are the three lanes. And this is the setup that will actually help you to push towards software factory L4 level four of automation because now that when you have this, basically what you're trying to do is have as many PRs in the green lane and then less than the yellow and as much as possible less than the red.

  8. Although I don't think like in the near future it will be zero of course. So kind of summarizing orthogonal metrics is better than one number because you can action and explain. You don't only want the label, you want explanation. Do not allow unknown. That's high risk and improve your software factory and all the signals you can bring to make it high accuracy signal. You want to score the PR, but you also want to score the work package. You don't want PRs that are not going to be used because there are other parts of the PRs are going to be wasted. Don't tell me that it's easy these days to change code, etc. Let's talk about a different talk about software drift and if it is really easy to to fight that drift with with AI. And then eventually I'm suggesting to make this signal the the ultimate signal of merge risk as a composable independent because you might want to re run it quite a few times. So basically as you are on your process to automate your software developer development and want to reach L4 automation, the idea is that humans are not watching and making all the little annoying judgment points like reviewing every PR.

  9. It's about system that knows when to call a human, okay? And that's exactly what we talked about today and why merge risk is a is a killer signal, the ultimate signal for for that. Okay, the talk ended, but I do have some appendix for those who want to hear a bit more. So first of all, one thing I'm hearing, why not, you know, use a coding agent to score himself provider own merge risk. So there's plenty of papers and tweets out there. Basically just one example, if you do that in the same session, then there is bias there inside the session itself that agents and LLMs love to comply with. And even the harness itself has some bias that you want to counter counter part, okay? I suggest you you look for some material and you will find. The second thing is like how these labels could look like. I got this question a few times and I suggest not only to put the label of the risk, but actually putting the the labels that that are the the independent orthogonal metrics it really helps with different type of automation. So this how it could look like. And then the another question is why is the left side the left example got Coto eligible for approval and the right side did not.

  10. Yeah the the orthogonal the risk is the same but orthogonal are different. Is it because of that? The spoiler no. So indeed complexity is high versus low, blast radius large versus small um but potential damage is medium and I think it's one of the most important by the way by the way like metrics out of the three. Um but it's not it's it's not because of these differences because I want to make sure that do not mistake the fact that I think that merge risk is a very important signal with the fact that there should be other signals. For example were all the rest of the finding being addressed. Doesn't mean like agreeing with everything but being addressed. Security, AI code review uh findings and and so on. This is by the way like the kind of like findings and merge risk information that you can get from Coto. Everything I presented so far you can get from Coto. So this is how Coto looks like. It's it's one uh user interface. We we have a few. Basically Coto will give you like the general risk and this is in addition to the label of course and and give you like high level really high level explanation about the the blast radius, behavioral complexity, potential damage. If you open it up there will be that one sentence that I I talked about and even there is more information that you can get and that helps humans or agents if they want to dig into.

No summary available yet.

View original episode ↗