What AI-SLOP Detector 3.17.0 Was Actually Measuring - Three Months of Corrections, Part 1

What AI-SLOP Detector 3.17.0 Was Actually Measuring - Three Months of Corrections, Part 1

●4 ●56 ●131
calendar_today ago • schedule14 min read

Why We Spent Three Months Fixing What We Assumed Worked

A Go file with five panic() calls got a deficit score of 100 and three critical findings. Our hard CI gate returned exit code 0 and let it through.

The analyzer had seen the problem. The gate ignored the language that produced it. That was v3.15.1, and it took a patch release to fix. It was also not the only time in these three months that a reassuring result turned out to be wrong.

In August I wrote A Clean Score Is Not a Complete Scan (also on flamehaven.space), about v3.8.9 and the danger of presenting an incomplete measurement as a clean result. I didn't publish again until now. Between the v3.8.9 and v3.17.0 tags there are 271 commits, and most of them were not new features. They were corrections to things we had assumed.

This is that development log, in two parts. Part 1 covers October and early November: what the detector counted as evidence, how its complexity rules were measuring formatting, and how tightening precision exposed a recall problem. Part 2 covers the November work on reports, on our own tests, and on the release itself.


Where it ended: the v3.17.0 release

On November 19 we released v3.17.0. On the release tag (4781ca7) the CI/CD pipeline completed all 14 jobs, and both publication jobs (PyPI and npm) succeeded.

Python CI environment Passed Skipped Failed Reported coverage
3.8 2,244 51 0 92%
3.9 2,244 51 0 95%
3.10 2,244 51 0 95%
3.11 2,244 51 0 95%
3.12 2,276 28 0 95%

These are the pytest summaries from the release CI run: 11,252 passing test executions across the matrix (executions, not unique tests). Python 3.12 also ran a 12-test REST write-policy check. The JS/TS, Go and Rust analyzer jobs, the Rust accelerator, the npm wrapper, the VS Code checks, lint and type checks, the self-scan and the Docker build all passed. The publication run shipped the packages.

The self-scan recorded a weighted deficit score of 4.42/100 on the detector's own source. That shows the detector runs on its own code; it is not a quality certificate. Coverage is not detection accuracy either.


How to read the numbers in these two articles

Every number below comes from a maintainer-run study with its own scope and denominator. Please read them with four rules in mind:

  • They don't add up. A replay on eighteen repositories, a fixture corpus of 51 functions and a mutation campaign of 25 variants measure different things. I never sum them into one accuracy figure, and you shouldn't either.
  • A removed finding is not a fixed defect. When a rule change removes 1,551 findings, that is a change in what the rule counts after its measurement was corrected, not 1,551 bugs judged one by one.
  • We wrote the fixtures and the labels. A fixture corpus tells us whether a known case is covered. It cannot establish real-world precision or recall.
  • Repository studies are anonymized. I report aggregates; repository identities and the internal corpus are not published. The one public experiment (on the 3.14.2 wheel) has its script and raw results available.

TL;DR

  • October: we corrected what counted as evidence (imports, claims, path facts), fixed complexity rules that were measuring formatting (1,551 findings removed in a replay on 18 repositories), and found that our precision work had hidden plausible-looking functions that do nothing.
  • November: reports became something to test, our own mutation campaigns caught surviving bugs in the tests, an adversarial run found bugs in the harness as well as the product, and a release comparison turned up a real cache bug in a published version.
  • v3.17.0: a terminal summary that fits one screen, corrected fix suggestions, and clearer gate decisions, with findings and scoring unchanged.

Release Date (2026) What changed
3.8.9 Aug 22 Incomplete scan coverage and unavailable capabilities made visible
3.9.0–3.9.3 Oct 3–9 Analysis evidence, claims vs. structure, scoring contracts, false nesting and silently omitted files
3.10.0–3.10.1 Oct 11–14 Precision replays on 18 repositories; logical lines and nesting
3.11.0 Oct 23 One scan service behind CLI and programmatic interfaces
3.12.0–3.13.0 Oct 26–Nov 8 Recall for functions that do no work; deliberate defaults and framework hooks
3.14.0–3.14.2 Nov 12 Reports rebuilt; an unscored hollow-code review channel
3.15.0–3.15.2 Nov 13 Reports read back; missing language findings; the multilingual CI gate
3.16.1–3.16.3 Nov 17–18 Rust; Go and JS/TS lexical fixes; no-network test; calibration; a cache bug
3.17.0 Nov 19 Developer workflow, fix suggestions, gate decisions

