# Should This Merge? — Itamar Friedman, Qodo

Itamar Friedman, Qodo

AI Engineer Code Summit 2026

[Talk page](https://ai.engineer/talks/u97zh6Rx8to-should-this-merge) · [Video](https://www.youtube.com/watch?v=u97zh6Rx8to)

## Should This Merge?

A code review can turn up no defects and still leave a risky change on the table. Qodo’s Itamar Friedman breaks merge risk into three questions that help teams improve a change, automate routine approvals and decide when to call a human.

### Nine pull requests, four repositories, one decision

[0:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=0s)

Imagine nine pull requests arriving across four repositories. They all belong to the same task, and you want them approved together. Coding agents can split the task and work on several parts simultaneously. The people responsible for reviewing the results now have nine decisions waiting for them.

An AI reviewer can take a first pass and flag problems in particular parts of the code. That helps. But if every pull request still waits for someone to read the findings and decide whether it can proceed, approval remains the bottleneck.

[Itamar Friedman](https://github.com/coditamar) of Qodo makes a case for keeping both units of review. A small PR is useful when something breaks and you need to identify or revert the offending change. The **work package**, the set of PRs that accomplishes the task, is useful when deciding whether the pieces can ship together.

Automating either decision requires a second kind of review. Findings tell you what the reviewer thinks is wrong. **Merge risk** asks what could go wrong in production, how bad it could get and whether you could recover. An empty list of findings leaves all three questions open. [2:06](https://www.youtube.com/watch?v=u97zh6Rx8to&t=126s)

### Separate the damage, the reach and the difficulty of reasoning about the change

[2:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=150s)

Suppose the reviewer rates a PR medium risk. What would you change to make it safer? The answer depends on how it earned that rating. Friedman asks the reviewer to estimate three things separately. [2:45](https://www.youtube.com/watch?v=u97zh6Rx8to&t=165s)

- **Potential damage.** How serious would a failure be? A mistake in a shared library that handles transactions can have much worse consequences than a mistake on the documentation site. The business importance of the affected operation belongs here.
- **Blast radius.** How far can the change reach? Trace the components and user workflows that depend on the changed behavior, including those the PR touches only indirectly. For the transaction library, this means looking beyond the library itself to its callers.
- **Behavioral complexity.** How difficult is it to work out what the new code will do? A small edit can change an algorithm, the ordering of operations or the way concurrent operations interact. Both human and AI reviewers can struggle to reason through those cases. Counting changed lines gives only a rough clue.

Recovery deserves an explicit question of its own. Is this a one-way door or a two-way door? A database migration makes the distinction concrete. You may be able to revert the commit easily and still have a very hard time returning the production database to its previous state.

Keeping the dimensions separate prevents a common confusion. A change can reach many users and do little harm if it fails. Another can reach a narrow part of the system where failure is expensive. If business importance gets folded into blast radius, the reviewer loses the ability to tell those cases apart.

![A checklist shows resolved defects beside a merge-risk gauge that remains high. Questions address reversibility, failure reach, severity and recovery.](https://ai.engineer/api/talk-essay-media/900ebbfe3f713f67dc9cc500db5cf2f0d0a28625c87c62fcc65efa42c06537da)

Every finding is crossed off, yet merge risk is still high. Before approving the change, reviewers need to know how far a failure could spread, how much damage it could do, and what recovery would take if a revert couldn’t undo it.

### Give the author enough information to lower the risk

[4:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=270s)

What would a senior reviewer write alongside a medium-risk label? In Friedman’s example, the **blast radius is high**, **behavioral complexity is medium** and **potential damage is medium**. The overall rating is **medium**. Each dimension gets a sentence explaining the judgment, with room for a short recommendation about what to do next. [5:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=300s)

The high blast radius is the detail worth investigating first in this example. Which other components could change behavior? A link to the relevant code, checks or full report lets a reviewer follow that question without making everyone read the whole analysis. The ratings illustrate a judgment. Friedman gives no fixed formula for combining them.

The same explanation can become a prompt for a coding agent. Ask whether another implementation could satisfy the same specification with less risk. In this example, a useful place to look would be whether the change really needs to affect so many callers. If the agent finds a narrower implementation, run the assessment again to see whether the risk actually fell from medium to low.

That is why risk estimation should be possible well before the final merge decision. A developer can fix a reported defect and reduce the reach of a change in the same commit. The review system should still let the developer rerun the risk assessment independently. Closing a finding tells you very little about whether the new implementation is easier to undo or understand. [5:55](https://www.youtube.com/watch?v=u97zh6Rx8to&t=355s)

### Decide how much human review each change needs

[6:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=390s)

Suppose only 30% of PRs qualify for automatic approval. Friedman would still take that deal. Those changes can move without waiting in the human review queue, and their share of completed work could grow as a result. The 30% is a hypothetical starting point. Each team chooses its own approval policy. [6:39](https://www.youtube.com/watch?v=u97zh6Rx8to&t=399s)

The interesting policy choice is what to do with the rest. For medium risk, a person might review the PR or the work package as a whole. For high risk, it may be worth going back to the specification and the implementation plan as well. If the plan itself entails a difficult recovery, another careful reading of the diff can only get you so far.

**Treat unknown risk as high risk.** If the reviewer lacks enough information to judge the change, send it for scrutiny. Then improve the information available to future reviews. That gives the team a way to expand automatic approval without quietly counting uncertainty as safety.

Apply the assessment to the work package, too. Go back to those nine PRs. If a necessary part of the package cannot proceed, some of the other changes may serve no purpose on their own. Approving them individually can leave unused code behind. Cheap code generation gives little assurance that the team can keep that drift under control.

So where does the decision to approve actually happen? The team’s policy combines the risk estimate with the status of other review checks. Risk tells the system how much judgment to ask for. A separate finding can still hold up a low-risk PR. This is what Friedman means by level four, or L4, automation here. The system knows when to call a human, and some work will continue to need one.

How risk and findings enter the approval decision
The two assessments can run independently. The team’s policy uses both. The three branches show Friedman’s suggested levels of review, with automatic approval conditional on the other checks.
- Merge risk — Assess reach, behavioral complexity and potential damage for the PR and the work package. Reassess after mitigation.
- Review findings — Check whether the team has addressed security issues and other findings.
- Team approval policy — Choose the required review and withhold approval while required checks remain unresolved.
- Green · Automatic approval — The PR can proceed without waiting for a human approver.
- Yellow · Human review — Ask a person to review the PR or the whole work package.
- Red · Broader review — Bring in human judgment and consider reopening the specification and plan.
- Merge risk → Team approval policy (Risk assessment)
- Review findings → Team approval policy (Status of findings)
- Team approval policy → Green · Automatic approval (Low risk and other conditions met)
- Team approval policy → Yellow · Human review (Medium risk)
- Team approval policy → Red · Broader review (High or unknown risk)

### Why two PRs with the same risk can get different decisions

[9:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=540s)

Why not ask the coding agent to score its own work? Friedman’s objection is strongest when the agent does both jobs in the same session. The conversation already contains assumptions that led to the implementation. A model inclined to go along with that reasoning can carry the same assumptions into its review. The software directing the agent can introduce biases of its own. That is a reason to get an independent assessment. [9:20](https://www.youtube.com/watch?v=u97zh6Rx8to&t=560s)

Once the assessment is available, keep the individual dimensions as PR labels alongside the overall rating. That lets an automation rule pick out, say, every change with a large blast radius, even when those changes have different overall ratings.

Now compare the two PRs in Friedman’s example. Both have the same overall risk and medium potential damage. Complexity differs, high versus low, and so does blast radius, large versus small. Qodo marks only the PR on the left as eligible for approval. Did the differences in those individual ratings decide it?

No. Friedman rules out that explanation without naming the particular check that separated the two PRs. One other condition a team can impose is that someone has addressed every security and code review finding. Addressing a finding can mean explaining why the reviewer is mistaken. The team needn’t accept every suggestion to account for every one.

![Two pull requests have medium overall risk but different blast radius and complexity ratings. The left example is eligible for approval, while the right example is not yet eligible.](https://ai.engineer/api/talk-essay-media/dbdbaf3645aef8966330e29bb6c65e646796d67f398bf5019985c6a6d3cd2d52)

Both PRs carry medium risk, yet only #8148 is eligible for approval. Friedman says the differences in blast radius and complexity don’t explain the split. Eligibility is reassessed each round and can also depend on whether the author addressed review findings.

### What to open when a label needs explaining

[10:59](https://www.youtube.com/watch?v=u97zh6Rx8to&t=659s)

What can a reviewer inspect before acting on those labels? In the Qodo interface Friedman demonstrates, the review gives an overall risk judgment and a brief account of blast radius, behavioral complexity and potential damage. Expanding the assessment reveals the sentence explaining each rating, with more detail available for a person or an agent to investigate.

That gives the author two different places to look when a PR stalls. If the risk is too high, open the explanation, reconsider the implementation and score it again. If the risk is acceptable and the PR still isn’t eligible, check what happened to the findings. Lowering the risk label won’t resolve an outstanding review decision.

![A pull request comment shows medium overall risk, high blast radius, medium behavioral complexity and medium potential damage. Four annotations explain triage labels, the overall rating, individual factors and expandable report sections.](https://ai.engineer/api/talk-essay-media/767cbcab2c391cda4b10677f52fa113422cd56980e918ddae8d9115256c352fe)

Reviewers can filter pull requests by overall risk or by individual factors. Qodo rates this PR medium overall and explains its large blast radius in the comment. The change reaches two capabilities. Reviewers can expand each factor or read the full report.

## Key takeaways

- A clean findings report leaves open how far a failure could spread, how hard the behavior is to reason about, how much damage it could do and whether recovery is practical.
- Explain each risk rating briefly and link to the evidence. Run the assessment independently so an author can try a safer implementation of the same specification and check whether it helped.
- Score both the PR and the work package. Reserve automatic approval for qualifying low-risk changes, involve people as the stakes rise and treat unknown risk as high.
- Keep approval eligibility separate from the risk rating. Two equally risky PRs can warrant different decisions because the policy also considers whether review findings have been addressed.

## Resources

- [Introducing Auto Approval Workflows and Agent Session Review](https://www.qodo.ai/blog/introducing-auto-approval-workflows-and-agent-session-review/) — Qodo’s product introduction to the approval workflows and agent session review capabilities behind these policy decisions.
- [Qodo cross-repository code review](https://docs.qodo.ai/governance/cross-repo-code-review) — A practical starting point for tracing the blast radius of a shared-library or API change into repositories that consume it.
- [Why Code Review Needs Its Own AI with State-of-the-Art Precision–Recall](https://www.qodo.ai/blog/why-code-review-needs-its-own-ai-with-state-of-the-art-precision-recall/) — Friedman explains why Qodo separates generation from review, how it divides defect detection among specialized agents and what precision and recall measure on the findings side of the decision.

## Slides

### Code review findings and merge risk

Every finding is crossed off, yet merge risk is still high. Before approving the change, reviewers need to know how far a failure could spread, how much damage it could do, and what recovery would take if a revert couldn’t undo it.

[2:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=120s) [A checklist shows resolved defects beside a merge-risk gauge that remains high. Questions address reversibility, failure reach, severity and recovery.](https://assets.ai.engineer/sites/aiecode2025/sha256/900ebbfe3f713f67dc9cc500db5cf2f0d0a28625c87c62fcc65efa42c06537da.webp)

TWO DIFFERENT QUESTIONS
Findings tell you what's wrong.
Not what could go wrong.

FINDINGS · DEFECTS
FIX → BETTER CODE
✓ Bug: cancellation swallowed as a fallback result
✓ Rule violation: exception handler too broad
✓ Requirements gap: provider rendering untested
✓ + 24 more critical findings

MERGE RISK · SHIPPING
DECIDE → SAFE MERGE
Can a revert undo it?
How far does a failure reach?
How bad is it, and what does recovery take?
STILL HIGH

“Resolving findings does not automatically lower Merge Risk.” — HUSSAM LAWEN, QODO

qodo

### Size isn't complexity

A one-line regex change forces reviewers to consider edge cases in every caller’s input. Renaming an import across 86 files is mechanical. The harder question for humans and AI alike is how many conditions and states interact.

[3:33](https://www.youtube.com/watch?v=u97zh6Rx8to&t=213s) [A one-line regular expression change receives a high complexity rating, while a mechanical rename across 86 files receives a low rating. Additional panels identify interacting conditions, concurrency and algorithmic invariants as complexity factors.](https://assets.ai.engineer/sites/aiecode2025/sha256/f701564455b37722eb04a5651fbe6e7a21a3915e1e3b702a49c38e48fd571128.webp)

Q4 · HOW HARD IS IT TO GET RIGHT?
Size isn't complexity.

1 LINE CHANGED
- re.match(r"^[a-z]+$", name)
+ re.match(r"^(?!-)[a-z0-9_-]+(?<!-)$", name)

Complexity    High
Lookarounds, edge cases, every caller's input.

+1,214 −1,214 · 86 FILES
+ from billing.format import fmt
- from billing.utils import fmt
+ from billing.format import fmt
- from billing.utils import fmt

Complexity    Low
A mechanical rename. Big diff, nothing to reason about.

COUNTS
Interacting conditions and states
Concurrency, ordering, retries
Subtle algorithms and invariants

DOESN'T COUNT
Lines changed, files touched
Reach (that's Q2)
What it's for (that's Q1)

The one question diff size lies about. It's also where agents slip — and reviewers skim.

qodo

### Blast radius labels for pull request triage

A one-line Terraform change to a shared VPC gets a Large blast radius label. Qodo puts the rating in the pull request list and explains why. A Small rating qualifies for auto-approval only when there are no High findings.

[4:48](https://www.youtube.com/watch?v=u97zh6Rx8to&t=288s) [Five example pull requests carry small, medium or large blast radius labels. The slide recommends explaining each label and allowing automatic approval for small changes without high-severity findings.](https://assets.ai.engineer/sites/aiecode2025/sha256/56af436b1608a564768fe73b05196578b29f59989e83b2d3e69f74cd23e11bc5.webp)

FACTOR ONE, ALREADY SHIPPED
Put the signal where triage already happens.

PULL REQUESTS · 5 OPEN
Fix typo in onboarding copy    BLAST · SMALL
Add retry to webhook dispatcher    BLAST · MEDIUM
One-line Terraform change: shared VPC    BLAST · LARGE
Bump lint config    BLAST · SMALL
Persist resolving commit on findings    BLAST · MEDIUM

→ Native label in GitHub, GitLab and Azure DevOps
→ Built on the review-effort judge
→ One label per PR. It only goes up.
→ Drives auto-approve: Small + no High findings

THE FIRST QUESTION DEVS ASKED
“Why Medium?”

A label isn't enough. Every factor ships with its reason.

qodo

### L4 automation knows when to involve a human

In Itamar Friedman’s model of L4 automation, people can stop reviewing every pull request. The system uses merge risk to decide which changes need human judgment.

[8:54](https://www.youtube.com/watch?v=u97zh6Rx8to&t=534s) [Purple closing slide explaining that L4 automation recognizes when human intervention is needed, alongside a meditating mascot.](https://assets.ai.engineer/sites/aiecode2025/sha256/bf965d33580ac06c5d21ff1e4f84f37e9fe11eed2a968293256c8b9504b6eb96.webp)

THE TAKEAWAY

L4 isn't humans watching.
It's the system knowing when to call one.

THANK YOU
QODO.AI
Itamar Friedman · Qodo

qodo
[illegible]5

### Independent assessment of merge risk

Task A’s tests pass. An independent risk agent spots three other capabilities the change could affect and flags it for human review. Friedman warns that asking the coding agent to score its own work in the same session can bias the result.

[9:27](https://www.youtube.com/watch?v=u97zh6Rx8to&t=567s) [Two panels compare a coding agent checking its own task with an independent risk agent examining wider effects. Four supporting panels discuss evaluation limitations, bias and trusted monitoring.](https://assets.ai.engineer/sites/aiecode2025/sha256/cf240910ebb190900b49168d878480475dc305b4749be91b9105b4ff0d3ef110.webp)

APPENDIX · SEPARATION OF DUTIES
The author can't grade its own merge.

CODING AGENT
Goal: finish this task
TASK A · TESTS ✓
B
C
D

Its self-check passes.
It only measures the task it is optimizing. The damage lands in capabilities it never looks at.

≠

INDEPENDENT RISK AGENT
Goal: what else could break
TASK A
B
C
D

Reach found: 3 capabilities
HIGH → HUMAN
Assesses the whole system, with no stake in the task getting merged.

SELF-GATES SEE ONE TASK
An agent that accepts its own edits by scoring the active task looks stable only because it rejects half or more of them. Drop the gate and it breaks other tasks.
CHEN ET AL. · DEEPMIND/MILA 2026

SHARED EDITS HIT UNSEEN TASKS
A rule learned for SQL tasks cut accuracy on a tool-use task by 6.8 points — before that task ever arrived.
CHEN ET AL. · DEEPMIND/MILA 2026

MODELS FAVOR THEIR OWN WORK
LLM evaluators rate their own generations higher, and the bias grows with how well they recognize them.
PANICKSSERY ET AL. · NEURIPS 2024

TRUSTED MONITORING
A separate trusted model watches the untrusted model’s code and escalates the suspicious cases to a human.
GREENBLATT ET AL[illegible]

qodo

### Pull request risk labels and approval eligibility

Both PRs carry medium risk, yet only #8148 is eligible for approval. Friedman says the differences in blast radius and complexity don’t explain the split. Eligibility is reassessed each round and can also depend on whether the author addressed review findings.

[9:56](https://www.youtube.com/watch?v=u97zh6Rx8to&t=596s) [Two pull requests have medium overall risk but different blast radius and complexity ratings. The left example is eligible for approval, while the right example is not yet eligible.](https://assets.ai.engineer/sites/aiecode2025/sha256/dbdbaf3645aef8966330e29bb6c65e646796d67f398bf5019985c6a6d3cd2d52.webp)

APPENDIX · REAL PRS · INTERNAL DOGFOODING
Risk lives where triage happens: PR labels.

PR #8148 · ENHANCEMENT · ROUTER MODEL CONFIG
Labels
Blast radius: 🔴 Large
Complexity: 🟡 Low
enhancement
Potential Damage: 🟠 Medium
Qodo: eligible for approval
Risk: Medium

One setting, two capabilities reach it. Simple change, recoverable.
RISK · MEDIUM → ELIGIBLE FOR APPROVAL

PR #8150 · BUG FIX · APPROVAL GUARDS
Labels
Blast radius: 🟡 Small
bug
Complexity: 🔴 High
Potential Damage: 🟠 Medium
Risk: Medium

Fixes narrowed the reach, but added an ordering dependency.
RISK · MEDIUM → NOT ELIGIBLE YET

Same rating, different shape. Labels re-run every review round; eligibility is re-earned each time. The comment ex[illegible]y → A3

qodo

### Explanations behind merge risk labels

Reviewers can filter pull requests by overall risk or by individual factors. Qodo rates this PR medium overall and explains its large blast radius in the comment. The change reaches two capabilities. Reviewers can expand each factor or read the full report.

[11:13](https://www.youtube.com/watch?v=u97zh6Rx8to&t=673s) [A pull request comment shows medium overall risk, high blast radius, medium behavioral complexity and medium potential damage. Four annotations explain triage labels, the overall rating, individual factors and expandable report sections.](https://assets.ai.engineer/sites/aiecode2025/sha256/767cbcab2c391cda4b10677f52fa113422cd56980e918ddae8d9115256c352fe.webp)

APPENDIX · EXPLAINABILITY · INTERNAL DOGFOODING
Every label comes with its reason.

Merge Risk Assessment
Medium risk

▸ Blast radius 🔴 High 💥 2 capabilities
▸ Behavioral complexity 🟠 Medium 🧩 Compatibility cases, Interacting branches
▸ Potential damage 🟠 Medium 🩹 Recoverable

▸ Risk overview
▸ Risk mitigation
▸ Risk analysis report

1 Labels for triage
Overall risk and each factor land as PR labels: PR lists and workflows can filter on them.

2 One overall rating
Medium risk, at a glance.

3 Three factors, each with a reason
Blast radius High · 2 capabilities. Complexity Medium · interacting branches. Damage Medium · recoverable.

4 Depth on demand
Overview, mitigation and the full report stay folded.

SOURCE · CODIUM-AI/PR-AGENT-PRO[illegible]
RISK AGENT · HUSSAM LAWEN
qodo

Interface text:
qodo-pentest-1 Bot added Risk: Pending Risk: Medium (partial) Risk: 🟠 Medium potential damage Risk: 🟠 Medium complexity 🔴 Large blast radius and removed 🔴 Large blast radius Risk: Pending labels 2 weeks ago
qodo-pentest-1 Bot commented 2 weeks ago
qodo

## Full transcript

[0:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=0s) 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 SLAs are getting worse. Now, the first thing you're all probably doing is injecting or using an AI-empowered code

[0:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=30s) review tool. That's helpful. Most AI code review tools, and Qodo 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 gonna talk about a killer feature for AI: Should This PR Merge? It's not only about telling what are

[1:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=60s) the findings that we can act on. Rather, if it's okay to actually merge. And what's important in order to get there is understanding the merge risk. So we're gonna talk about how to teach AI code review when to stop and stop the PR and not approve it, where when it can auto-approve, where it needs to call a human for, like high-level judgment or, uh, speciality. Okay, so one of the things we talked about, and uh, I guess like we don't need additional

[1:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=90s) motivation, but it's still important, is that these, 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 is some usefulness in having the PR unit. For example, if you need to reverse, recover, uh, you need to blame a small change that made some issue. So that's why PR are still useful so

[2:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=120s) 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, uh, 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 question. For example, can I revert? Can I undo what I just pushed? Um, what are the

[2:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=150s) possible failure modes? Uh, 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 [unclear],” “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 in a shared library that is in charge of transactions, it's probably worse than something on the, your documentation site,

[3:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=180s) 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, uh, is it a one-way door or a two-way door? Can we go back and return back? Or once we push this, uh, code to production, we cannot go back. One of... A great example, although there are many, is migration of

[3:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=210s) databases that is usually really hard to go back from. Now, 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 is correlation, but you can have like some, uh, change, algorithm change or concurrency, uh, change, ordering, uh, change, and things like that, um, that are really complex. And the problem is that not only human could, you know, have higher chance to

[4:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=240s) 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 gonna summarize into 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

[4:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=270s) 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. 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

[5:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=300s) want is like a senior reviewer level of description. It means not too much, not too little, uh, concise. So here's an example of how you can do it. Uh, 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 or [unclear] 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,

[5:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=330s) 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, um, for, for this estimation, okay? Now, once you have this risk, I suggest it's not a one-time thing that you run by the end of the review and decide if to merge or

[6:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=360s) not. Basically, what you wanna do is being able to mitigate and act upon, and it 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 you also have it independent because you want to

[6:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=390s) have, uh, the risk being mitigated if possible and then re-estimated, uh, 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 wanna have three lanes. In case of low risk, then you want to... Even if it's just thirty percent, by the way, you wanna auto-approve. That's amazing because that lane of thirty percent have really high throughput, right? Because it's

[7:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=420s) auto-approved and you can make it more than thirty percent because of it, uh, eventually on the overall throughput. And then, uh, if you think about, uh, additional lane, I actually suggest you divide it 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, or the work

[7:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=450s) package, maybe you want to review also the specification, the plans and, and so on. Okay? Uh, 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 in the yellow and as much as possible less in the red. Although I don't think like in the near future it will be

[8:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=480s) zero, of course. So kind of summarizing, orthogonal metrics is better than one number because you can act on 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 wanna score the PR, but you also wanna score the work package. You don't want PRs that are not gonna be used because there are other parts of the PRs are

[8:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=510s) gonna be wasted. Don't tell me that it's easy these days to change code, et cetera. Let's talk about in 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 composable independent because you might want to rerun it quite a few times. So basically, uh, as you are on your process to automate your software developer-

[9:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=540s) development and want to reach L4 automation, the idea that humans are not watching and making all the little annoying, um, judgment points like reviewing every PR. 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,

[9:30](https://www.youtube.com/watch?v=u97zh6Rx8to&t=570s) you know, use a coding agent to score themself, provide their 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 [unclear]. Okay? Uh, I suggest you, you look for some material and you'll find. The second thing is like how these labels could

[10:00](https://www.youtube.com/watch?v=u97zh6Rx8to&t=600s) look like. I got this question a few times and, uh, I suggest not only to put the label of the risk, but actually putting the, the labels, um, that, that are the, the independent orthogonal metrics. It really helps with different type of automation. So this is how it could look like. And then the, uh, another question is why is the left side, the left example, got Qodo eligible for approval and the right side did not? Yeah, the, the orthogonal, the risk is the same, but orthogonal are different. Is it because of that? The

[10:29](https://www.youtube.com/watch?v=u97zh6Rx8to&t=629s) 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, uh, metrics out of the three. Um, but it's not, it's, it's not because of these differences because w-- I wanna 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

[10:59](https://www.youtube.com/watch?v=u97zh6Rx8to&t=659s) 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 Qodo. Everything I just presented so far you can get from Qodo. So this is how Qodo looks like. It's, it's one, uh, user interface. We, we have a few. Basically, Qodo 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

[11:29](https://www.youtube.com/watch?v=u97zh6Rx8to&t=689s) 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's more information that you can get and that helps humans or agents if they wanna dig into.
