<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Fluid Coding & AI]]></title><description><![CDATA[Fluid Coding & AI]]></description><link>https://fluidcodingai.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 20:13:45 GMT</lastBuildDate><atom:link href="https://fluidcodingai.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Python JSON duplicate keys: validate before the dictionary loses them]]></title><description><![CDATA[A local AI repair checked JSON duplicates too late. Learn the decoder-hook fix, nine test cases, and what the failed repair teaches.]]></description><link>https://fluidcodingai.hashnode.dev/python-json-duplicate-keys-validate-before-the-dictionary-loses-them</link><guid isPermaLink="true">https://fluidcodingai.hashnode.dev/python-json-duplicate-keys-validate-before-the-dictionary-loses-them</guid><category><![CDATA[Python]]></category><category><![CDATA[debugging]]></category><dc:creator><![CDATA[Fluid Coding & AI]]></dc:creator><pubDate>Mon, 16 Nov 2026 16:02:44 GMT</pubDate><content:encoded><![CDATA[<p>A duplicate-key check can look thorough and still be incapable of finding a duplicate. In our local coding-model test, a repair parsed JSON into a dictionary, then recursively tracked the dictionary's keys in a set. The test kept failing because the information it needed had already disappeared.</p>
<p>This companion focuses on that one defect from <strong>I Gave Two Local 9B Coding Models Their Failing Tests</strong>. The full experiment also covers string normalization, command-line parsing and an LRU cache.</p>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=Qo_sa5LeXYA">https://www.youtube.com/watch?v=Qo_sa5LeXYA</a></p>

<h2>What the failed repair actually did</h2>
<p>The task required rejecting a record when any JSON object contained duplicate keys, including objects nested inside otherwise unused fields. Qwen3.5-9B's final diagnostic repair first called json.loads, then recursively walked the resulting dictionaries. Inside each dictionary it kept a set of previously encountered keys.</p>
<p>That cannot recover a duplicate that decoding has already collapsed. For an input shaped like {"score": 1, "score": 2}, the default decoder retains the last value. Iterating over the resulting dictionary encounters score only once.</p>
<p>The saved final repair passed three of four visible cases and two of four held-out cases. One held-out failure used an escaped spelling that decoded to the same key. It accepted a record with the final score instead of rejecting the line. The actual trace is discussed around 4:52 in the video.</p>
<p>The useful review question is: <strong>At which step does this program discard the evidence my validator needs?</strong> Adding more recursion after that step does not help.</p>
<h2>Put the check at the decoding boundary</h2>
<p>Python's object_pairs_hook receives each object's ordered key/value pairs before they become a dictionary. That gives a duplicate detector the evidence it needs. parse_constant can separately reject the special tokens NaN, Infinity and -Infinity. These hooks are documented in the <a href="https://docs.python.org/3.12/library/json.html#json.load">Python JSON decoder reference</a>.</p>
<p>Here is a small, independently tested example. It illustrates the decoding boundary, not the full benchmark's record-ingestion contract:</p>
<pre><code class="language-python">import json


def unique_object(pairs):
    result = {}
    for key, value in pairs:
        if key in result:
            raise ValueError(f"duplicate key: {key!r}")
        result[key] = value
    return result


def reject_constant(token):
    raise ValueError(f"non-JSON constant: {token}")


def load_record(text):
    return json.loads(
        text,
        object_pairs_hook=unique_object,
        parse_constant=reject_constant,
    )
