<?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: NEXADiag Nexa</title>
    <description>The latest articles on DEV Community by NEXADiag Nexa (@nexadiag_nexa_312a4b5f603).</description>
    <link>https://dev.to/nexadiag_nexa_312a4b5f603</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%2F3876562%2F2ff991c0-67fb-4f37-8301-458ceffbd8a9.png</url>
      <title>DEV Community: NEXADiag Nexa</title>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nexadiag_nexa_312a4b5f603"/>
    <language>en</language>
    <item>
      <title>How I caught a hardcoded API key that a Senior Expert missed (using Multi-LLM Consensus)</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Tue, 28 Jul 2026 16:05:01 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/how-i-caught-a-hardcoded-api-key-that-a-senior-expert-missed-using-multi-llm-consensus-4b4o</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/how-i-caught-a-hardcoded-api-key-that-a-senior-expert-missed-using-multi-llm-consensus-4b4o</guid>
      <description>&lt;p&gt;Last week, I decided to run a "Truth Test" on my latest project, &lt;strong&gt;Propulse&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I invited a Senior Infrastructure Expert to perform a manual security audit. He spent over an hour digging through the code. He did an amazing job, finding 27 vulnerabilities, including 4 critical ones related to Authentication and Session Storage.&lt;/p&gt;

&lt;p&gt;Then, I ran the same codebase through my consensus engine, &lt;strong&gt;NexaVerify&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The result? It took 12 seconds.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Human vs. Machine Showdown
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Human Expert&lt;/th&gt;
&lt;th&gt;NexaVerify (8-AI Consensus)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time Spent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~60 minutes&lt;/td&gt;
&lt;td&gt;12 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Issues Found&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;91 (validated by consensus)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Silent Killers&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Missed&lt;/td&gt;
&lt;td&gt;1 (Hardcoded Cloudinary API Key)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The "Invisible" Leak
&lt;/h2&gt;

&lt;p&gt;The most striking discovery wasn't in the logic files (&lt;code&gt;.tsx&lt;/code&gt; or &lt;code&gt;.ts&lt;/code&gt;). It was buried in a documentation file: &lt;code&gt;HANOUTI-GUIDE.html&lt;/code&gt; at line 662.&lt;/p&gt;

&lt;p&gt;NexaVerify flagged a &lt;strong&gt;Cloudinary API Secret&lt;/strong&gt; exposed in plain text inside a guide. Because humans (and most standard linters) often ignore the &lt;code&gt;/docs&lt;/code&gt; or static &lt;code&gt;.html&lt;/code&gt; folders during a rush, this leak had been sitting there for weeks. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Consensus Wins
&lt;/h2&gt;

&lt;p&gt;Why did the AI find it when the human missed it? It’s not because the AI is "smarter." It's because the AI doesn't get tired and my architecture forces &lt;strong&gt;Consensus&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;In this run, &lt;strong&gt;Gemini, Groq, and Cerebras&lt;/strong&gt; acted as a jury. When multiple models flag a pattern as a security risk, the signal overrides the noise. &lt;/p&gt;

&lt;p&gt;I also identified &lt;strong&gt;10 conflict zones&lt;/strong&gt; where the models disagreed. This is where I saved the most time: instead of re-reading 12,000 lines, I only focused on the areas where the AI jury was fighting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering &amp;gt; Vibe Coding
&lt;/h2&gt;

&lt;p&gt;We are moving away from the era of "asking an AI if the code is good." That's probabilistic gambling. &lt;/p&gt;

