---
title: "Discussion on \"Designing an AI code reviewer that cannot overrule your tests\" | Hashnode"
description: "Discussion on \"Designing an AI code reviewer that cannot overrule your tests\". The merge verdict should come from a policy, not from the model. Here is how CodeGuard AI decides."
url: "https://hashnode.com/posts/designing-an-ai-code-reviewer-that-cannot-overrule-your-tests/6b092c2fbb6079a97439bb8b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Designing an AI code reviewer that cannot overrule your tests](https://isabitech.hashnode.dev/designing-an-ai-code-reviewer-that-cannot-overrule-your-tests?utm_source=hashnode&utm_medium=feed)

The merge verdict should come from a policy, not from the model. Here is how CodeGuard AI decides.

3d ago · 4 min read · isabitech.hashnode.dev  
Read the article

-   [#software-architecture](https://hashnode.com/tag/software-architecture)
-   [#ai](https://hashnode.com/tag/ai)
-   [#java](https://hashnode.com/tag/java)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#code-review](https://hashnode.com/tag/code-review)
-   [#github](https://hashnode.com/tag/github)

## Written by

[ISabiTech](https://hashnode.com/@isabitech07)

@isabitech07 · India

  
[View profile](https://hashnode.com/@isabitech07)

Building and sharing practical developer tools, AI engineering projects, and Java/Spring Boot insights.

## Responses 3

Markdown supported · ⌘↵ to post

[Parsa Mohammadi](https://hashnode.com/@tomosu)

[3d ago](https://hashnode.com/posts/designing-an-ai-code-reviewer-that-cannot-overrule-your-tests/6b092c2fbb6079a97439bb8b/comment/6b09907855126ec441d4e8ca)

the _"new in this PR or already there"_ label is the most underrated part, it's what stops a team learning to ignore red builds.

to the closing question, trust comes from two things

-   blocking findings that line up with real breakages over a few weeks in **advisory mode**, before anything blocks
-   saying something about the callers the diff never touched, since that's where the expensive failures usually sit

same reason Tomosu keeps its merge verdict as a **Production Reliability Index** against a threshold the team sets, not the model's call. a model and a rule engine both speaking only works if the reader knows which one decides.

[ISabiTech](https://hashnode.com/@isabitech07)

[3d ago](https://hashnode.com/posts/designing-an-ai-code-reviewer-that-cannot-overrule-your-tests/6b092c2fbb6079a97439bb8b/comment/6b09907855126ec441d4e8ca#reply-6b0994f5b7d5091d5f8fcbaa)

Thanks Parsa, that's useful, and I agree on the "new or already there" label. Without it, a red build becomes background noise.

Your two points are the right ones. Today you can run the policy with blocking switched off, or set test failures to WARN instead of BLOCK, so the first weeks can be advisory. What we don't have yet is the part that makes that period useful: logging what would have blocked and checking it against what actually broke. That's on our list now.

Callers the diff never touched are a real gap for us. Our impact analysis is static and name-based, so it can miss indirect callers. I'd rather say that than oversell it.

And I agree with the last line. The reader has to know which part decides. That's why the verdict comes from the policy and the AI only supplies findings.

[Parsa Mohammadi](https://hashnode.com/@tomosu)

[3d ago](https://hashnode.com/posts/designing-an-ai-code-reviewer-that-cannot-overrule-your-tests/6b092c2fbb6079a97439bb8b/comment/6b09907855126ec441d4e8ca#reply-6b0998d2f3b77560a9d28bcd)

for the shadow period, the cheapest ground truth is already in git. log every _would-have-blocked_ verdict with the commit sha, then after 2 to 4 weeks join it against reverts, hotfix commits and anything touching the same lines. no incident tracker needed, and it shows which rules earn blocking.
