<?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: dragonhound</title>
    <description>The latest articles on DEV Community by dragonhound (@dragonhound).</description>
    <link>https://dev.to/dragonhound</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%2F4274381%2F852d92bc-6bae-4a12-abbd-1dd43203b50b.png</url>
      <title>DEV Community: dragonhound</title>
      <link>https://dev.to/dragonhound</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dragonhound"/>
    <language>en</language>
    <item>
      <title>One night with my LLM code auditor: 27 findings, 5 wrong, 11 fixes proven by a failing test</title>
      <dc:creator>dragonhound</dc:creator>
      <pubDate>Tue, 01 Dec 2026 05:03:28 +0000</pubDate>
      <link>https://dev.to/dragonhound/one-night-with-my-llm-code-auditor-27-findings-5-wrong-11-fixes-proven-by-a-failing-test-4chn</link>
      <guid>https://dev.to/dragonhound/one-night-with-my-llm-code-auditor-27-findings-5-wrong-11-fixes-proven-by-a-failing-test-4chn</guid>
      <description>&lt;p&gt;When I started scanning my repos with an LLM, fewer than a third of its findings were real. The current prompt's findings are real about three times in four, and on the night below 22 of 27 were right.&lt;/p&gt;

&lt;p&gt;Every night &lt;a href="https://github.com/smk762/ai-code-auditor" rel="noopener noreferrer"&gt;ai-code-auditor&lt;/a&gt; reads each repo in my Argus suite and writes up every problem it finds as a work pack: the code, what to change, and how the change will be judged. Coding agents claim a pack, fix it and send the patch back, and a fix counts only when a test fails before the patch and passes after it.&lt;/p&gt;

&lt;p&gt;This post follows that night through the loop, from scan to merged pull request. The &lt;a href="https://auditor.dragonhound.dev/" rel="noopener noreferrer"&gt;Auditor demo&lt;/a&gt; replays it pack by pack, with every diff and test result.&lt;/p&gt;

&lt;h2&gt;
  
  
  One night, one repo
&lt;/h2&gt;

&lt;p&gt;On 23 November at 17:30 UTC the nightly scan read &lt;a href="https://docs.dragonhound.dev/packages/scout/" rel="noopener noreferrer"&gt;argus-scout&lt;/a&gt;, one of 31 repos that night, and wrote 27 work packs. At 04:35 the next morning an agent claimed them. A claim is exclusive, so a second agent asking for the same pack is refused. By 04:56 every pack was closed one way or another, and at 08:13 &lt;a href="https://github.com/smk762/argus-scout/pull/34" rel="noopener noreferrer"&gt;the pull request&lt;/a&gt; was merged by hand, one commit per fix.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;How the pack ended&lt;/th&gt;
&lt;th&gt;Packs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Proven&lt;/strong&gt;: a test fails on &lt;code&gt;dev&lt;/code&gt; and passes with the fix&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test-only change, its tests ran&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Waiver&lt;/strong&gt;: resolved on a written reason&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wrong finding, closed as wontfix with a note&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;All findings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;27&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The demo counts these from the packs themselves, and its build fails if a pack is left out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What counts as a fix
&lt;/h2&gt;

&lt;p&gt;An agent's patch goes to &lt;code&gt;validate_patch&lt;/code&gt;, which never touches the live checkout. It exports a clean copy of the &lt;code&gt;dev&lt;/code&gt; tip, applies the patch to a second copy, finds the project each changed file belongs to, and runs that project's tests on both. Only failures the patch introduces count against it.&lt;/p&gt;

&lt;p&gt;For a bug or security finding that isn't enough. The patch has to bring a test that &lt;strong&gt;fails on &lt;code&gt;dev&lt;/code&gt; and passes with the fix&lt;/strong&gt;, and anything less leaves the pack &lt;em&gt;unverified&lt;/em&gt;, which is still open work. A pack lands in one of four states:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;resolved&lt;/strong&gt;: a test fails on &lt;code&gt;dev&lt;/code&gt; and passes with the patch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;unverified&lt;/strong&gt;: the tests pass but nothing proves the fix, so the pack stays open&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;resolved on a recorded waiver&lt;/strong&gt;: a person-readable reason, stored with the pack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wontfix&lt;/strong&gt;: the finding was wrong, closed with a note&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is one of the eleven. The scan noticed that scout's &lt;code&gt;prune()&lt;/code&gt; deleted acknowledged events even while their source was still reporting them, so after the retention window an ongoing, already-acknowledged problem came back as unread news. The fix added one condition to the query and one test. On &lt;code&gt;dev&lt;/code&gt; the test failed, with the fix it passed, and the other 28 tests in that file passed on both.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ty6tcj2gai0fk5uon3b.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ty6tcj2gai0fk5uon3b.webp" alt="The demo's &amp;quot;How it was judged&amp;quot; panel for the prune fix: Proven, 1 test fails on dev and passes with the fix, test_prune_keeps_an_acked_event_its_source_still_reports, failed on dev and passed on dev plus the patch, and 28 other tests with the same result on both trees." width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every proven fix &lt;a href="https://auditor.dragonhound.dev/packs/pack-argus-scout-42dfbd5968/" rel="noopener noreferrer"&gt;on the demo&lt;/a&gt; has a panel like this one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ten fixes rest on a waiver
&lt;/h2&gt;