&lt;p&gt;The future is &lt;strong&gt;Multi-stage validation&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Triage&lt;/strong&gt; (Static scans)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-LLM Consensus&lt;/strong&gt; (Semantic reasoning)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime Reality&lt;/strong&gt; (Sandbox execution)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The machine didn't replace the expert; it prepared the ground for him. By automating the "obvious" and the "hidden" patterns, NexaVerify allowed me to spend my mental energy on architecture, not on hunting for hardcoded strings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many secrets are sleeping in your &lt;code&gt;/docs&lt;/code&gt; folder right now?&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Redha, Software Architect at NEXADiag. Building local-first tools for engineers who value determinism.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://nexaverify.netlify.app/" rel="noopener noreferrer"&gt;Test NexaVerify Beta here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>webdev</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Stress-testing my Multi-LLM engine: 93 chunks, 8 models, and one "Insufficient Balance" error.</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Sat, 25 Jul 2026 17:30:29 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/stress-testing-my-multi-llm-engine-93-chunks-8-models-and-one-insufficient-balance-error-3078</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/stress-testing-my-multi-llm-engine-93-chunks-8-models-and-one-insufficient-balance-error-3078</guid>
      <description>&lt;p&gt;Last week, I decided to push my consensus engine, &lt;strong&gt;NexaVerify&lt;/strong&gt;, to its absolute limits. I wanted to see if my architecture could handle a massive parallel load while maintaining high reliability.&lt;/p&gt;

&lt;p&gt;I chose to test it against a real-world infrastructure: the &lt;strong&gt;DEVUP AI Gateway&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files scanned:&lt;/strong&gt; 92&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logic Chunks:&lt;/strong&gt; 93 (split using my &lt;code&gt;ast_chunker.py&lt;/code&gt; logic)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jury:&lt;/strong&gt; 8 AI models running in parallel (including DeepSeek, Gemini, and Groq).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mode:&lt;/strong&gt; Full Consensus Audit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Results: A War of Latency
&lt;/h2&gt;

&lt;p&gt;The technical feedback was immediate. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Rate Limit Wall:&lt;/strong&gt; Giant providers like Groq and Gemini Flash hit the &lt;code&gt;429 Too Many Requests&lt;/code&gt; wall almost instantly due to the burst of parallel chunks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sovereign Stability:&lt;/strong&gt; The DEVUP Gateway (local Algerian infra) handled the rafale of requests with zero latency penalty. It proved that a dedicated circuit breaker at the cluster level is superior to generic API endpoints for mass audits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Real-Time Billing Test:&lt;/strong&gt; The scan ended when I hit a &lt;code&gt;402 Payment Required&lt;/code&gt; error. While frustrating, it was a victory: it proved the real-time DZD billing synchronization works perfectly under heavy load.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Lesson: Disagreement is the Signal
&lt;/h2&gt;

&lt;p&gt;Why run 8 models? Because when you are dealing with 30k+ lines of code, one AI's "Looks good" is a gamble. &lt;/p&gt;

&lt;p&gt;In this test, the engine found &lt;strong&gt;99 issues&lt;/strong&gt;. The killer signal wasn't the agreement, but the &lt;strong&gt;friction&lt;/strong&gt;. By forcing models to challenge each other (Adversarial Review), I reduced the noise and focused on the logic flaws that actually matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;I'm currently preparing &lt;strong&gt;v1.6.1&lt;/strong&gt; which will officially integrate Claude Opus 5 and Kimi K3 via the DEVUP infrastructure. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you handle AI hallucinations in your PRs? Do you trust a single model or do you use a validation layer?&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Redha, Software Architect at NEXADiag. Building local-first tools for engineers who value determinism.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://nexaverify.netlify.app/" rel="noopener noreferrer"&gt;Test NexaVerify Beta here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>llm</category>
      <category>performance</category>
      <category>testing</category>
    </item>
    <item>
      <title>Why I stopped asking one AI to review my code (and built a Consensus Engine instead)</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Tue, 21 Jul 2026 09:45:03 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/why-i-stopped-asking-one-ai-to-review-my-code-and-built-a-consensus-engine-instead-ebb</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/why-i-stopped-asking-one-ai-to-review-my-code-and-built-a-consensus-engine-instead-ebb</guid>
      <description>&lt;h1&gt;
  
  
  Why I stopped asking one AI to review my code (and built a Consensus Engine instead)
&lt;/h1&gt;

&lt;p&gt;We’ve all been there: You ask Claude or GPT-4o to review a Pull Request. It says "Looks good! ✨". You ship. Production crashes 10 minutes later. &lt;/p&gt;

&lt;p&gt;The problem isn't that the AI is bad; it's that it's &lt;strong&gt;probabilistic&lt;/strong&gt;. In engineering, we need &lt;strong&gt;determinism&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As a former Mechanical Designer turned Software Architect, I learned early that "looks right" is a recipe for disaster. One wrong dimension in a blueprint leads to a scrapped part. I applied this same "Short Leash" principle to my code by building a multi-LLM consensus engine.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The "Thinkslop" Trap
&lt;/h2&gt;

&lt;p&gt;Single-model code reviews are dangerous because LLMs tend to be "polite." They follow the path of least resistance. &lt;/p&gt;

&lt;p&gt;I call it &lt;strong&gt;Thinkslop&lt;/strong&gt;: code that looks fluent and compiles perfectly but is architecturally fragile or contains silent logic failures. When you rely on one model, you are essentially asking an intern to grade their own homework.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Why SAST isn't enough anymore
&lt;/h2&gt;

&lt;p&gt;Static Application Security Testing (SAST) tools like Sonar, Snyk, or Semgrep are essential. They are the "police" of code: they check your seatbelt and your tire pressure.&lt;/p&gt;

&lt;p&gt;But SAST is blind to &lt;strong&gt;intent&lt;/strong&gt;. It can't tell you if your dynamic import logic will fail in a specific production edge case. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consensus is the monitor of vital signs.&lt;/strong&gt; It doesn't just look for "illegal" code; it looks for &lt;strong&gt;inconsistency&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Power of Structured Disagreement
&lt;/h2&gt;

&lt;p&gt;In my tool, &lt;strong&gt;NexaVerify&lt;/strong&gt;, I force 8 different models (GPT-4o, Claude, Gemini, Groq, Cerebras, Mistral, etc.) to audit the same codebase in parallel.&lt;/p&gt;

&lt;p&gt;The real signal isn't when they all agree. &lt;strong&gt;The value is in the disagreement.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;If 7 models stay silent but one (like Cerebras or Groq) flags a potential &lt;code&gt;NameError&lt;/code&gt; in a sub-module, that's your most valuable data point. It forces the human architect to look exactly where the "AI brain" started to hallucinate.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Real World Result: The 30,103 Lines Test
&lt;/h2&gt;

&lt;p&gt;I recently ran a consensus scan on NexaVerify's own source code. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lines scanned:&lt;/strong&gt; 30,103&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issues found:&lt;/strong&gt; 99&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The "Killer" bug:&lt;/strong&gt; A silent &lt;code&gt;NameError&lt;/code&gt; in &lt;code&gt;app/config/constants.py&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because of a dynamic import, my local linter and a single pass with GPT-4o missed it. The consensus engine caught it because three different models couldn't agree on the scope of the global variables. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: From "Vibe Coding" to Engineering
&lt;/h2&gt;

&lt;p&gt;We are moving from "Coding with AI" to "Architecting with AI components." If you are building production-grade software, you can't trust a single oracle. You need a jury.&lt;/p&gt;

&lt;p&gt;I’m building &lt;strong&gt;NexaVerify&lt;/strong&gt; in public to tackle this trust gap. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s your current stack for AI code validation? Do you trust a single model or do you have a manual verification checklist?&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Redha, Software Architect at NEXADiag. I build local-first tools for developers who care about reliability.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://nexaverify.netlify.app/" rel="noopener noreferrer"&gt;Check out NexaVerify Beta here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>python</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I’m sick of AI “Thinkslop” in my PRs</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Wed, 15 Jul 2026 10:20:29 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/im-sick-of-ai-thinkslop-in-my-prs-e</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/im-sick-of-ai-thinkslop-in-my-prs-e</guid>
      <description>&lt;p&gt;I started my career as a “Dessinateur Projeteur” (Design Drafter) in mechanical engineering. In that world, if your plan is off by 1mm, the part is scrap. There is no “hotfix” for a piece of steel once it’s machined.&lt;/p&gt;