</code></pre>
<p>Keep this boundary separate from business rules. A successfully decoded object can still have missing fields, an invalid score, a disallowed identifier or the wrong top-level type. This example also does not impose input-size, nesting-depth or numeric-range limits.</p>
<h2>Test the cases a dictionary walk misses</h2>
<p>These are the nine cases used to check the example above:</p>
<ul>
<li>Reject a repeated key in the top-level object.</li>
<li>Reject a repeated key in a nested object.</li>
<li>Reject a repeated key in an object inside an array.</li>
<li>Reject score and \u0073core appearing as keys in the same object.</li>
<li>Reject NaN inside an array.</li>
<li>Reject Infinity as a value.</li>
<li>Reject -Infinity as a value.</li>
<li>Accept an ordinary string containing Infinity alongside a JSON null.</li>
<li>Accept the same key appearing in two different objects.</li>
</ul>
<p>All nine checks passed locally. The last two are important negative controls: rejecting too much can make a validator appear strict while breaking valid input. In particular, searching string contents for fragments such as “inf” is not equivalent to rejecting a special numeric token.</p>
<h2>What this means for an AI repair loop</h2>
<p>The model received diagnostics that named the nested-duplicate failure, yet its final approach still checked too late. A failure report can identify the symptom without causing the model to revise the underlying design.</p>
<p>For a similar repair workflow, I would keep three artifacts together: the exact failing input, the expected result and the candidate source. Then review the representation changes between input and assertion. Parsing, normalization and conversion into sets or dictionaries can all erase distinctions that matter to the contract.</p>
<p>Keep held-out cases outside the feedback prompt, preserve runnable candidates before retries, and reject a replacement that regresses the checks you care about. Those are useful safeguards even when the next model response sounds confident.</p>
<h2>Limits of this result</h2>
<p>This was one run per model/task with installed Q4_K_M builds, Ollama 0.40.15, native thinking enabled and a 131,072-token context. Failed first attempts were forked into pass/fail-only and diagnostic branches, each with up to three repairs. It is a narrow example of a repair failure, not a general ranking of models or proof that diagnostics are ineffective.</p>
<p>The broader experiment's held-out totals were 9/32 for first attempts, 12/32 for pass/fail retries and 11/32 for diagnostic retries. Those are individual test cases, not whole tasks; incomplete final submissions counted as zero. The small difference between the retry branches should not be treated as a reliable universal advantage.</p>
<p><em>Prepared with AI assistance from Fluid Coding &amp; AI's original video, saved test results and source artifacts. The illustrative decoder above was checked separately against the nine cases listed here.</em></p>
]]></content:encoded></item><item><title><![CDATA[AI-generated Three.js: test the behavior, not just the screenshot]]></title><description><![CDATA[Five local Three.js builds show why complete HTML, rendering, geometry and button behavior need separate tests. Includes a reusable review checklist.]]></description><link>https://fluidcodingai.hashnode.dev/ai-generated-three-js-test-the-behavior-not-just-the-screenshot</link><guid isPermaLink="true">https://fluidcodingai.hashnode.dev/ai-generated-three-js-test-the-behavior-not-just-the-screenshot</guid><category><![CDATA[ThreeJS]]></category><dc:creator><![CDATA[Fluid Coding & AI]]></dc:creator><pubDate>Sun, 15 Nov 2026 15:54:49 GMT</pubDate><content:encoded><![CDATA[<p>A train can look convincing in a browser and still miss its own rails. A button can change its label without changing the scene. And a comment that says “six wheels” does not guarantee six wheels in the generated geometry.</p>
<p>Those were concrete failures in our five-prompt test of Qwen3.5-4B-3D-Coder. The useful lesson is not simply that generated code needs review. It is that <strong>completion, rendering, construction, and interaction are different outcomes</strong>. Treating them as one success signal hides the failures that matter.</p>
<h2>Watch the browser tests</h2>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=YfvgbI0YTJ0">https://www.youtube.com/watch?v=YfvgbI0YTJ0</a></p>

