Back to Blog

Tobias Köhler · 24 Sept 2026 · 4 min read

A Version Number Is Not a Deploy

Our deploy script bumped the version three times in one morning and shipped the old code every time. Here's how we caught it and what we changed.

On this page
  1. What Actually Happened
  2. Why the Version Number Lied
  3. How We Caught It
  4. What We Changed
  5. What This Means for Your Stack
  6. Questions readers often ask
  7. Q: Why not use a CI/CD platform that handles this automatically?
  8. Q: How do you prevent this from happening again?
  9. Q: What if the smoke test had not caught it?
  10. Q: Should every deploy have a smoke test?

On September 18th, our background worker was deployed three times in one morning. The second and third builds came back with fresh version numbers and the old code.

The deploy script never checked whether the checkout on the server was current. Nobody had pulled the latest merge before running it. The platform recorded the same git commit for all three builds.

We only caught it because a smoke test looked at the actual output of a run. A JSON field that the new code writes was missing. Had the old code carried that field as empty, the morning would have closed on the wrong root cause.

What Actually Happened

The deploy script bumped the version number. It ran the build. It restarted the service. All three steps succeeded.

The health check passed. The logs showed the new version. The deploy list showed green.

The code running on the server was identical to the previous build. The git checkout was stale. The script never verified it.

Why the Version Number Lied

Version numbers come from the build process, not the source code. A build script can increment a number whether or not the underlying code changed.

A passing health check proves the service started. It does not prove the service started with new code.

A green deploy proves the script finished. It does not prove the script deployed what you merged.

How We Caught It

A smoke test ran a workflow and inspected the output. The new code writes a specific JSON field. That field was missing.

The platform's deploy list showed the same git commit for all three builds of the morning. That commit was not the one we merged.

Had the old code written that field as empty instead of omitting it, the smoke test would have passed. The morning would have closed on the wrong root cause.

What We Changed

The fix merged this week: one shared gate for both deploy paths that refuses to build a stale checkout and prints the commit it builds from.

The platform's deploy list can now be checked against the commit the script actually built.

The gate runs before the build. If the checkout is not current, the deploy fails before the version number increments.

What This Means for Your Stack

Deployed is a claim your script makes. The proof is a run whose output shows the new behaviour.

A green deploy, a new version number, and a passing health check are all things the old code can produce too.

If you run your own automation, verify the checkout before you build. Print the commit you build from. Compare it to the commit you merged.

Smoke tests should inspect actual output, not just status codes. A field that exists in the new code and not the old is a better signal than a passing health check.

Questions readers often ask

Q: Why not use a CI/CD platform that handles this automatically?

CI/CD platforms verify the checkout for you, but they do not eliminate the need for smoke tests. A passing build proves the code compiled. It does not prove the code does what you merged it to do. Inspect the output.

Q: How do you prevent this from happening again?

The gate refuses to build a stale checkout. The deploy script prints the commit it builds from. The platform's deploy list shows the commit for every build. We compare them.

Q: What if the smoke test had not caught it?

The bug would have shipped. The platform would have shown green. The deploy list would have shown the wrong commit. We would have debugged the wrong code until a user reported the missing behaviour.

Q: Should every deploy have a smoke test?

Yes. A smoke test that inspects actual output catches bugs that health checks miss. A field that exists in the new code and not the old is a stronger signal than a passing status code.

Tobias Köhler

Founder, konzira

Talk to us

Next post22 Sept 2026

Your scan called you a shop. Here is why, and why it stopped.

A WordPress agency got labeled as an e-commerce shop. The scanner read WooCommerce in the page text and applied the wrong label. Here is the fix.