&lt;p&gt;Eleven findings that night were about weak tests: a guard that only caught one import style, an assertion that could pass with nothing to check, a migration test that never looked at old rows. The fix for each is a stronger test, and a stronger test passes on &lt;code&gt;dev&lt;/code&gt;'s code as well, because the code was never broken, so it can't show the failure the bar asks for.&lt;/p&gt;

&lt;p&gt;I kept it that way on purpose. When &lt;code&gt;validate_patch&lt;/code&gt; runs the "before" tree it copies the patch's test files across whole, because otherwise a change to a test helper could manufacture a failure on &lt;code&gt;dev&lt;/code&gt; and pass it off as proof. So a test-only patch resolves either as &lt;code&gt;test_only&lt;/code&gt;, when its tests run and pass, or on a waiver: a written reason of at least twenty characters, stored with the pack. One resolved as &lt;code&gt;test_only&lt;/code&gt;. Nine of the ten waivers say what the agent did instead:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Test-only finding: the fix strengthens a test, so the same test runs on both trees and passes on dev's source. Verified locally by mutation: the strengthened test fails when the guarded behaviour is broken, where the old one passed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The tenth admits the finding was mostly wrong: the old test did cover the unit it claimed to, and the change only makes that explicit. A waiver is visible on every pack page and never counts towards an agent earning more autonomy (more on that below). A later run can re-send a merged fix that rested on a waiver and record stronger evidence if it finds some, but never weaker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five findings were wrong
&lt;/h2&gt;

&lt;p&gt;The scan is a language model reading code, and that night it was wrong about 5 of 27 findings. Two examples, from the notes the agent left:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It flagged 24-bit audio written as 4-byte integers. That's deliberate: Snapcast stores 24-bit samples in 4-byte containers, and packing them into 3 bytes would garble playback.&lt;/li&gt;
&lt;li&gt;It said a module's &lt;code&gt;__all__&lt;/code&gt; exported a function the module never defined. The function is defined in that module, at line 25.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each was closed as &lt;code&gt;wontfix&lt;/code&gt; with its reason, which matters the next night. The scan re-found four of the five on 27 November and they stayed closed, because a wontfix pack is how a known false positive stays quiet, and the nightly clean-up only closes one when the code it cites is gone. That's a 19% false-positive rate for the night, and the demo shows all five with the agent's notes so you can judge them yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the scan got here
&lt;/h2&gt;

&lt;p&gt;Most of what the first version found was noise.&lt;/p&gt;

&lt;h3&gt;
  
  
  From a model that flagged everything to a stricter one
&lt;/h3&gt;

&lt;p&gt;From the first commit in March, a 33-billion-parameter code model on a home server read every function and class and was asked for "bugs, security issues, and maintainability problems", alongside Bandit, Semgrep and some hand-written architecture checks. When a model call failed, the scan quietly fell back to simple heuristics.&lt;/p&gt;

&lt;p&gt;On 13 November I moved the scan to cloud models, made a failed call stop passing itself off as a review, and switched to a new prompt: it drops style and maintainability, adds a severity rubric and a confidence bar, and caps each unit of code at five findings. I ran the old and new prompts on the same 50 units and had a judge model (Opus) score them blind:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Old prompt&lt;/th&gt;
&lt;th&gt;New prompt&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Findings&lt;/td&gt;
&lt;td&gt;315&lt;/td&gt;
&lt;td&gt;42&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precision: findings that were real&lt;/td&gt;
&lt;td&gt;29%&lt;/td&gt;
&lt;td&gt;76%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precision, medium severity and up&lt;/td&gt;
&lt;td&gt;43%&lt;/td&gt;
&lt;td&gt;83%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medium-and-up issues found, of 13 known&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It gave up one real issue for seven times fewer findings, and the cost per unit halved. The night above, at 22 right out of 27 (81%), sits close to that 76%.&lt;/p&gt;

&lt;h3&gt;
  
  
  The same issue keeps its pack
&lt;/h3&gt;

&lt;p&gt;The model rewords its titles every night, so one problem used to pile up as several open packs, and a claimed pack grew a fresh twin the next morning. Since 15 November a re-found finding on the same file is matched to its existing pack by title similarity and takes its id, so its status and any wontfix decision carry over. The first clean-up found 53 duplicates, and it's why the wrong findings above stayed closed when the scan re-found them.&lt;/p&gt;

&lt;h3&gt;
  
  
  More of the code gets read
&lt;/h3&gt;

&lt;p&gt;Until 18 November a function was reviewed without its decorators, and module-level code (route registration, import-time calls, &lt;code&gt;__main__&lt;/code&gt; blocks) was never reviewed at all unless the file had no functions. Both are read now, since that's where routes and auth checks tend to live.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unread files are recorded as unread
&lt;/h3&gt;