<p>This companion is based on <strong>I Tested Qwen3.5-4B-3D-Coder on Five Three.js Builds</strong>, including the original prompts, browser-review notes, and thinking-on retest. It explains a testing approach you can adapt to your own generated scenes.</p>
<h2>Separate four questions</h2>
<p>For each generated page, ask these in order:</p>
<ol>
<li><strong>Did the model return a complete artifact?</strong> A complete HTML response is an output milestone, not proof that JavaScript initializes successfully.</li>
<li><strong>Does the scene render?</strong> Open the unedited output and check for a recognizable, nonblank canvas and uncaught errors.</li>
<li><strong>Was the requested object built?</strong> Count parts, inspect their placement, and change the camera angle when the initial view hides a requirement.</li>
<li><strong>Does the interaction perform the full action?</strong> Click the control and observe the scene over time. A changed label or a moving object may satisfy only a small part of the request.</li>
</ol>
<p>Our rubric had six equally weighted binary checks per scene: render, orbit, zoom, two task-specific construction requirements, and one full button action. Visual quality was reviewed separately. Construction points required visible rendered evidence; a blank canvas earned zero under this rubric rather than credit for plausible-looking source code.</p>
<h2>What five complete HTML files actually delivered</h2>
<p>With thinking disabled, all five requests returned complete HTML. Only two scenes rendered, and neither passed its full action check.</p>
<table>
<thead>
<tr>
<th>Scene</th>
<th>Result</th>
<th>Checks passed</th>
</tr>
</thead>
<tbody><tr>
<td>Lunar rover</td>
<td>Rendered, orbited and zoomed; one of two construction checks passed; full drive action failed</td>
<td>4/6</td>
</tr>
<tr>
<td>Cliffside observatory</td>
<td>Initialization failed before rendering</td>
<td>0/6</td>
</tr>
<tr>
<td>Robot sorting cell</td>
<td>Initialization failed before rendering</td>
<td>0/6</td>
</tr>
<tr>
<td>Coastal railway</td>
<td>Rendered, orbited and zoomed; construction and full action checks failed</td>
<td>3/6</td>
</tr>
<tr>
<td>Tidal greenhouse</td>
<td>Failed before the first render</td>
<td>0/6</td>
</tr>
</tbody></table>
<p>That is <strong>7/30 checks</strong>, not a general model accuracy estimate. These were five original prompts, one first-pass output per scene, one particular quantization and runtime setup.</p>
<h2>Three failure modes worth adding to your checklist</h2>
<h3>1. The description and the geometry disagree</h3>
<p>The rover source described six wheels in three pairs, but the positions array placed eight wheels. Clicking Drive moved the rover body, while the tires turned around a vertical axis instead of rolling around their axles.</p>
<p>A screenshot could establish that a rover existed. It could not establish that the requested wheel count and drive behavior were correct. Check both the visible construction and the animation. Comments are useful navigation aids, but they are not test results.</p>
<h3>2. The path and the animation disagree</h3>
<p>The first railway output rendered a coastal miniature, but its moving train followed a constant-height path while the rails rose over a bridge. Two cars also started below the deck.</p>
<p>In the thinking-on retest, the railway used the same curve for the rails and train movement. The train snapped onto the track after the click and continued across the bridge. The action check passed, but the locomotive still faced backward and the passenger-car bodies overlapped. Both construction checks still failed.</p>
<p>For a scene with motion, inspect three things separately: the object's position along the path, its orientation while traveling, and the spacing of attached objects. Fixing one does not establish the others. In this retest, the shared path improved the movement without making the whole railway correct.</p>
<h3>3. The interface responds while the scene does not</h3>
<p>The first greenhouse output changed its button label, but its water code called a method on the wrong kind of object and threw before the first render. The observatory and sorting cell had their own initialization failures.</p>
<p>Record the visible action and the browser error together. “The button works” is too broad if all you observed was a label change. Define the expected scene change before clicking, then verify that change actually happens.</p>
<h2>Do not hide incomplete runs when comparing settings</h2>
<p>The same five prompts were attempted again with thinking enabled. The recorded setup kept the model digest, seed, context, prompts, browser module and checks the same; the changed request field was the thinking setting.</p>
<table>
<thead>
<tr>
<th>Outcome across five prompts</th>
<th>Thinking off</th>
<th>Thinking on</th>
</tr>
</thead>
<tbody><tr>
<td>Complete HTML files</td>
<td>5</td>
<td>2</td>
</tr>
<tr>
<td>Rendered scenes</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>Full button-action passes</td>
<td>0</td>
<td>1</td>
</tr>
</tbody></table>
<p>Three thinking-on requests were interrupted after repeated reasoning met the runner's stopping rule: at least 12 identical consecutive cycles across at least 600 characters. They did not produce answer HTML. That stopping rule is part of the result, not a detail to omit.</p>
<p>The railway improved from 3/6 to 4/6, while the greenhouse remained at 0/6. Reporting only the railway improvement would conceal the drop in completed artifacts. Reporting only completion would conceal the one action that improved. Keep both views.</p>
<h2>A small acceptance record you can reuse</h2>
<p>Before generation, write down:</p>
<ul>
<li>The requested object and two observable construction requirements.</li>
<li>The camera controls that must work.</li>
<li>The named button, initial scene state, and complete expected result after a click.</li>
<li>The pinned library/runtime setup and the stopping rule for incomplete responses.</li>
</ul>
<p>After generation, preserve the unedited artifact and record:</p>
<ul>
<li>Whether complete code arrived.</li>
<li>The first browser error, if any.</li>
<li>Initial view, alternate angle, and a short action capture.</li>
<li>A pass/fail result for every requirement, with a reason.</li>
<li>Any repair attempt in a separate column or run, not folded into first-pass results.</li>
</ul>
<p>In our observatory follow-up, a focused patch got past the missing-position failure, then exposed an undefined width. The scene still did not render. A successful local edit and a successful end-to-end repair are different claims.</p>
<h2>Scope and sources</h2>
<p>The local test used the author's Q4_K_M GGUF in Ollama 0.40.15 on an RTX 5060 Ti, a configured 65,536-token context, and Three.js r160. The findings describe these prompts and this setup; they do not rank every build of the model or establish a universal best thinking setting.</p>
<p>The <a href="https://huggingface.co/ccore/Qwen3.5-4B-3D-Coder">CCORE model card</a> is the source for the model. The accompanying video shows our browser captures. The article's test results were checked against the episode's method, first-pass results and thinking-on retest notes.</p>
<p><em>AI assistance disclosure: This original companion article was prepared with AI assistance and reviewed against the video's script and recorded project evidence.</em></p>
]]></content:encoded></item><item><title><![CDATA[C++ mesh bounds: why min() breaks negative coordinates]]></title><description><![CDATA[Why negative coordinates exposed a C++ bounds bug, how Qwen repaired validation, and the regression checks that verified the patch.]]></description><link>https://fluidcodingai.hashnode.dev/c-mesh-bounds-why-min-breaks-negative-coordinates</link><guid isPermaLink="true">https://fluidcodingai.hashnode.dev/c-mesh-bounds-why-min-breaks-negative-coordinates</guid><category><![CDATA[debugging]]></category><category><![CDATA[C++]]></category><dc:creator><![CDATA[Fluid Coding & AI]]></dc:creator><pubDate>Sat, 14 Nov 2026 15:17:15 GMT</pubDate><content:encoded><![CDATA[<p>A mesh can pass a positive-coordinate test and still acquire a bounding box that reaches toward zero when every vertex moves into negative space. In our Qwen3.8-27B workday test, that was not a rendering problem. It was a C++ initialization error, accompanied by a parser that accepted invalid input too quietly.</p>
<p>This companion focuses on the repair and the checks behind it. The full episode also covers other programming and 3D tasks; a successful bounds fix should not be read as a claim that the model succeeded at everything.</p>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=c3y4O8EerXo">https://www.youtube.com/watch?v=c3y4O8EerXo</a></p>

