AIEngineeringTesting

AI Writes the Bugs. AI Writes the Tests.

Vibra Labs·March 13, 2026

There's a dirty secret in AI-assisted development. You ship faster than ever, and more bugs reach production than ever. That's not a coincidence. It's a tradeoff most teams are making without realizing it.

When a developer can produce five times more code in a day, they produce five times more surface area for things to go wrong. Code review can't keep up. Manual QA definitely can't keep up. The feedback loop between shipping and discovering a bug in production gets shorter and more painful every week.

We've seen it ourselves and we've seen it with clients. AI-generated code that looks clean, passes a quick review, and breaks in an edge case nobody thought to check. Not because the AI is bad at writing code. Because the volume of output overwhelms the verification process.

Amazon learned this the hard way

In March 2026, Amazon suffered a six-hour outage on its main ecommerce site. Users couldn't complete transactions, view account details, or interact with product pages. Internal memos cited a trend of incidents with "high blast radius" linked to AI-assisted code changes dating back to Q3 2025.

Amazon's response was to require senior engineers to sign off on all AI-assisted code before it ships to production. They became the first major tech company to formally restrict AI coding tools due to production incidents.

It's the right instinct. But it's the wrong solution.

Adding process isn't the answer

Amazon's approach is essentially adding more humans to verify the output of machines. That works at Amazon's scale. For everyone else, it's a bottleneck that defeats the entire point of using AI to move faster.

Some teams respond to AI-related bugs by adding review steps, approval gates, more process. They slow down to match their old verification capacity. That's backwards. The whole competitive advantage of AI-assisted development is speed. If you slow down to compensate for risk, you've given back everything AI gave you. You're paying for Copilot to get the same velocity you had before.

The teams that win will keep the speed and solve the quality problem differently.

TDD was always the right answer. It was just too painful.

Test-driven development has been the correct engineering practice for decades. Write the test first, then write the code to make it pass. It catches bugs before they exist. It documents expected behavior. It gives you confidence to refactor without fear.

Everyone knew this. Almost nobody did it consistently.

Because writing tests is tedious. Writing a comprehensive test suite for a feature takes longer than writing the feature itself. Developers are wired to build things, not to write assertions about things they haven't built yet. TDD always lost the cost-benefit analysis in practice, even when it won in theory.

The friction was the problem, not the idea.

AI changes the testing equation

The same AI that helps you write code faster can write tests faster too. And unlike production code, where AI-generated bugs are the concern, AI-generated tests are almost pure upside.

A test either passes or fails. If AI writes a bad test, it fails, and you fix it or throw it away. There's no silent production failure. The failure mode is visible and safe.

AI can generate unit tests that cover edge cases a developer wouldn't think to check. It can write end-to-end tests that simulate real user flows. It can look at a function and produce dozens of test cases in seconds, including boundary conditions, null inputs, type mismatches, and concurrency issues that would take a human an hour to enumerate.

The friction that killed TDD? AI just eliminated it.

The new workflow

The teams getting this right have a simple pattern.

Write code fast with AI. Don't second-guess it. Don't slow down. Let the AI help you build at full speed.

Then use AI to generate comprehensive tests. Unit tests for individual functions. Integration tests for service boundaries. End-to-end tests for critical user paths. Let the AI be thorough in a way that humans never had the patience for.

Run the tests before every merge. If they pass, ship with confidence. If they fail, you caught the bug before your users did. Either way, you win.

This isn't theoretical. Tools like Claude Code can look at a diff, understand the intent of the change, and generate targeted tests that verify the change works correctly. Need end-to-end coverage? Point it at your app and it'll write Playwright tests that click through real user flows, fill forms, and assert on actual page state. The test generation takes minutes, not hours. The cost of TDD just dropped by an order of magnitude.

Ship fast and ship confidently

Amazon's answer to AI bugs was more process. More approvals. More senior engineers in the loop. That's a tax on speed.

The better answer is automated verification. Let AI write the code. Let AI write the tests. Let the tests prove the code works. No bottleneck. No slowdown. No six-hour outage because a code change slipped through review.

Testing isn't glamorous. It never has been. But it's the difference between velocity and recklessness. AI didn't change that truth. It just made the right choice easy enough that there's no longer an excuse to skip it.

Write fast. Test fast. Ship confidently.