fix(deploy): stop reporting success for a release it never served - #22
Merged
Conversation
Two checks were measuring the wrong thing, and together they let a deploy go green while the live homepage was still the previous release. The build was skipped on commit equality. public/build and bootstrap/ssr are gitignored, so a `git reset --hard` — which this repo's own runbook prescribes after a force-push — moves the sources and leaves the built output alone. The next deploy saw an unchanged commit, skipped the build, and swapped nothing. A hand-repaired checkout is indistinguishable from an idle one by commit alone, so the skip now also requires the bundles to be newer than the sources. The smoke test then confirmed the wrong thing. It asserted a 200 and a server-rendered <h1>, both of which a stale bundle satisfies perfectly, because the previous release is a complete and valid site. It now also checks that the page loads the entry filename recorded in the manifest that was just built. Vite hashes that per build, so it matches only when the app being served is the app that was deployed. Neither check is speculative: this is what happened on 17 August, and it was caught by fetching the live page by hand rather than by anything in the script.
This was referenced Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two checks were measuring the wrong thing. Together they let a deploy go green while the live homepage was still the previous release — which is exactly what happened on 17 August, and it was caught by fetching the live page by hand, not by anything in the script.
1. The build was skipped on commit equality
public/buildandbootstrap/ssrare gitignored. Agit reset --hard— which this repo's own runbook prescribes after a force-push — moves the sources and leaves the built output untouched.The next deploy then saw an unchanged commit and did this:
Success, zero work, site left on bundles built from older sources.
A hand-repaired checkout is indistinguishable from an idle one by commit alone, so the skip now also requires the bundles to be newer than the sources:
Verified in both directions: reports stale after touching a source, and current immediately after a build — otherwise it would rebuild on every deploy, which is its own bug.
2. The smoke test confirmed the wrong thing
It asserted a 200 and a server-rendered
<h1>. A stale bundle satisfies both perfectly, because the previous release is a complete and valid site. That's why nothing caught it.It now also checks the page loads the entry filename from the manifest just built:
Vite hashes that per build (
assets/app-kdbF_TU5.js), so it appears in the served HTML only when the app being served is the app that was deployed. The manifest is pretty-printed, hence thetr -dflatten before matching.On failure it prints the expected asset and fails, instead of announcing a deploy that didn't happen.
Not done automatically
Neither guard resets the checkout or forces a build on its own.
git pull --ff-onlystays, and a dirty tree still stops the deploy — the point is to detect and explain, not to start overwriting a server someone was mid-repair on.Verification
Both guards have tests, including one asserting the build check runs before the pull-skip decision and the entry check runs after the
<h1>check.