<h2>The smallest value is not always the lowest value</h2>
<p>An axis-aligned bounding box, or AABB, records the smallest and largest coordinate on each axis. The original tool initialized its minimum with <code>max()</code> and its maximum with <code>min()</code>. The names look symmetrical, but floating-point limits are not symmetrical in that way.</p>
<p>For the tested double representation, <code>std::numeric_limits&lt;double&gt;::min()</code> is a small <strong>positive normalized</strong> number. It is not the most negative finite number. The C++ working draft distinguishes this from <code>lowest()</code>, which supplies the lowest finite value. See the <a href="https://eel.is/c++draft/numeric.limits.members">numeric limits definitions</a>.</p>
<p>If the running maximum begins positive, comparing it with only negative coordinates never replaces it. The baseline log showed the maximum as <code>2.22507e-308</code> on all three axes for the negative-translation case.</p>
<p>The submitted patch made this targeted change:</p>
<pre><code class="language-cpp">// Bounds constructor: initialize each axis before accumulating points.
minimum.fill(std::numeric_limits&lt;double&gt;::max());
maximum.fill(std::numeric_limits&lt;double&gt;::lowest());
</code></pre>
<p>That repairs the initialization for finite coordinates. It does not, by itself, define what an empty mesh means or make malformed input safe to accept.</p>
<h2>Fix the input contract, not just the visible symptom</h2>
<p>The work order required invalid input to produce a nonzero exit code, a clear diagnostic, and <strong>no bounding box on standard output</strong>. Valid input had to keep its existing CLI and output format.</p>
<p>The original loop read triples directly from the input stream. That made two behaviors easy to overlook: a failed extraction could end the loop without turning the program into a failure, and whitespace-based extraction could assemble a point across separate incomplete lines.</p>
<p>The replacement processed one line at a time. It skipped blank lines, required three coordinates, rejected extra content, checked coordinates for finiteness, and tracked whether any points had been accepted. An empty or whitespace-only file became an error rather than a pair of initialization sentinels printed as geometry.</p>
<p>The ordering mattered. The program accumulated bounds internally, but printed them only after validating the input. A later malformed line therefore did not leave a partial, apparently successful result on stdout.</p>
<h2>A compact regression set</h2>
<p>The independent checks covered seven cases:</p>
<ul>
<li>A mesh translated entirely into negative coordinates.</li>
<li>Valid input containing blank lines.</li>
<li>Empty input.</li>
<li>An incomplete point.</li>
<li>Two incomplete lines that must not become two valid points.</li>
<li>A nonfinite coordinate.</li>
<li>Trailing junk after coordinates.</li>
</ul>
<p>Before editing, only the valid-with-blank-lines case passed. After the patch, all seven passed. Separately, the agent's own suite reported 11 passing tests after compilation. Those are different suites, not an 18-point benchmark or 18 independent proofs of correctness.</p>
<p>For a small negative-coordinate regression, the submitted tests used these points:</p>
<pre><code class="language-text">-1 -6 -3
-2 -4 -4
-1 -4 -9
</code></pre>
<p>The expected two output lines were:</p>
<pre><code class="language-text">-2 -6 -9
-1 -4 -3
</code></pre>
<p>For malformed inputs, checking only the exit status is incomplete. Assert that stdout is empty and stderr contains a useful error too. Otherwise downstream tooling may accidentally consume a partial result.</p>
<h2>What this says about using a coding agent</h2>
<p>The useful unit of evidence was the sequence: reproduce the reported defect, inspect a small diff, rebuild after the final edit, and evaluate the artifact against separate checks. A confident explanation alone would not demonstrate the repair.</p>
<p>This was one local run using the Unsloth UD-Q3_K_XL GGUF of Qwen3.8-27B through Pi and llama.cpp. The harness exposed text and tool results. These results are about this task and configuration, not a universal reliability score or a comparison with other models.</p>
<p>If you maintain importers, geometry tools, or release CLIs, take the reusable test pattern: exercise the opposite sign range, distinguish valid empty-looking whitespace from an empty dataset, and specify what failure must not output. Those details make an agent's patch much easier to review.</p>
<p><em>AI assistance disclosure: This article was prepared with AI assistance and checked against the episode's work order, submitted patch, recorded test logs, and published video. The article's explanations extend the short video; no additional model run is claimed.</em></p>
]]></content:encoded></item><item><title><![CDATA[Before an AI fixes your logs, check what it actually read]]></title><description><![CDATA[A local Gemma and Qwen test shows how a smaller screenshot changed a repair recommendation. Learn to check extraction and diagnosis separately.]]></description><link>https://fluidcodingai.hashnode.dev/before-an-ai-fixes-your-logs-check-what-it-actually-read</link><guid isPermaLink="true">https://fluidcodingai.hashnode.dev/before-an-ai-fixes-your-logs-check-what-it-actually-read</guid><category><![CDATA[ollama]]></category><category><![CDATA[debugging]]></category><dc:creator><![CDATA[Fluid Coding & AI]]></dc:creator><pubDate>Fri, 13 Nov 2026 15:41:06 GMT</pubDate><content:encoded><![CDATA[<p>A resized screenshot changed a local model's recommendation from versioning a cache key to altering a database. The underlying incident had not changed. The input representation had.</p>
<p>That result came from Fluid Coding &amp; AI's Gemma 4 12B versus Qwen3.5 9B comparison. This companion focuses on the three incident-triage tasks and a practical way to separate evidence-reading errors from diagnosis errors. The full video also covers a website, editable 3D geometry, and a Python repair.</p>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=JrYZGMeYop4">https://www.youtube.com/watch?v=JrYZGMeYop4</a></p>

