Owning software · 5 min
Green tests, 15 missed bugs
Your tests are green and things still break after a release. We broke a copy of our own app on purpose to see what green tests notice. Here's what got through.
Short answer: A green test run tells you the tests passed. It doesn't tell you they'd notice a bug. In August 2026 we planted 35 realistic bugs in GarageHub, our own app, and ran our tests and checks against each one. 20 were caught. 15 got through. The fix wasn't more tests. It was checks that cover a whole kind of mistake.
Your tests pass. Would they notice?
Your developers tell you the tests are green. Things still break after a release. Both can be true, and for us they were.
GarageHub is our car maintenance app. In August it had 2,383 passing unit tests, plus a second set that runs against a real database. Every automatic check was green. Bugs were still reaching users. Daniel's words that week: "we have a lot of misses."
So we stopped asking whether the tests pass. We asked whether they'd notice.
We broke a copy of our app on purpose
The method is called fault injection. You plant a bug you understand, run your real checks, and see if anything complains.
We went back through four months of fixes and our own incident notes. From the mistakes we found, we wrote 35 bugs of the same kind. Each one went into a throwaway copy of the code, one at a time, and our checks ran against it. The slow browser tests were the one thing we left out. Nothing touched the live app or its data.
It took about half a day.
Each check was built for one old bug
The misses weren't random. The checks that missed had each been written after one incident, to stop that incident. One step to the side, they saw nothing.
The clearest pair: logging a service in GarageHub marks the matching item on your maintenance schedule as done. There are two ways to log a service: tell Rev, the AI mechanic, or fill in the form yourself. We deleted that step from Rev's path, and a test failed. We deleted the same step from the form's path, and the fast tests stayed green.
The same thing had already happened for real. In July a TestFlight build, not yet in the App Store, showed an empty garage, because of one field the server sent in a form the app didn't expect. We wrote a check for that field. This time we changed the field next to it, and the check said nothing.
The one that worried us
One planted bug removed a single rule: "you can only read your own parts list". With it gone, any signed-in user could read another user's parts.
This was a planted bug, in a copy. We have no sign the hole was ever live. But every test passed with it in place. We had to write a new one to prove the hole was there.
The reason is ordinary. More than half of our API's fast tests replaced the database with a stand-in. A stand-in returns whatever the test's author tells it to, so a missing ownership rule can't fail.
More tests wasn't the answer
We drafted 30 fixes and then tried to knock each one down. 16 didn't survive. One was a well-known tool. In our setup it flagged every recent change to the files we tried it on, and none of those changes was a bug.
What we kept were checks that cover a whole kind of mistake:
- Every request for a user's data must be limited to its owner, or say in writing why not.
- A check that finds a real problem stops the release. Several of ours only printed a warning, which nobody reads.
- Every source file must be covered by a check, so moving a file can't quietly take it out of scope.
- The iPhone tests now run automatically after every merge. Before, they ran on nobody's schedule, and one was failing.
What we haven't proved
A week later we planted seven of the bugs again. Three that had got through were caught, and a fourth was partly caught. We haven't repeated the full run yet, so we don't claim all 15 are closed. The next run will tell us.
What to ask your developers
You don't need to read code to ask these:
- When did a test last fail for a real bug before a release?
- If someone deleted a security rule today, which test would go red?
- Do our checks fail the build, or do they print warnings?
- Do all our tests run automatically, on every change?
If the answers are vague, the green tick is telling you less than you think. Finding out what it does tell you is part of a codebase audit. We ran one on GarageHub too, and wrote up what it found.
For your CTO
- Run: 25 August 2026. 131 past incidents mined from fix commits and incident notes, 35 probes, each planted alone in an isolated git worktree and run against typecheck, lint, unit tests, integration tests and the full CI check job.
- Result: 20 caught: 8 by static check scripts, 7 by unit tests, 3 by integration tests, 1 by typecheck, 1 by lint. 15 counted as escapes. Strictly, 14 passed everything and 1 was caught only by the integration tier, which the pre-commit hook doesn't run.
- Unit tier: it passed on 8 of the 15 escapes, including the ownership one. More than half of the API unit test files mocked the database client.
- Not covered: the web end-to-end tier was left out for cost. Three of the escapes were on the web side.
- Escape shapes: a guard keyed to one incident's field name, a guard that walks a directory and silently scans less, a true finding reported as a warning with exit code 0, a unit tier that mocks the database, and a test tier that runs nowhere.
- Remediation: 30 proposals, each put through an attempt to refute it, 16 rejected. Classic mutation testing, with Stryker, was one: all five recent commits to the enrolled files tripped it, and none was a defect.
- What shipped: an ownership scope check on user data reads, a route authorization ledger, a scan coverage check with count floors, warnings promoted to errors, and baselines that only tighten.
- Since then: the core CI job has grown from 26 steps to 139, API unit test files from 204 to 588, and database-backed integration test files from 33 to 380, as of 22 November 2026.
- Re-run: a partial one on 2 September 2026, 7 probes: 3 escapes flipped to caught, 1 partly, and 3 controls stayed caught. A full re-run is due.