&lt;p&gt;When I started building my own software tools using LLMs, I brought that same paranoia with me. And honestly, it’s the only thing saving my codebases right now.&lt;/p&gt;

&lt;p&gt;Lately, I’ve been fighting a specific enemy: Thinkslop.&lt;/p&gt;

&lt;p&gt;It’s that code that looks “clean,” passes a linter, and even runs. But the logic is hollow. It’s the result of asking a single AI to “just fix this” and hitting copy-paste because you’re in a rush. It’s dangerous because it looks right.&lt;br&gt;
One model is not a code review&lt;/p&gt;

&lt;p&gt;I don’t care if you’re using Claude 3.5 Sonnet, GPT-4o, or a custom fine-tune. A single model has a single perspective based on its training. If the model is biased toward a specific pattern, it will confidently hallucinate a bug right into your production.&lt;/p&gt;

&lt;p&gt;Most devs think that if the AI says “Looks good!”, they are safe.&lt;br&gt;
The truth? The disagreement is the only signal that matters.&lt;br&gt;
The “Consensus” approach&lt;/p&gt;

&lt;p&gt;I got so tired of manually comparing browser tabs or doubting my own code that I started running my logic through 8 different models at once (Claude, GPT, Gemini, Llama, Groq, etc.).&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;When they all agree? It’s probably safe.
When Claude flags a potential memory leak but GPT doesn’t? That’s exactly where the real bug is hiding.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I built a local-first engine called NexaVerify to handle this orchestration for me. It doesn’t just “vote” on the code; it surfaces the friction. It highlights the spots where 8 different “brains” can’t agree on the architecture.&lt;/p&gt;

&lt;p&gt;I ran it on its own 26k line codebase last week. It found a NameError in a constant file that had been sitting there for a month. A single pass from GPT had missed it every time because the “vibe” of the code was correct.&lt;br&gt;
The takeaway&lt;/p&gt;

&lt;p&gt;Stop treating AI as an oracle. Treat it as a junior dev who is prone to lying but very fast at it.&lt;/p&gt;

&lt;p&gt;As a former “Dessinateur Projeteur,” I know that a structure is only as strong as its verified points. The only way to trust AI code is to force it into a consensus.&lt;/p&gt;

&lt;p&gt;How are you guys catching AI hallucinations before they hit prod? I’m curious if anyone else is building multi-model pipelines or if everyone is still just “vibe coding” and hoping for the best.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title># I stopped trusting a single AI for code review — here's</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Mon, 01 Jun 2026 18:45:41 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/-i-stopped-trusting-a-single-ai-for-code-review-heres-14dl</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/-i-stopped-trusting-a-single-ai-for-code-review-heres-14dl</guid>
      <description>&lt;h1&gt;
  
  
  I stopped trusting a single AI for code review — here's why
&lt;/h1&gt;

&lt;p&gt;We've all been there:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You ask GPT-4o or Claude 3.5 to review your PR.&lt;/li&gt;
&lt;li&gt;It says "Looks good!"&lt;/li&gt;
&lt;li&gt;You ship.&lt;/li&gt;
&lt;li&gt;Production crashes on an edge case the AI hallucinated its way past.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The problem isn't that AI makes mistakes. It's that we trust a &lt;strong&gt;single model&lt;/strong&gt;. Every family has blind spots — GPT overexplains but misses logic errors, Gemini is great at structure but weak on security patterns, Claude is thorough but sometimes invents APIs that don't exist.&lt;/p&gt;