<h2>The evidence that should rule out the database</h2>
<p>The stale-cache task used original, simulated logs. These are the relevant lines, not a production incident:</p>
<pre><code class="language-text">GET /api/profile user=u_18 region=eu-west    502
cache HIT   key=profile:u_18   schema=v6
decode expected v7: missing field display_name
GET /api/profile user=u_18 bypass_cache=true 200
database row schema=v7  field=display_name
</code></pre>
<p>The failed request reads a version-six cache entry while the application expects version seven. Bypassing the cache succeeds, and the database row already has the expected field. Within this fixture and its supplied choices, the supported diagnosis is a stale cache. The expected durable remedy is to version the cache key for the schema rollout.</p>
<p>That distinction matters. Changing the database would target the component that the supplied evidence says is already compatible. In a real system, a proposed cache-key change would still need an appropriate rollout plan and verification; this fixture does not establish a universal cache-migration strategy.</p>
<h2>What changed when the screenshot shrank</h2>
<p>Each model received the incident in three conditions: the original 930-pixel-wide PNG, the exact log lines as text, and a copy resized to 320 pixels wide. The prompt asked for five string fields in a JSON object: user, cache key, cached schema, cause, and remedy.</p>
<p>On the original image and on the text, both models returned all five expected fields. On the small image:</p>
<ul>
<li><strong>Qwen3.5 9B</strong> retained the stale-cache diagnosis and cache-key remedy, but failed the exact checks for the three evidence fields. It scored 2/5.</li>
<li><strong>Gemma 4 12B</strong> returned the database-schema diagnosis and an alter-database remedy. It also missed the three exact evidence fields, scoring 0/5.</li>
</ul>
<p>The archived Gemma response used “database_schema” and “alter_database”. Those were not interpretations added by the scorer. They were the model's returned choices.</p>
<p>This does not isolate the model's internal failure mechanism. It demonstrates an observable input-sensitivity problem: under these settings, a smaller version of the same evidence produced a different, unsupported repair recommendation.</p>
<h2>Check extraction separately from diagnosis</h2>
<p>The other incident tasks help put that example in context. In the duplicate-webhook case, both models still chose the expected remedy on the small image, but neither copied the trace identifier exactly. A plausible fix can therefore coexist with an unusable reference to the evidence. In the migration-lock case, both models passed every field check in all three conditions.</p>
<p>Across the three simulated incidents, each input condition had 15 field checks per model:</p>
<table>
<thead>
<tr>
<th>Input condition</th>
<th>Qwen3.5 9B</th>
<th>Gemma 4 12B</th>
</tr>
</thead>
<tbody><tr>
<td>Original screenshots</td>
<td>15/15</td>
<td>15/15</td>
</tr>
<tr>
<td>Exact text</td>
<td>15/15</td>
<td>15/15</td>
</tr>
<tr>
<td>320-pixel screenshots</td>
<td>11/15</td>
<td>9/15</td>
</tr>
</tbody></table>
<p>These are field-check totals, not 15 independent incidents or an estimate of real-world accuracy. Some failures were exact-string mismatches; others changed the diagnosis itself. Keeping those categories visible is more useful than collapsing everything into a model ranking.</p>
<h2>A small evaluation you can adapt</h2>
<p>Before using a model to recommend incident repairs, build a fixture where you already know the relevant evidence and expected conclusion.</p>
<ol>
<li><strong>Preserve the source.</strong> Keep the original log text and image. Remove credentials and personal data before sharing logs with any service.</li>
<li><strong>Test the input path.</strong> Send the original image, the image at the size your application actually delivers, and the equivalent text. Keep the prompt and model settings matched.</li>
<li><strong>Request evidence fields first.</strong> Ask for the identifiers, versions, status codes, or timestamps that determine the diagnosis. Check them against the source rather than accepting a fluent explanation.</li>
<li><strong>Score the conclusion separately.</strong> Record whether the cause and proposed remedy follow from the verified fields. A wrong identifier and a wrong repair deserve different handling.</li>
<li><strong>Stop on disagreement.</strong> If the extracted facts differ between image and text, resolve that discrepancy before allowing a repair. Preserve visual context when layout matters, but include copyable text when available.</li>
<li><strong>Validate the repair independently.</strong> Use a safe reproduction or test environment. A correctly formatted JSON response is not evidence that its recommendation is safe to execute.</li>
</ol>
<h2>Scope and reproducibility</h2>
<p>The recorded incident runs used Ollama 0.40.15, local Q4_K_M builds, an RTX 5060 Ti with 16 GB VRAM, thinking disabled, temperature 0, seed 42, and an 8,192-token context. The request configuration included a 1,024-output-token ceiling; the archived responses completed with the stop reason. There was one request per model per condition, for 18 incident responses in total.</p>
<p>The results apply to these fixtures, installed builds, and settings. They do not establish that one model is generally better or that text input always succeeds. The practical takeaway is narrower: verify the evidence a model read before trusting the repair it recommends.</p>
<p>The <a href="https://www.youtube.com/watch?v=JrYZGMeYop4">full six-task comparison</a> shows the incident results alongside the generated artifacts. Model references linked in the episode: <a href="https://huggingface.co/Qwen/Qwen3.5-9B">Qwen3.5 9B</a> and <a href="https://huggingface.co/google/gemma-4-12B-it">Gemma 4 12B</a>.</p>
<p><em>AI assistance disclosure: This article was drafted with AI assistance and checked against the episode script, original simulated fixtures, archived requests and responses, and field-level scoring records. The evaluation above is the channel's recorded experiment, not a new run performed for this article.</em></p>
]]></content:encoded></item><item><title><![CDATA[Git bisect exit code 125: distinguish a broken test from a broken commit]]></title><description><![CDATA[Learn why git bisect can blame the wrong commit, when to return exit code 125, and how a portable probe distinguishes setup errors from regressions.]]></description><link>https://fluidcodingai.hashnode.dev/git-bisect-exit-code-125-distinguish-a-broken-test-from-a-broken-commit</link><guid isPermaLink="true">https://fluidcodingai.hashnode.dev/git-bisect-exit-code-125-distinguish-a-broken-test-from-a-broken-commit</guid><category><![CDATA[Git]]></category><category><![CDATA[debugging]]></category><dc:creator><![CDATA[Fluid Coding & AI]]></dc:creator><pubDate>Thu, 12 Nov 2026 15:38:29 GMT</pubDate><content:encoded><![CDATA[<p>A regression search can produce a precise commit hash for the wrong problem. The dangerous step is often not Git's search algorithm; it is the wrapper deciding what “bad” means.</p>
<p>In our five-commit discount demo, the first wrapper blamed commit C. A better probe found D. The price calculation was still correct at C, but a missing test fixture prevented the original check from reaching it.</p>
<p>This companion explains how to separate a failed assertion from a test that could not run, and why an honest skip sometimes leaves more than one candidate.</p>
<h2>Watch the three searches</h2>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=zJNdg9vyecg">https://www.youtube.com/watch?v=zJNdg9vyecg</a></p>

