ANTIGRAVITY LABJP
Articles/App Development
App Development/2026-07-14Advanced

When the Deploy Was Green but Users Still Saw the Old Build: Field Notes on a Gate That Verifies Your Shipped Commit Reached the Edge

When a deploy reports success but production keeps serving the old build, a post-deploy gate that verifies your shipped commit actually reached the edge via a build stamp closes the gap. Field notes with real operational numbers.

Antigravity329DeploymentCI/CD17Observability2Operations9

Premium Article

Support kept coming in about a bug I was sure I'd fixed. CI was green. The deploy screen said "success." The commit was on main. Yet opening production, the behavior I'd fixed was still there, unchanged.

The cause was almost anticlimactic. The build had run, but the edge cache kept serving the previous bundle. That green checkmark meant only "the pipeline ran to the end" — not "users are seeing the new code."

Those two are alike in appearance and completely different as facts. This note — using an app I run as an indie developer — records how to build a post-deploy gate that verifies your shipped commit actually reached the edge, via a stamp baked into the build, along with the numbers from running it. I landed on this shape only after shipping two quiet incidents to this exact mix-up.

Why you can't trust "deploy succeeded"

A green deploy guarantees only one of several independent stages: that CI finished without an exception. Between there and the new code reaching a user's screen, several traps remain.

The edge or CDN cache keeps serving the old bundle. The atomic swap lags, so some regions stay on the previous version. Or you shipped not to the intended production project but to a preview environment or a different branch. From CI's vantage, all of these are "success"; from the user's, nothing changed.

The scary part in production is that this kind of mismatch never surfaces as an error. No 500, nothing in the logs — just old behavior served quietly. That's exactly why, instead of believing it succeeded, you need a step that goes and checks whether it actually arrived.

Bake a verifiable stamp into the build

First, make it mechanically readable from production which commit's build is currently live. Embed the commit SHA into the artifact at build time and serve it from a fixed location like /version.json.

// What this does:
// At build time, write out the commit SHA and build time as version.json
// so it can be served as a production static asset.
// scripts/stamp-version.mjs
import { execSync } from "node:child_process";
import { writeFileSync, mkdirSync } from "node:fs";
 
const sha = execSync("git rev-parse --short HEAD").toString().trim();
const builtAt = new Date().toISOString();
 
mkdirSync("public", { recursive: true });
writeFileSync(
  "public/version.json",
  JSON.stringify({ sha, builtAt }, null, 2)
);
 
console.log(`stamped version.json: ${sha} @ ${builtAt}`);

Run this just before your build script, wired as "build": "node scripts/stamp-version.mjs && next build". Now hitting https://your-app.example/version.json tells you at a glance which commit the edge is currently serving. The stamp need not be a SHA — a monotonically increasing build number works too. What matters is being able to reconcile the value the shipping side expects against the value production returns.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why a green deploy doesn't mean production reflects your change, and a post-deploy gate that verifies the commit at the edge
Code that stamps the commit into the build and fetches the live marker while bypassing caches
Measured reduction in stale-build incidents reaching users after adding the gate
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-07-03
When CI Passes but App Review Rejects Your Screenshots — Field Notes on Measuring the Freshness of Your Validation Rules
Store asset validation can pass in CI and still get rejected in review, because the rules themselves go stale. Move store specs into a freshness-dated contract file, then add locale overflow checks and perceptual diffs.
App Dev2026-06-20
Agent Config Drifts Quietly Across Environments: Detection and Correction
Across two Macs and an automation host, agent settings slowly diverge and only one side fails. Here is how to surface that config drift with normalized hashing and a correction workflow, from an indie developer's setup.
App Dev2026-05-06
Automate Unity CI/CD with Antigravity and GitHub Actions: A Practical Guide
Set up a complete Unity CI/CD pipeline using GameCI, GitHub Actions, and Antigravity — from automated testing to TestFlight uploads. A practical guide for indie developers who want to stop building manually.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →