Deploy Check Can't Tell What's Live? Fix a Blank /api/version
{"commit":""}1What happened
our site has a version page that reports which git commit is live. Before any deploy to the live site, our check compares the new release with what's live. One build had gone out without its commit, so the version page returned {"commit":""}, and the check refused every deploy. Rebuilding the same commit didn't help, because the rebuild left it blank too.
2What we did
Did not roll back to an older build to get a version back, because that would have put old legal pages live.
Did not skip the check.
Changed the check: when the version page is blank, it reads the commit from Vercel's own record of the live deployment, which stores the git commit for every deploy.
Ran the change through code review and tests, then deployed through the check as normal.
3How we know it worked
the next release passed the check, and the version page now reports the real commit.
4What you can take from it
don't trust only a version page your app writes itself. Keep a second source for what's live, like your host's deployment record.