&lt;p&gt;From 18 to 20 November the model budget ran out partway through each night, and a file the model never reached returned no findings and still counted as scanned. The night's findings appeared to drop from 1,122 to 293 to 103, then jumped back to 835, and the clean-up closed packs on scans that had never looked at their code. Since 21 November every file the model didn't review is recorded, and nothing treats it as a fix.&lt;/p&gt;

&lt;h3&gt;
  
  
  From single findings to classes of mistake
&lt;/h3&gt;

&lt;p&gt;Fixing the same mistake one pack at a time doesn't stop the next one, so since 16 November each finding is sorted into one of 19 classes, and each class names the guard that could prevent it: a Ruff or Semgrep rule, a shared helper, an import contract. Matching titles with hand-written rules scored 98% precision on the findings those rules were written against, but 84% precision and 32% coverage on a blind held-out set, so I don't let it label packs. A class is now recorded only where three models (Haiku, Sonnet and Opus) agree: 95.3% precision and 86% coverage on the held-out set. A class with five or more open packs, or open packs in two or more repos, gets one guard pack whose deliverable is a CI rule with a proof test, and its instance packs close only once the scan stops reporting them. Guards are tested in turn by planting known instances of the mistake and checking the guard catches each one.&lt;/p&gt;

&lt;h3&gt;
  
  
  New detectors, held to the same bar
&lt;/h3&gt;

&lt;p&gt;The suite's shared CI rule catalogue runs in the scan (16 November), so a hit on one of its guard rules is also a finding. A detector for comments that admit a workaround ("HACK", "remove once…", a sleep and retry with a race-condition excuse) arrived on 23 November; every hit across the suite was labelled by hand, and four of the five were real, the fifth borderline. Since 24 November a structure scan reports import cycles inside each repo, report-only for now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rules that keep it honest
&lt;/h2&gt;

&lt;p&gt;The repo keeps a &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/CLAUDE.md#must-never-happen" rel="noopener noreferrer"&gt;"must never happen" list&lt;/a&gt;, and each line names the test that enforces it. A few that matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resolve a pack without evidence&lt;/strong&gt;: lint only, a bug fix with no test that fails on &lt;code&gt;dev&lt;/code&gt;, or tests that were all skipped.
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_evidence.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_evidence::test_decide&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_evidence_skips.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_evidence_skips::test_a_run_where_nothing_passed_is_unverified&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolve a pack on another pack's test.&lt;/strong&gt;
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_evidence.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_evidence::test_a_pack_never_resolves_on_another_packs_test&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read a scan's silence about a file it couldn't review as the issue being gone.&lt;/strong&gt;
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_blind_scans.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_blind_scans::test_blind_scans_never_close_a_pack_as_not_rescanned&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two agents holding the same pack.&lt;/strong&gt;
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_pack_write_integrity.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_pack_write_integrity::test_concurrent_claims_have_exactly_one_winner&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let a patch's tests see the host's secrets or service addresses.&lt;/strong&gt;
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_validate_child_env.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_validate_child_env&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open a PR touching auth, secrets, migrations or data deletion as anything but a draft.&lt;/strong&gt;
Enforced by &lt;a href="https://github.com/smk762/ai-code-auditor/blob/dev/tests/test_autonomy.py" rel="noopener noreferrer"&gt;&lt;code&gt;test_autonomy::test_irreversible_changes_never_go_above_draft_pr&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Autonomy is earned per repo and per kind of finding. An agent's pull request starts as a draft. A scope moves up at most one level per night, and only after its last 20 agent PRs came through clean, every pack resolved with real evidence (no lint-only results, no waivers), and 30 days at its current level. Any breach drops it a level. The ceiling is "ready for review", and nothing merges by itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can't do yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tell you what it missed.&lt;/strong&gt; Planted bugs measure the evidence bar and the static guards, but not the scan's recall, and a replay can only show what was reported.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get past a night's budget.&lt;/strong&gt; When the model budget runs out, the files it didn't reach are recorded as unreviewed, so that night has a known blind spot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove fixes outside Python and TypeScript.&lt;/strong&gt; Tests run for Python projects and npm checks for TypeScript and JavaScript. A bug fix in anything else has no test run to prove it, so it stays unverified.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  See it
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://auditor.dragonhound.dev/" rel="noopener noreferrer"&gt;Auditor demo&lt;/a&gt; has all 27 packs from this night: the finding as the scan wrote it, the work pack, its status history, the commit that closed it, and how it was judged. The source is &lt;a href="https://github.com/smk762/ai-code-auditor" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;, and the &lt;a href="https://docs.dragonhound.dev/packages/auditor/" rel="noopener noreferrer"&gt;docs page&lt;/a&gt; covers running it on your own repos.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://dragonhound.dev/updates/2026-11-28-auditor-one-night/" rel="noopener noreferrer"&gt;dragonhound.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>testing</category>
      <category>analytics</category>
    </item>
  </channel>
</rss>
