ci(deploy): fail-closed serves-this-commit assert in verify-deploy.sh - #53
Merged
Conversation
The only post-deploy check was a content grep, which the OLD container answers just as happily on a failed rollout - deploy went green either way. The showcase already bakes COMMIT_SHA into /health (#51), so assert that instead, commit-first, then keep the render grep as a secondary criterion. Extracted to scripts/verify-deploy.sh matching auth/dashboard.
vreshch
marked this pull request as ready for review
August 12, 2026 23:45
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.
Part of the estate-wide deploy-verification standardization.
Gap
The only post-deploy check was
curl https://${SITE_FQDN}/ | grep -q "Agentage Design System"- fail-open. Compose usesorder: start-first+failure_action: rollback, so on a failed rollout Swarm keeps the OLD container serving; the grep still matches and the deploy goes green.Changes
scripts/verify-deploy.sh(new, same shape asauth/dashboard): readsSITE_FQDN+COMMIT_SHAfrom env, asserts/healthreports this commit (30 x 10s, prefix match,::error::+exit 1on timeout), then keeps the render grep as a secondary criterion. Commit-first on purpose.deploy.yml: post-deploy step reduces tobash scripts/verify-deploy.shwithSITE_FQDN+COMMIT_SHA: ${{ github.sha }}.deploy.ymlsmoke job: also asserts the built image's/healthcommit equalsgithub.sha, so a build that fails to bakeCOMMIT_SHAfails before prod rather than as an unexplained post-deploy timeout.CLAUDE.md: one line on where verification lives and why the grep alone was fail-open.No
/healthwork was needed - #51 already bakesCOMMIT_SHAintohealth.jsonand serves it as an exact-match nginx location. Build-arg was already wired.How verified
--build-arg COMMIT_SHA=abc123...de), ran it,GET /healthreturned{"success":true,"data":{"status":"ok","service":"agentage-ds","commit":"abc123...de","buildTime":"..."}}; thegrep -oextraction used by both the script and the smoke job returned that exact sha. Container healthcheck wenthealthy.scripts/verify-deploy.shagainst live prod with master's real sha -> both criteria PASS, exit 0.::error::+ exit 1 while the render grep still passed (this is exactly the old fail-open case); unreachable host -> exit 1; missingCOMMIT_SHA-> exit 1.bash -n+shellcheckclean;deploy.ymlparses as YAML;prettier --check scripts .github/workflows/deploy.ymlclean (the dir walk CI runs skips.sh). No TS/JS touched.