Urgent.News

What's breaking now, across thousands of outlets.

AI

How I audit AI-written code — and the bug that proved why

I build most of my software as an AI-augmented solo developer. I write the spec, I own the architecture, and I drive Claude Code and Cursor through the implementation. But there is one rule I never break: I audit what actually ships, not what the model tells me it produced. Here is the bug that turned that rule into a habit. The symptom that shouldn't exist CoalTrack is an attendance and payroll…

I develop most of my software as an AI-augmented solo developer. I create the specifications, own the architecture, and drive Claude Code and Cursor through the implementation. However, there is one unwavering rule I never violate: I verify the actual product, not the model's output. This rule became a habit due to an instance that proved its importance.

CoalTrack is an attendance and payroll application for coal-mining crews. During closed testing, certain devices failed to connect to the server - there were no error messages, no retry loops, just complete silence. The code appeared correct, the API was functioning, and the same build had worked on my machine previously. To uncover the issue, I stopped analyzing the source code and began examining the actual artifact.

I disassembled the signed app bundle and scrutinized the AndroidManifest.xml that Google Play ultimately receives. The android.permission.INTERNET line was missing.

Why the source code led me astray: In a multi-module Flutter build, the manifest you write is not the same as the one that is shipped. Plugins, build types, and manifest merging all alter the manifest. An upstream change had inadvertently removed the INTERNET permission from the merged result, resulting in the app having no network access upon a fresh installation without cached grants.

On my phone, it worked because the permission had been granted by a previous build and persisted through the upgrade. Reading the source code would never have revealed this issue; inspecting the shipped bundle did so within minutes.

The lesson learned from this incident is that AI-augmented work, when handled responsibly, can significantly speed up development. However, this comes with a heightened responsibility for verification. Conclusively, this means: verify the product, not the intent; inspect the built bundle, the merged manifest, the generated SQL migration - the actual running code; write risky logic twice intentionally; and gate everything with extensive tests.

Currently, over 400 automated tests are run in CI before any signed build. The use of AI to generate code remains safe if more code is also checked. Approach the model's output like a junior engineer - expect it to make mistakes and treat its output accordingly. Ultimately, the fact that AI wrote the code is neither a flaw nor a testament to its quality.

The engineering is still mine, encompassing the specification, the review process, and the decision on what is correct. The productivity gained from AI is undeniable, but so is the responsibility. Audit the AI-written code, not just the optimism.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

How I Put Three AI Agents in a Discord Channel with Switch (and What Broke on Windows)

I built ShipLoop for the Flip the Switch hackathon. It takes a customer complaint in Discord to a tested GitHub pull request, and a human makes the merge decision.

  • ShipLoop project links Discord complaints to GitHub PRs with human final decision
  • Three AI agents (Triager, Fixer, Reviewer) work in Discord channel
  • ShipLoop run on Windows faced port conflicts and bot permission issues

Do I Need My Own App Instead of Paying a Platform?

Do I Need My Own App Instead of Paying a Platform? Do I need my own app for my shop instead of paying a platform on every sale?

  • Platform fees tripled from $49.99 to $149.99 monthly
  • Monthly fees, sales cut, and card fees total ~$310/month
  • Consider simpler solutions like a deals tab on own website

Censys Found 1,465 Exposed Artex AI-Attack Consoles. A Page Title Gave Them Away

Book: Observability for LLM Applications Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub The AI agent framework behind two of October's intrusion…

More from Saturday 7 November →