<p>The video is <strong>Git Bisect Blamed the Wrong Commit. Here's Why.</strong> The example below comes from its recorded local demo, not an AI-model benchmark.</p>
<h2>One history, two different questions</h2>
<p>The program accepts a price in integer cents. For an input of 1000, the expected discounted output is 900.</p>
<ul>
<li><strong>A:</strong> establishes the discount; output is 900.</li>
<li><strong>B:</strong> documents integer cents; output is still 900.</li>
<li><strong>C:</strong> removes the test fixture, case.json, but does not break the calculation.</li>
<li><strong>D:</strong> introduces the discount regression and restores the fixture; output becomes 1000.</li>
<li><strong>E:</strong> updates the README; the regression remains.</li>
</ul>
<p>The naïve wrapper loads the fixture before launching the price program. At C, loading the missing file fails. The wrapper returns status 1, so Git records C as bad without the price program ever running there. B passes, and the search identifies C as the first bad commit.</p>
<p>That answer is consistent with the wrapper's question: “Did anything in this test procedure fail?” It is not an answer to the intended question: “Did the discount calculation regress?”</p>
<h2>The exit-code contract</h2>
<p>For <strong>git bisect run</strong>, the Git manual defines these outcomes:</p>
<table>
<thead>
<tr>
<th>Probe exit status</th>
<th>Meaning to Git</th>
</tr>
</thead>
<tbody><tr>
<td>0</td>
<td>This revision is good</td>
</tr>
<tr>
<td>125</td>
<td>This revision cannot be tested; skip it</td>
</tr>
<tr>
<td>1–127, except 125</td>
<td>This revision is bad</td>
</tr>
<tr>
<td>Other status codes</td>
<td>Abort the bisect process</td>
</tr>
</tbody></table>
<p>In this demo, status 1 deliberately represents a completed check whose actual price differs from the expected price. Status 125 represents an untestable revision.</p>
<p>Do not blindly forward every subprocess failure as a bad result. For example, shell statuses 126 and 127 usually indicate execution problems, yet fall inside Git's bad-result range. Your wrapper needs an explicit policy for setup failures, unavailable dependencies, and genuine reproduction of the target bug.</p>
<h2>What skipping C actually proves</h2>
<p>In the second run, the same missing fixture returns 125 instead of 1. Git skips C. B passes, and D runs successfully but returns 1000 instead of 900.</p>
<p>The result is not “D is definitely the culprit.” Git reports <strong>C or D</strong> as possible first bad commits. There is still no measurement at C, which sits beside the first observed failure.</p>
<p>That uncertainty is useful information. Exit code 125 does not repair the revision, prove it correct, or guarantee a unique culprit. It prevents a missing observation from being mislabeled as evidence of the regression.</p>
<h2>Make the probe independent where possible</h2>
<p>The third run removes an unnecessary dependency on repository history. In this particular demo, the fixture only contains the input and expected result, so the external probe supplies those same values directly: 1000 in, 900 expected.</p>
<p>It still executes the actual price program from each checked-out revision. It does not substitute a modern implementation or inspect the commit label to guess the answer.</p>
<p>Now C produces 900 and passes. D produces 1000 and fails. Git identifies D, and the recorded direct checks across all five revisions confirm the same boundary.</p>
<p>The general lesson is to keep the question stable while the implementation changes. An external test harness can help when historical checkouts lose fixtures or test infrastructure. It must still exercise the behavior you are investigating, and its assumptions must remain valid for those revisions.</p>
<h2>A checklist before automating the search</h2>
<ol>
<li><strong>Define the regression narrowly.</strong> Write down the input, expected behavior, and what observation counts as failure.</li>
<li><strong>Check both endpoints with the same probe.</strong> Confirm that the known-good revision passes and the known-bad revision reproduces the target problem.</li>
<li><strong>Test a setup failure on purpose.</strong> Confirm that an unavailable fixture does not silently become an assertion failure.</li>
<li><strong>Keep the probe outside the changing checkout when appropriate.</strong> Avoid losing the runner itself as Git switches revisions.</li>
<li><strong>Save the evidence.</strong> Record revision, input, actual output, expected output, and exit status; keep the bisect log too.</li>
<li><strong>Preserve ambiguous results.</strong> If Git returns multiple candidates, report them until additional testing closes the gap.</li>
</ol>
<p>The same checklist applies when a coding agent runs the investigation. Ask for the check that actually executed at the alleged culprit, not just the final hash.</p>
<h2>Source and scope</h2>
<p>See the <a href="https://git-scm.com/docs/git-bisect#_bisect_run">official git bisect documentation</a> for the full exit-code contract and skipped-commit behavior.</p>
<p>The video's recorded demo used Git for Windows 2.53.0.windows.3 and Python 3.12.10. Its three search traces and per-revision checks were used to verify this article. The example isolates one regression in a small linear history; it does not establish that every real-world history has one clean good-to-bad transition.</p>
<p><em>AI assistance disclosure: This companion article was prepared with AI assistance and checked against the video's script, recorded demo results, and Git documentation.</em></p>
]]></content:encoded></item></channel></rss>