<?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: Gil Zilberfeld</title>
    <description>The latest articles on DEV Community by Gil Zilberfeld (@testingil).</description>
    <link>https://dev.to/testingil</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%2F4065719%2F5d44e120-5e4a-4ae4-ae55-1fbffc2898d4.png</url>
      <title>DEV Community: Gil Zilberfeld</title>
      <link>https://dev.to/testingil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/testingil"/>
    <language>en</language>
    <item>
      <title>You Can't Fix A Bug With A Prompt</title>
      <dc:creator>Gil Zilberfeld</dc:creator>
      <pubDate>Thu, 06 Aug 2026 10:46:27 +0000</pubDate>
      <link>https://dev.to/testingil/you-cant-fix-a-bug-with-a-prompt-3ini</link>
      <guid>https://dev.to/testingil/you-cant-fix-a-bug-with-a-prompt-3ini</guid>
      <description>&lt;p&gt;Let's talk about fixing bugs. My second favorite activity after creating them.&lt;/p&gt;

&lt;p&gt;How do I know the bug is fixed? Well, I've been taught by wiser and more experienced people than me (way back when), that if you want to make sure the bug never shows its face again - write an automated test for it.&lt;/p&gt;

&lt;p&gt;Ok, I admit that there were times I didn't write a test. Some fixes are so trivial, that sometimes a test is a luxury.&lt;/p&gt;

&lt;p&gt;But even then, I was working on a hidden assumption. Just like in Fallout, code never changes. Until it does. But between those times it never changes.&lt;/p&gt;

&lt;p&gt;I fix the bug. From this point until it actually changes by a human, or a bot or someone in-between - that code will compile, or transpile, or whatever we call "runs" the same way. A statement will execute, a condition evaluated, an exception caught - every time in the same way.&lt;/p&gt;

&lt;p&gt;And now we come to modern programming languages: Prompts. Agents, prompts, workflows - they don't run the same way every time. What they do is run their interpretation of the request. If they run tools - they run the deterministic parts. If they run sub-agents, they run interpretations based on other interpretations.&lt;/p&gt;

&lt;p&gt;Interpretations work mostly the same way, until they don't. When I was teaching my agent to develop in TDD, I had a couple of requests. One of them was to not create code without a test.&lt;/p&gt;

&lt;p&gt;Which I thought was a very normal request from an agent. In fact, when I started out by telling it - we're working in TDD - I assumed it knows what TDD is. Ha.&lt;/p&gt;

&lt;p&gt;Always remember that what LLMs know is exactly what most of the population knows. And usually the "don't create any code without a test" falls through the cracks.&lt;/p&gt;

&lt;p&gt;So I made it official: One of the agent rules was exactly that. This was a legitimate bug fix. At least I thought so.&lt;/p&gt;

&lt;p&gt;But it really was a suggestion. Which the agent considered, and depending on its mood, sometimes did, and sometimes didn't.&lt;/p&gt;

&lt;p&gt;I won't go into the full solution (still in progress, if you want me to elaborate, comment), but part of it was to run a targeted coverage tool - a deterministic one, check it and stop the process if it found extra code. The TDD sequence looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;Per step:
&lt;span class="p"&gt;1.&lt;/span&gt; Write test(s).
&lt;span class="p"&gt;2.&lt;/span&gt; &lt;span class="sb"&gt;`node scripts/tdd.mjs red &amp;lt;test-file&amp;gt;`&lt;/span&gt; — all newly added tests must fail. Pre-existing passing tests in the same file are allowed to remain passing.
&lt;span class="p"&gt;3.&lt;/span&gt; Implement minimum to pass.
&lt;span class="p"&gt;4.&lt;/span&gt; &lt;span class="sb"&gt;`node scripts/tdd.mjs targeted &amp;lt;test-file&amp;gt;`&lt;/span&gt; — targeted coverage + pass check.
&lt;span class="p"&gt;5.&lt;/span&gt; &lt;span class="sb"&gt;`node scripts/tdd.mjs lint`&lt;/span&gt; — ESLint.
&lt;span class="p"&gt;6.&lt;/span&gt; &lt;span class="sb"&gt;`node scripts/tdd.mjs full`&lt;/span&gt; — full suite + coverage.
&lt;span class="p"&gt;7.&lt;/span&gt; Script says STOP. Human reviews.
&lt;span class="p"&gt;8.&lt;/span&gt; Human runs &lt;span class="sb"&gt;`node scripts/tdd.mjs commit "message"`&lt;/span&gt;.
&lt;span class="p"&gt;9.&lt;/span&gt; Human confirms next step. AI runs &lt;span class="sb"&gt;`/clear`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But each step here is the suggestion. The real enforcement is done in the tdd.mjs code. Real code.&lt;/p&gt;

&lt;p&gt;But this is just an example. The real problem is that more and more "code" is not programmed. It's interpreted. That means that bugs are a lot more flaky to catch, but also are not permanently fixable.&lt;/p&gt;

&lt;p&gt;And don't get me started on companies switching model capabilities every other Tuesday. In the past, updating versions was a whole ceremony because we were worried something would break.&lt;/p&gt;

&lt;p&gt;Now LLM providers do it for us without us knowing.&lt;br&gt;
We can live with that. We should make sure we know.&lt;/p&gt;

&lt;p&gt;And remember - bug fixes in prompts are not real bug fixes. They are more like wishes. Which may or may not come true.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://testingil.com/2026/07/testing-ai-generated-code-prompt-not-a-fix.html" rel="noopener noreferrer"&gt;testingil.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'm Gil Zilberfeld. I teach API testing and test automation, and I write about what AI-generated code does to quality.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>programming</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