Version-by-version details: CHANGELOG at v3.17.0 and release notes.

Alongside the unit suite, we ran the detector on real repositories throughout, compared its output before and after each rule change, read the changed findings in their source, and exercised the CLI and the editor the way a developer would. A fixture tests a case we already know. A real repository brings conventions from another engineering discipline. We needed both.


October 3–9: correcting what counted as evidence

v3.9.0 bundled 34 commits. One result from scanning our own repository set the tone: the import graph had contained one edge. After we fixed resolution for real project layouts, it contained 285. Nothing new had broken; the graph had simply been wrong.

The fixes covered src/ layouts, namespace packages, relative imports and dotted names. Type-checking-only imports no longer created runtime cycle edges. We also tested synchronous and asynchronous placeholder bodies against each other: a function did not earn an exemption just because it was async def.

There was a second correction I owe readers. Some classifier metrics we had published earlier were not measured on held-out data; the evaluation split happened after fitting. We moved the split before fitting and added leave-one-repository-out evaluation over seven repositories. The pooled accuracy was 0.7972, but the target labels were the detector's own score classification, so it measured agreement with those labels, not recognition of bad code. The changelog records that distinction.

v3.9.1 looked at textual claims. A string used as data is not documentation promising an implementation. On nine codebases the recorded jargon count went from 1,332 to 479 once the scope was corrected; the 853 removed hits had all been in code. Structural evidence was separated from weak or unavailable evidence, and every consumer got the same path facts instead of guessing file roles on its own.

v3.9.2 asked whether the same scan meant the same thing on every output surface and under different execution conditions. On nine codebases, JSON and hard-gate JSON replays gave 18/18 identical outputs across the cache, hash-seed and discovery conditions we tested. At that checkpoint the release notes record 1,154 tests per Python version in the 3.8–3.12 matrix.

Then we scanned twelve repositories outside the detector: mature libraries, machine-learning research, web and API applications, finance, numerical software, command-line tools, TypeScript and agent projects. They exposed a class of errors our fixtures had never contained.

Python represents an elif as an If inside the previous node's orelse. Our nesting calculation counted that AST shape as extra depth, so a flat dispatch chain could be reported as deeply nested:

# Simplified example of the shape in the regression controls.
def dispatch(kind):
    if kind == 0:
        return "a"
    elif kind == 1:
        return "b"
    elif kind == 2:
        return "c"
    return "other"

An elif is still a decision; it is not another level of nesting. We added controls for flat chains and for genuinely nested if statements. The same study found typed @overload signatures with ... being reported as unfinished code.

The v3.9.3 replay on eleven Python repositories removed 1,158 elif-only nesting findings and 35 overload findings, and corrected the depth of 550 more. It also found a file-loss path: under memory pressure, one scan dropped 167 Python files from both the results and the coverage count. After the patch, failed files are visible instead of letting a smaller project pass unnoticed.

The controls are in test_v393_precision_contract.py.


October 11–14: complexity was measuring formatting

The eighteen-repository replay found more. Large literal tables and multiline SQL or call arguments inflated function length. A try or with wrapper added nesting even when the decision structure was simple.

Here is a test adapted from tests/test_structural_measurement.py:

lines = ["def target(x):", "    total = 0"]
for i in range(4):
    lines += [f"    if x > {i}:", f"        total += {i}"]
lines += ["    table = {"]
lines += [f"        'k{i}': {i}," for i in range(60)]
lines += ["    }", "    return total, table"]
source = "\n".join(lines) + "\n"

The function has four branches and a 60-entry dictionary. The table takes many physical lines, but it is one assignment. The negative control requires no god_function finding for this shape; a positive control keeps a genuinely long run of statements reportable.

We switched to logical lines, limited nesting increases to control structures, and replayed the same eighteen repositories:

Rule Findings removed Findings added
god_function 608 0
nested_complexity 471 0
deep_nesting 472 0
Total 1,551 0

One finding can count under more than one rule, so this is the change in three categories, not 1,551 distinct places.

