# Catch the Bugs Your Code Review Misses

Killian Carlsen-Phelan & Taylor Luttrell-Williams, Sonar | AI Engineer NYC 2026 | 38:07

Source: https://www.youtube.com/watch?v=wP3P89YB9fA
Channel: AI Engineer (https://www.youtube.com/@aiDotEngineer). Summarised by AIE Talks.
Page: https://aietalks.com/talks/catch-the-bugs-your-code-review-misses
Published: 2026-10-29
Tags: agents, coding-agents, evals, guardrails, workflows

## TL;DR
- Gitar checks code changes against surrounding application behavior, so it can find bugs outside the pull request diff.
- Gitar can use repository instructions and rules to enforce business requirements such as showing customers an all-in ticket price.
- Gitar can inspect failed CI tests, apply fixes, rerun verification, and merge a pull request when the configured checks pass.

## Summary
Taylor Luttrell-Williams and Killian Carlsen-Phelan demonstrate Gitar, Sonar's code change verification agent, on a small Python ticketing application. The first pull request adds ticket transfers, but leaves a bug in existing cancellation logic: the buyer can refund a ticket after giving it to a friend. Gitar finds the problem outside the diff and proposes a fix. The second pull request adds a service fee. A repository rule tells Gitar that displayed prices must include all fees, so it flags the change even though the code is technically valid. The final pull request refactors ticket scanning and breaks a test. Gitar reads the CI failure, fixes the repeated-scan behavior, reruns the pipeline, and can merge automatically after the checks pass. The speakers also cover project context files, learned review conventions, Jira and Slack references, and analysis across repositories and in-flight pull requests.

## Key ideas
### AI-generated changes create a verification bottleneck
[04:13](https://www.youtube.com/watch?v=wP3P89YB9fA&t=253s)
Taylor says coding agents produce code faster than teams can inspect it. Review queues grow, merges wait, and production incidents increase when generated changes ignore project architecture or coding standards. The problem is practical correctness as well as technical correctness. A change can pass ordinary checks while violating how the application is supposed to work. Taylor frames Gitar as a way to keep verification pace with agent-written code, while letting teams choose how much automation and human involvement they want.

### Gitar uses context beyond the pull request diff
[06:46](https://www.youtube.com/watch?v=wP3P89YB9fA&t=406s)
Taylor describes Gitar as a code change verification agent that draws on pull request details, comments, CI logs, project instructions, and repository rules. It posts findings and proposed fixes directly to the pull request. Teams can ask it to apply a fix or enable automatic fixes and merging. Taylor also says Gitar is tuned to reduce false positives, since an incorrect finding can cause an unnecessary fix attempt and an unintended change.

### The first demo finds a bug in existing cancellation behavior
[15:43](https://www.youtube.com/watch?v=wP3P89YB9fA&t=943s)
The Box Office app lets a buyer purchase, cancel, refund, and transfer tickets. The first pull request adds transfer support and has passing tests. Gitar notices that after a buyer transfers a ticket to a friend, the buyer can still cancel the original order and invalidate the friend's ticket. The defect is in orders.py, outside the new diff. The existing tests cover sending a voided ticket, but they do not cover canceling a ticket after it has been transferred. Gitar proposes extra validation and can add the fix as a new commit.

### Repository rules turn business policy into a review check
[22:07](https://www.youtube.com/watch?v=wP3P89YB9fA&t=1327s)
The second pull request adds a $3.50 service fee to a ticket purchase. The example company has a rule that every customer-facing price must be all-in. Gitar can read context stored in a review directory and can apply conditional rules from a rules directory. In this example, a pricing-file change triggers a review of customer-facing fields. Gitar identifies that the new displayed price does not follow the all-in pricing policy. The speakers distinguish this from a basic programming error: the code works, but it conflicts with the company's business requirement.

### CI diagnosis can continue through fixes until the checks pass
[26:36](https://www.youtube.com/watch?v=wP3P89YB9fA&t=1596s)
The third pull request refactors ticket scanning and causes the test for scanning a used ticket twice to fail. The CI result says a second scan returns HTTP 200, although a used ticket should not work again. Gitar reads the failure and explains the broken behavior from the CI output. With auto-apply enabled, it can push fixes without waiting for approval after each attempt. With auto-merge enabled, it merges after no issues remain and the required status checks pass.

### Teams can control the amount of automation
[31:00](https://www.youtube.com/watch?v=wP3P89YB9fA&t=1860s)
The workshop uses comments such as 'Gitar auto apply on' and 'Gitar auto merge on' to enable the final demonstration. The speakers say the dashboard also lets teams set auto-approval and auto-merge by repository. A team can leave fixes and approvals manual, or allow Gitar to push changes and merge when its configured checks are satisfied. GitHub branch rules still require the selected CI checks to pass before the merge.

### Functional validation connects code changes to their requested work
[33:24](https://www.youtube.com/watch?v=wP3P89YB9fA&t=2004s)
Taylor describes functional validation against the ticket a pull request is meant to implement. Gitar can use Jira, Linear, and Slack integrations to add that context to a review. The goal is to check whether a change is complete and correct for the requested feature, rather than only checking whether the code is clean. The speakers also describe a knowledge feature that stores feedback about review conventions and uses it in later fixes.

### Cross-repository and cross-pull-request checks catch interaction bugs
[35:14](https://www.youtube.com/watch?v=wP3P89YB9fA&t=2114s)
Cross-repository analysis looks for changes that pass independently but break code in another repository. Cross-pull-request analysis checks in-flight pull requests against one another. Taylor notes that two changes can each pass alone and still cause a production problem together. Gitar's dashboard shows the finding, its location, the proposed fix, and why the issue matters.

## Notable quotes
- Taylor Luttrell-Williams: "Who or what is actually verifying the code that our agents ship?" (04:40)
- Killian Carlsen-Phelan: "What it can't do is infer intent." (17:15)
- Gitar: "Buyer can refund and void a ticket after giving it away." (18:29)
- Killian Carlsen-Phelan: "Every price we show is the all-in price." (22:49)
- Taylor Luttrell-Williams: "Two PRs can each pass alone and yet still break production together." (36:01)

## Tools & references mentioned
- Sonar
- SonarQube
- Gitar
- GitHub
- Jira
- Linear
- Slack
- MCP

## Who should watch
- You use coding agents and need a way to check changes against application behavior outside the diff.
- Your repository has business rules that are difficult to encode in ordinary tests or static analysis.
- You want CI failures to trigger automated diagnosis and fixes, with control over approval and merge automation.

## Editor's note

Taylor Luttrell-Williams shows that adding ticket transfers can leave a buyer able to cancel the original order and invalidate the friend's ticket, even though the pull request's tests pass. Kitaru records the agent's calls and tool results from a real run, then replays them with the same inputs after the code changes. That gives the team a repeatable run for checking the cancellation fix.

Written by the AIE Talks editors (the Kitaru team), not by the speaker.

## Related talks

- [How to Build an AI Code Review Agent](https://aietalks.com/talks/how-to-build-an-ai-code-review-agent) (Daksh Gupta, Greptile, 18:27)
- [AI-powered entomology: Lessons from millions of AI code reviews](https://aietalks.com/talks/ai-powered-entomology-lessons-from-millions-of-ai-code-reviews) (Tomas Reimers, Graphite, 10:21)
- [Guide, Verify, Solve](https://aietalks.com/talks/guide-verify-solve) (Anirban Chatterjee, Sonar, 22:31)
- [How Coding Agents Change Software Development Forever](https://aietalks.com/talks/how-coding-agents-change-software-development-forever) (Hailong Zhang, 08:50)
- [Fixing the PR Bottleneck](https://aietalks.com/talks/fixing-the-pr-bottleneck) (Matt Pocock, AI Hero, 22:35)