&lt;p&gt;One model's "looks good" is just one vote.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-LLM consensus
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;NexaVerify v1.6.0&lt;/strong&gt; — a local-first Windows tool that runs your code through 8 AI engines in parallel (Claude, GPT-4o, Gemini, Groq, Cerebras, Mistral, OpenRouter, Ollama).&lt;/p&gt;

&lt;p&gt;The core idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agreement is noise.&lt;/strong&gt; If all models say it's fine, it probably is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disagreement is the signal.&lt;/strong&gt; When Claude flags a security risk but GPT ignores it — that's where you need to look.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every issue gets a confidence score based on how many providers confirmed it. Disagreements are surfaced, not buried.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proof by fire: scanning itself
&lt;/h2&gt;

&lt;p&gt;I ran v1.6.0 against its own 26,000-line codebase with 3 free-tier providers (Gemini, Groq, Cerebras).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;99 real issues found.&lt;/strong&gt; Including a potential NameError in constants.py and a missing try-except in main.py that would crash the app before logging initializes. The bug-finder had bugs — and it found them.&lt;/p&gt;

&lt;p&gt;The full report is &lt;a href="https://nexaverify.netlify.app/NexaVerify_SampleReport.html" rel="noopener noreferrer"&gt;live here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Under the hood
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dtq2iw1kdu0n0go81un.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dtq2iw1kdu0n0go81un.png" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3-stage JSON repair&lt;/strong&gt; — syntactic repair → fallback extraction → schema validation. Catches truncated LLM responses instead of silently returning &lt;code&gt;[]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RSA Proof Bundles&lt;/strong&gt; — every verdict carries a SHA-256 audit trail. Verifiable after the fact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local-first, BYOK&lt;/strong&gt; — your code and keys never touch my server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama support&lt;/strong&gt; — full offline consensus for sensitive projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free tier available today&lt;/strong&gt; — 3 analyses/day, 3 providers (Gemini, Groq, Cerebras), 10 files/scan.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No signup wall. Download, add your API keys, run.&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;Try it free or grab Pro (€19 lifetime):&lt;/strong&gt; &lt;a href="https://nexaverify.netlify.app/" rel="noopener noreferrer"&gt;https://nexaverify.netlify.app/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I ship solo. Every feature is driven by what early users actually need. What's your current workflow for verifying AI-generated code? Running a single pass, or already testing multi-model pipelines?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why JSON.parse() Fails Silently on Truncated LLM Responses (And What I Did About It)</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Wed, 13 May 2026 11:41:17 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/why-jsonparse-fails-silently-on-truncated-llm-responses-and-what-i-did-about-it-3681</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/why-jsonparse-fails-silently-on-truncated-llm-responses-and-what-i-did-about-it-3681</guid>
      <description>&lt;h1&gt;
  
  
  Why JSON.parse() Fails Silently on Truncated LLM Responses (And What I Did About It)
&lt;/h1&gt;

&lt;p&gt;If you've shipped anything that asks an LLM to return JSON, you've already hit this bug. You just may not have noticed.&lt;/p&gt;

&lt;p&gt;The LLM returns a response. Your code parses it. Most of the time it works. Sometimes it returns &lt;code&gt;{}&lt;/code&gt; and you assume the LLM didn't find anything. The reality is darker: the JSON was truncated mid-object, your parser silently failed, and your downstream code is now operating on an empty dictionary instead of the partial result the LLM actually produced.&lt;/p&gt;

&lt;p&gt;I lost six weeks to this bug. Here's what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;I run code review with multiple LLMs in parallel. Each one returns a JSON array of issues found:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
json
[
  {"file": "main.py", "line": 47, "type": "security", "severity": "high", "description": "..."},
  {"file": "main.py", "line": 89, "type": "smell", "severity": "low", "description": "..."}
]