The v3.10.0 pass before it had removed 285 placeholder-family findings where real implementation context had been missed, informed by rescans of three research codebases. And one change mattered directly for the August article: a project in which no file could be analyzed is no longer treated as a successful measurement. Coverage gained measurement_state and score_valid, so a user can tell a number from evidence that the number means something.

v3.10.0 also made the scanner faster, without parallel execution. It removed repeated work at three levels: the project is walked once per scan instead of once per consumer, each module's AST node list is built once and shared by the module-wide checks, and claim scanning compiles its patterns once and skips lines that can't match.

Codebase Before v3.10.0 Speed-up
A, cold 33.09 s 10.92 s 3.03x
A, warm 10.24 s 3.24 s 3.16x
B, cold 11.05 s 4.31 s 2.56x
B, warm 1.55 s 0.78 s 1.99x

The acceptance test was the output, not the clock: the JSON stayed the same except for which files the bounded excluded-file sample listed, and in what order. Regression tests now count project walks (exactly one per scan) and check AST reuse, discovery equivalence and exclusion behavior. These are historical maintainer measurements, not a v3.18.0 benchmark; the implementation gets its own article.

Source: structural regression controls.


October 23–26: precision work had hidden a recall problem

v3.11.0 put every interface behind one scan service and deliberately changed no findings or scores. Its verification broke the implementation in 25 different ways, and the selected regression controls caught all 25.

When we went back to detection, a small, realistic module exposed something more basic. It had a fraud screen that always returned 0.0, a gateway that always returned True, and an exception handler that reported success. It was lint-clean. On v3.11.0 it scored clean 1.0.

The stub rule looked for a body that was essentially one constant return. One logging line in front was enough to hide it:

# Illustrative reduction of the tested failure shape.
def fraud_score(transaction):
    logger.info("Evaluating transaction risk")
    return 0.0

Instead of adding a broad rule, we built an experiment: seven modules covering payments, storage, authentication, HTTP clients, data pipelines, inference and placeholders, with 51 labeled functions. 29 were deliberately hollow and 22 were genuine controls of similar shape. All passed default Ruff checks. A function counted as caught when a pattern finding landed inside its source span.

The fourth point is the November 9 follow-up described below.

Checkpoint Hollow functions caught Genuine controls flagged
v3.11.0 4/29 0/22
First correction 12/29 0/22
Second development candidate 18/29 0/22

These are candidate-stage results on our own fixtures.

So we replayed each candidate on fourteen public repositories and read every new finding in its source. The first stub-rule version added six findings; we judged one of them genuine. Callbacks registered by value and dispatch-table entries explained most of the rest.

A rule for failures reported as successes produced 158 new findings on its first try. That was unusable: intentional fail-open and fail-closed designs, and return values that merely look like failures, resemble the real thing closely. Narrowing the contract brought the count to 16, then 19; the final first-stage candidate added two findings, both judged genuine.

The ignored_parameter rule took the longest. Successive candidate counts were 1,006, 377, 282, 144, 139 and 132. We had to account for logging, nested scopes, compatibility parameters, command-handler signatures, and the difference between reading a parameter and only rebinding its name. In a 33-item review sample, 23 findings were genuine, five unclear and five false alarms. That is a bounded sample, not a precision estimate.

The narrowing had a cost we accepted on purpose: some hollow fixture cases are now missed because the same shape is legitimate in real code. v3.12.0 shipped the detection changes, and v3.13.0 continued with null objects, framework hooks and base-class defaults. The goal was rules specific enough to be useful, not the largest possible finding count.

The historical fixtures are in the v3.12.0 recall corpus; the counts above come from retained maintainer records.


November 8–9: professional-domain code

By November, a passing fixture was no longer enough to justify a detection change. We needed to see what happened when a real repository used the same construct for a different purpose.

Across the period, the repository studies covered mature libraries, numerical and financial software, biomedical research, healthcare integration, document processing, machine-learning infrastructure, visual AI workflows, web applications and command-line tools. These were real codebases scanned by the detector. The October experiment, by contrast, used seven simulated modules to test specific shapes; the two kinds of evidence should not be confused.

One November integration experiment used seven repositories from five application areas:

Application area Repository targets Analyzed files
Biomedical research software 2 154
Healthcare integration 1 124
Document indexing and processing 2 222
ML inference and cache infrastructure 1 334
Visual AI workflows 1 677
Total 7 1,511

