We build CodeGuard AI at IsabiTech: a self-hosted pull-request reviewer for Java and Spring Boot. It runs your project's tests on the PR, compares them with the base branch, and says UNVERIFIED when it cannot prove something instead of showing a green tick. Product page: https://isabitech.gumroad.com/l/codeguard-ai?utm_source=hashnode&utm_medium=article&utm_campaign=codeguard-1-1-2
Last week we asked developers on Indie Hackers to audit our GitHub and Gumroad listing. We had about 400 views, about 400 cold emails and no sales. The feedback was direct, and we used it to ship version 1.1.2. This post covers three of the changes, each run on a test repository, and what is still not fixed.
TL;DR
- Tests passing does not mean the tests check the new behavior. An optional mutation check shows when they do not.
- A method that stops throwing and starts returning
nullcan silently disable the catch blocks of its callers. We added a rule for that. - If you use a hosted AI model, the diff goes to that provider. We now keep
.env, key files and your own paths out of it.
1. Tests pass, but nobody tests the boundary
A PR adds this method:
public double fee(double orderTotal) {
if (orderTotal > 500) {
return 0.0;
}
return 49.0;
}
It comes with two tests, one for 1000 and one for 100. All 8 tests in the project passed, and the AI wrote that the tests cover the new functionality and the PR is safe to merge.
CodeGuard's optional mutation check changed > to >= on the added line and re-ran the tests that reference the class. They still passed. The review reported:
Tests did not detect a deliberate change at ShippingService.java:7 Original:
if (orderTotal > 500) {Mutant:if (orderTotal >= 500) {2 test(s) ran and all passed with the mutant applied.
It is a Medium finding, verified by rule, and it warns without blocking, because a surviving mutant is evidence about the tests, not proof of a bug.
We then added a test for exactly 500:
@Test
void exactlyFiveHundredStillPaysFee() {
assertEquals(49.0, service.fee(500.0), 0.001);
}
Both mutants were caught (2 of 2) and the review passed with no finding.
The cost is time. The mutation step added about 134 seconds per review, so a review took 3.5 to 4 minutes instead of about 1.5. That is why it is off by default, only mutates lines the PR added, and has a cap on the number of mutants and the total time.
2. A method stops throwing and returns null
A reader described this case. PriceService.total() used to throw IllegalArgumentException for a bad quantity. A PR changed it to return null;. A caller outside the PR still had catch (IllegalArgumentException e), and that handler can no longer fire.
CodeGuard now checks for this. When a PR removes throw new X(...) and adds return null;, it looks at callers outside the PR. A caller that still catches X with no null check nearby is flagged on the catch line (High), with the diff and the caller lines as evidence. A caller that already checks for null is left alone.
The matching is name-based, so the finding is labeled a rule-based heuristic and a human should confirm it. It is not type-aware yet.
A related rule: a PR that deletes a test file, or removes more @Test methods than it adds, now gets a verified finding. It warns and does not block.
3. Keep secret files away from the AI provider
If you use a hosted provider such as OpenAI, Gemini or Groq, the changed files' diffs go to that provider under your own key. A reader pointed out that an accidentally committed .env is the obvious worry, and he was right: we had no setting for it.
Now these are never sent: .env, *.pem, *.key, *.p12, *.jks, *.tfvars, credentials.json and a few similar files. You can add your own globs, for example config/.
In a test PR with a fake .env next to a one-line Java change, the review said:
1 file(s) were not sent to the AI (excluded from the AI by path rule)
and the model's summary only mentioned the Java change. The local secret check still flagged the .env as a High finding and blocked the merge, because it runs without the AI.
What this does not cover: a secret in the PR title or description, or in a file that matches none of the patterns. For a setup where nothing may leave your network, use Ollama.
What else is in 1.1.2
- A per-rule policy report: how many reviews had a finding per rule, how many it blocked, and how many it would have blocked in advisory mode. It exists because teams mute a bot after one loud false positive, so you can run advisory mode first and then choose which rules may block.
- An optional findings cap, which trims what is listed and stored, not what is sent to the AI.
- A Groq fix: the model sometimes leaves out a required field and Groq rejects the answer, so CodeGuard now retries once.
- Team license: up to 8 developers.
What is not fixed
- Impact analysis is name-based, not type-aware, so it can miss indirect callers and callers the change never touched.
- The new rules have unit tests and hand-run checks, but they are not in the frozen benchmark yet, so the regression gate does not protect them.
- Our lab cases are planted, so they show the rules behave as designed, not real-world accuracy.
- Flaky-test comparison runs 3 times per side, so a test that fails only rarely on the base branch can be mistaken for one the PR made flaky. That case warns and does not block.
- We have not run an email-delivery check on our cold emails yet, which is the first thing to rule out for zero replies.
See it before you buy
You can read CodeGuard's own review comments on real public pull requests without installing anything: codeguard-demo-prs: https://github.com/ISabiTech16/codeguard-demo-prs/pulls. There is also a public preview repository: https://github.com/ISabiTech16/CodeGuard-AI with the screenshots and a runnable sample module with its tests.
CodeGuard AI is a one-time, self-hosted source-code purchase: Personal $19, Developer $39, Team (up to 8 developers) $99, with a 14-day refund. Get it on Gumroad: https://isabitech.gumroad.com/l/codeguard-ai?utm_source=hashnode&utm_medium=article&utm_campaign=codeguard-1-1-2.
If you review Java pull requests, tell us in the comments which of these checks you would trust a bot with, and which one you would turn off.
Written by the IsabiTech team.
About the author
- Building and sharing practical developer tools, AI engineering projects, and Java/Spring Boot insights.
Comments
Join the discussionNo comments yet. Be the first to comment.
