<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Momcilo Savic</title>
    <description>The latest articles on DEV Community by Momcilo Savic (@momcilo_savic_f347191005c).</description>
    <link>https://dev.to/momcilo_savic_f347191005c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4096315%2F193b0aa5-a5cf-4be3-ab01-7ba6578681b3.png</url>
      <title>DEV Community: Momcilo Savic</title>
      <link>https://dev.to/momcilo_savic_f347191005c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/momcilo_savic_f347191005c"/>
    <language>en</language>
    <item>
      <title>The Bug Class AI Coding Agents Keep Introducing (and How We Started Catching It in CI)</title>
      <dc:creator>Momcilo Savic</dc:creator>
      <pubDate>Wed, 26 Aug 2026 20:57:02 +0000</pubDate>
      <link>https://dev.to/momcilo_savic_f347191005c/the-bug-class-ai-coding-agents-keep-introducing-and-how-we-started-catching-it-in-ci-1np7</link>
      <guid>https://dev.to/momcilo_savic_f347191005c/the-bug-class-ai-coding-agents-keep-introducing-and-how-we-started-catching-it-in-ci-1np7</guid>
      <description>&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;AI coding agents are good at producing a diff that &lt;em&gt;works&lt;/em&gt; in the&lt;br&gt;
narrowest sense — the function still returns what the test expects. What&lt;br&gt;
they're not reliably good at is preserving properties nobody wrote a test&lt;br&gt;
for in the first place.&lt;/p&gt;

&lt;p&gt;The two we kept running into: an authorization check quietly dropped&lt;br&gt;
during an agent-driven refactor (nothing failed, because no test covered&lt;br&gt;
&lt;em&gt;who&lt;/em&gt; was allowed to call the route — only that the route worked), and a&lt;br&gt;
rewritten query that behaved fine against a small dev dataset and&lt;br&gt;
full-table-scanned the moment it hit production data. Neither shows up in&lt;br&gt;
CI as it exists today. Both show up in code review only if the reviewer&lt;br&gt;
happens to look at exactly the right five lines out of a few hundred.&lt;/p&gt;
&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/avalonlabs-platform/agent-code-merge-gate" rel="noopener noreferrer"&gt;Agent Code Merge Gate&lt;/a&gt;&lt;br&gt;
is a free GitHub Action, now &lt;a href="https://github.com/marketplace/actions/avalonlabs-agent-code-merge-gate" rel="noopener noreferrer"&gt;live on the GitHub Marketplace&lt;/a&gt;,&lt;br&gt;
that runs on every pull request and scans the diff specifically for those&lt;br&gt;
two regression classes. It runs an offline heuristic pass (fast, no&lt;br&gt;
external call) plus one AI-backed pass for a short Executive Summary, and&lt;br&gt;
posts a single comment back to the PR that updates on every push rather&lt;br&gt;
than piling up duplicates.&lt;/p&gt;

&lt;p&gt;Deliberately narrow scope — it's not trying to be a general linter. It&lt;br&gt;
covers the two failure modes we found ourselves manually re-checking for&lt;br&gt;
once AI-generated PRs became the majority of our merge volume.&lt;/p&gt;
&lt;h2&gt;
  
  
  Wiring it into CI
&lt;/h2&gt;

&lt;p&gt;Three lines in a workflow file:&lt;/p&gt;

&lt;p&gt;​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Agent Code Merge Gate&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;avalonlabs-platform/agent-code-merge-gate@v1.0.0&lt;/span&gt;
&lt;span class="s"&gt;​```&lt;/span&gt;
&lt;span class="pi"&gt;{&lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt; &lt;span class="nv"&gt;endraw %&lt;/span&gt;&lt;span class="pi"&gt;}&lt;/span&gt;


&lt;span class="s"&gt;No signup and no config needed for the default behavior. Two inputs worth&lt;/span&gt;
&lt;span class="na"&gt;knowing about&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt; &lt;span class="nv"&gt;raw %&lt;/span&gt;&lt;span class="pi"&gt;}&lt;/span&gt;&lt;span class="na"&gt;`fail-on-critical&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="s"&gt;` turns a CRITICAL finding into an&lt;/span&gt;
&lt;span class="s"&gt;actual failed check instead of just a comment, and `comment-on-pr&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="s"&gt;`&lt;/span&gt;
&lt;span class="s"&gt;if you'd rather build your own notification from the raw `status` output.&lt;/span&gt;

&lt;span class="c1"&gt;## What's next&lt;/span&gt;

&lt;span class="s"&gt;Right now it's diff-scoped — it sees what changed in this PR, not the&lt;/span&gt;
&lt;span class="s"&gt;whole repo's history of how that code got there, which limits how much&lt;/span&gt;
&lt;span class="s"&gt;context it can reason about. Whole-repo context is the obvious next step,&lt;/span&gt;
&lt;span class="s"&gt;and it's also where this stops being a free CI script and starts being a&lt;/span&gt;
&lt;span class="s"&gt;product decision — worth its own post once it's built rather than&lt;/span&gt;
&lt;span class="s"&gt;speculated about here.&lt;/span&gt;

&lt;span class="s"&gt;If you've hit a different bug pattern that seems to show up&lt;/span&gt;
&lt;span class="s"&gt;disproportionately in AI-generated PRs, I'd genuinely like to hear about&lt;/span&gt;
&lt;span class="s"&gt;it — that's exactly the kind of thing worth building detection for next.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>javascript</category>
      <category>github</category>
    </item>
  </channel>
</rss>
