Every test was green. The build was green. Yet the zip file users downloaded was missing the most important bug fixes from the last two releases. Here is what went wrong — and the single test that would have caught it before shipping.
Updated August 2026 · 6 minute read
This is a true story from developing the browser extension
Clean Copy.
The project has one core file with all the logic (clean_copy_core.js) and six
surfaces that use it: Chrome extension, Firefox extension, CLI tool,
bookmarklet, Obsidian plugin and desktop app.
During a review we discovered something uncomfortable: the Chrome extension's background script did not contain the fixes from the last two releases. They were in the core file — and in the Firefox version. But the file that actually got packaged into the Chrome zip was an older copy.
The unit and integration tests ran against the core file. It had all the fixes. Everything looked perfect.
The zip contained a manual copy of the core — two releases old, missing the new fixes.
Everyone who downloaded the extension during that period got a product without the fixes the release notes promised.
Classic cause: the same logic maintained in several places. When the project was small, the core was copied into each project by hand. The copy in the Chrome folder simply got forgotten for two iterations — while the source and the Firefox copy were updated.
The mistake cost us two releases and some self-confidence. The fix took one afternoon. It is the best investment the project has made.
That what you ship is identical to what you tested. Not "built from the same codebase" or "mostly the same" — but bit-for-bit the same files, same versions, no older artifacts mixed in. Integrity typically fails not in the code but in packaging: which files end up in the artifact.
Because they tested the source file. The core had all the fixes, and tests against the core passed. The failure lived elsewhere: in a copy of the code bundled into the zip, which no test ever read. A test can only guarantee what it actually loads.
A test that compares two things that should be equal — for example source core.js and the copy of core.js inside the release package. If they differ, the build fails regardless of whether functional tests are otherwise green. It catches exactly the class of bugs where something is maintained in two places.
Three rules: (1) Generate copies from the source instead of maintaining them by hand — one source of truth. (2) Have the build script splice shared code into the artifact automatically. (3) Add one parity test verifying the artifact matches the source, and run it before every release.