When the LLM hits its max_tokens limit mid-response, the response gets cut off. You receive something like:
json

[
  {"file": "main.py", "line": 47, "type": "security", "severity": "high", "description": "..."},
  {"file": "main.py", "line": 89, "type": "smell", "seve

json.loads() raises JSONDecodeError. Most code catches the exception and returns []. The issues that WERE successfully parsed before the truncation are lost.
The dumb solution that actually works

You don’t need a streaming JSON parser. You need a bracket-counting repair function:
python

def guard_truncation(text: str, provider_id: str, file_path: str) -&amp;gt; str:
    stripped = text.strip()
    if not stripped.startswith("["):
        return text

    try:
        json.loads(stripped)
        return text  # already valid
    except json.JSONDecodeError:
        pass

    # find last complete object
    last_close = stripped.rfind("}")
    if last_close == -1:
        return "[]"

    # rebuild a valid array from the last complete object backward
    repaired = stripped[: last_close + 1] + "\n]"
    try:
        json.loads(repaired)
        return repaired
    except json.JSONDecodeError:
        return "[]"

It’s not elegant. It works. You recover 80-90% of the partial result instead of 0%.
The second bug that this revealed

Here’s where it gets worse.

My downstream code assumed every entry in the parsed list was a dictionary. Most of the time it was. But occasionally an LLM would return a string entry in the middle of the array:
json

[
  {"file": "main.py", "line": 47, ...},
  "I noticed there might be an issue here but I'm not sure",
  {"file": "main.py", "line": 89, ...}
]

My code did entry.get("file") on every entry. When it hit the string, AttributeError: 'str' object has no attribute 'get'. The exception was caught by a try/except too wide to be useful. The entire scan silently produced empty results for that file.

Six weeks. No error log. The only signal was “the report has fewer issues than usual for this codebase”.

The fix:
python

for entry in raw_issues:
    if not isinstance(entry, dict):
        continue
    # safe to call entry.get(...) here

Three lines. That’s it.
The bigger lesson

I don’t think LLM output should ever be trusted to match a schema. Even when you tell it “return valid JSON only”, you’ll get:

    Truncated JSON when you hit token limits
    Strings injected mid-array as informal commentary
    Wrong types in correct keys (line: "approximately 50" instead of line: 50)
    Extra keys not in your schema
    Missing required keys

The temptation is to use Pydantic or a JSON schema validator and reject malformed responses entirely. That’s the worst possible choice — you lose all the partial work the LLM did. The better choice is to repair what you can, type-check defensively at every step, and log what you couldn’t recover so you can iterate.

Three patterns that have saved me from similar bugs:

    Always isinstance(x, dict) before .get() on LLM-derived data. Always.
    Bracket-repair truncated JSON before declaring failure. 80% recovery beats 0%.
    Log what you discarded. If you silently filter bad entries, you’ll never know how often it happens. I now log every malformed entry with the provider name and file path.

Why this matters in 2026

Most teams treat LLM output as “either it works or it doesn’t”. The reality is closer to “it partially works most of the time, and the partial-failure modes are silent”. Production code that runs LLM output needs to be more paranoid than production code that talks to a normal API, because LLMs don’t have HTTP status codes — they have a single channel that mixes intent, format, and content.

I built my entire scanning workflow around the assumption that any single LLM response will be 5-10% broken. That assumption has been a better friend than any prompt engineering trick.

What’s your experience? Anyone else burned by silent truncation, or am I the last one to notice?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>Stop copy-pasting AI code: The 6-step validation checklist for devs.</title>
      <dc:creator>NEXADiag Nexa</dc:creator>
      <pubDate>Wed, 15 Apr 2026 14:42:58 +0000</pubDate>
      <link>https://dev.to/nexadiag_nexa_312a4b5f603/stop-copy-pasting-ai-code-the-6-step-validation-checklist-for-devs-5g3l</link>
      <guid>https://dev.to/nexadiag_nexa_312a4b5f603/stop-copy-pasting-ai-code-the-6-step-validation-checklist-for-devs-5g3l</guid>
      <description>&lt;p&gt;It is impossible to be 100% certain that a tool or code generated by an LLM (like ChatGPT, Claude, etc.) is bug-free. LLMs are text predictors: they generate code that looks correct, but they do not "compile" or execute the code internally. Consequently, they can invent functions that do not exist (hallucinations) or make subtle logic errors.&lt;/p&gt;

&lt;p&gt;However, you can achieve a very high level of confidence by following a rigorous validation method. Here are the essential steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Code Review (Never just copy-paste)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Have the code explained:&lt;/strong&gt; Ask the LLM: "Explain this function to me line by line." If the explanation is logically sound, that is a good sign.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the business logic:&lt;/strong&gt; Does the tool do exactly what you want, or did it simplify the problem to provide a faster answer?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch for LLM "habits":&lt;/strong&gt; LLMs tend to use popular libraries even if they aren't the best fit, or they might ignore error handling (try/catch).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Edge Case Testing
&lt;/h2&gt;

&lt;p&gt;This is where LLMs fail most often. A tool might work perfectly with normal data but crash with unusual data. Test for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Empty inputs:&lt;/strong&gt; What happens if you provide nothing?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extreme values:&lt;/strong&gt; A negative number where it should be positive? A text string of 10,000 characters?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Special characters:&lt;/strong&gt; Accents, emojis, or HTML tags (&lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong format:&lt;/strong&gt; If the tool expects a date (DD/MM/YYYY), what happens if you type "Monday"?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Dependency Validation
&lt;/h2&gt;

&lt;p&gt;LLMs sometimes invent package names or use obsolete functions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify that every &lt;code&gt;import&lt;/code&gt; (Python), &lt;code&gt;require&lt;/code&gt; (Node.js), or &lt;code&gt;using&lt;/code&gt; (C#) corresponds to an actual, existing library.&lt;/li&gt;
&lt;li&gt;Check that the library version is compatible with your environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Use Automated Tools (Don't do everything manually)
&lt;/h2&gt;

&lt;p&gt;Run the LLM's code through real development tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Linters:&lt;/strong&gt; Tools like ESLint (JavaScript), Pylint (Python), or Ruff detect syntax errors and poor practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type Checkers:&lt;/strong&gt; If using TypeScript or Python with "Type Hints," the compiler will catch many silent errors (e.g., passing a string to a function expecting a number).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask the LLM to write unit tests:&lt;/strong&gt; Ask: "Write unit tests (using Jest, PyTest, etc.) for this code including nominal and edge cases," then execute those tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Security Check (Crucial)
&lt;/h2&gt;

&lt;p&gt;Never trust an LLM with security.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check for hardcoded passwords or API keys in the script.&lt;/li&gt;
&lt;li&gt;If the tool interacts with a database, ensure there is protection against SQL injections (using parameterized queries).&lt;/li&gt;
&lt;li&gt;If the tool takes user input, ensure the data is sanitized before being displayed or processed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Cross-Checking Technique (Pitting LLMs against each other)
&lt;/h2&gt;

&lt;p&gt;If you have doubts about a complex piece of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take the code generated by ChatGPT.&lt;/li&gt;
&lt;li&gt;Open Claude or Gemini and ask: "Here is code generated by an AI. Find the bugs, security flaws, or performance issues."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LLMs have different biases. An error that goes unnoticed by one is often caught by another.&lt;/p&gt;




&lt;p&gt;A note: this checklist is partly automated in &lt;a href="https://nexaverify.netlify.app" rel="noopener noreferrer"&gt;NexaVerify&lt;/a&gt;, the multi-LLM consensus scanner I'm building. Step 6 (LLM cross-checking) is its core mechanic. Free tier on Gumroad if you want to try it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>devops</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