We alternated two detector versions, three read-only scans per version on the same interpreter. All 42 runs exited 0 with no traceback; Part 2 describes what changed between them. The application areas are editorial groupings of the targets; we measured the software, not anyone's production use of it.

The same integration report records 27 command-line checks, run through the terminal and pipes the way a developer would use the tool:

Workflow Result at the integration checkpoint
Summary, details, quiet and single-file scanning Completed; terminal formatting adapted to the tested Windows encoding
JSON and JSON Lines Parsed
Markdown, HTML, PDF and bundled reports Requested files written
Score threshold and soft CI gate Exit codes 1 and 0 as expected
Read-only scan with an output-file request Rejected with exit code 2
Nonexistent target Exit code 1, no traceback
Piped output and no-history mode No escape sequences in the output; no history file written

The PDF check used a browser already installed in the test environment.


Testing the analysis against Python itself

Some questions can't be settled by a score. In a static method, a parameter called self is just a parameter; it need not be an instance of the class. Class decorators and metaclasses can replace the method that actually runs. We ran small Python programs to establish what the interpreter really does and compared that with the detector's static assumptions.

The regression comparison that followed covered 35,577 Python files in an internal corpus. One correction for class transformations changed 903 call-resolution decisions in the expected direction without adding or removing a finding, and its mutation campaign caught 77 of 77 variants.

Then we went back to October's 29 hollow functions and 22 controls. On November 9 the result moved from 18/29 to 19/29, still with no alarm on the controls, and the always-pass check went from four of five examples to five of five. A replay over 1,668 previously labeled genuine functions found no new findings from the changed semantic rules. That checks for regressions in a labeled set; it does not show zero false positives. The focused suite passed 92 tests on each of two Python versions, and 22 of 22 selected mutants were caught.

What mattered was the loop: a change could be tried on a real interpreter, checked against known examples, and replayed against a much larger body of source before we moved on.


In Part 2: the November work. Reports became something we had to test, our own tests went on trial (and two broken implementations survived them), an adversarial run found bugs in the harness as well as the product, the Go gate story from the top of this article, and a release comparison that turned out to be wrong in an instructive way. It ends with what v3.17.0 delivers and with the release that went out today.


AI-SLOP Detector — Install & Get Started

Free. Open source. MIT licensed.

  • GitHub — Source Code & Releases

https://github.com/flamehaven01/AI-SLOP-Detector

  • Run Without a Project Installation

uvx ai-slop-detector scan .

  • PyPI / Python CLI

pip install ai-slop-detector

slop-detector scan .

https://pypi.org/project/ai-slop-detector/

  • npm / Node.js

npm install --save-dev ai-slop-detector

npx ai-slop-detector scan .

The npm package provides a wrapper around the Python analysis engine.

https://www.npmjs.com/package/ai-slop-detector

  • VS Code Extension

https://marketplace.visualstudio.com/items?itemName=Flamehaven.vscode-slop-detector

  • AI Agent Work Orders

slop-detector scan . --format ai-md

Generate SHA-256-bound findings, VERIFY questions, and structured repair instructions.

  • CI/CD & Automated Quality Gates

slop-detector scan . --ci-mode hard --ci-report

Integrate structural analysis into your development pipeline.

  • Claude Code Integration

https://github.com/flamehaven01/AI-SLOP-Detector/tree/main/claude-skills/slop-detector

  • Documentation & Full Usage Guide

https://github.com/flamehaven01/AI-SLOP-Detector/blob/main/docs/GUIDE.md

Want more #opensource & #clean-code deep dives?

Join 6,023+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

Part 6 of 6 in AI-Slop-Detector

More Posts

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

StarlingX 13.0 Turns Two Edge Upgrades Into One Reboot. Test the Targets Yourself.

Tom Smithverified - Nov 24

AI-SLOP Detector v3.18.1

Flamehaven - Nov 25

3.5 best practices on how to prevent debugging

Codeac.io - Dec 18, 2025
chevron_left
5.4k Points • 191 Badges
South Korea • flamehaven.space
72Posts
38Comments
33Connections
Founder designing Sovereign AGI & Scientific AI systems — governance, reasoning models, medical/phys... Show more

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!