feat(build): nodebench-build-sha meta + post-deploy readback - #626
Closed
HomenShum wants to merge 1 commit into
Closed
feat(build): nodebench-build-sha meta + post-deploy readback#626HomenShum wants to merge 1 commit into
HomenShum wants to merge 1 commit into
Conversation
Copies NodeVoice PR #10's pattern for the Node Foyer identity lane (FOYER-V3, worker identity-nodebench): a Vite plugin stamps exactly one <meta name="nodebench-build-sha" content="<sha>" data-provenance="commit"> into the built apps/web/index.html, with precedence VERCEL_GIT_COMMIT_SHA -> GITHUB_SHA -> `git rev-parse HEAD`, falling back to content="unavailable" data-provenance="unavailable" rather than throwing. Adds .github/workflows/deploy-verify.yml (on: deployment_status only, no schedule, no workflow_dispatch, no rollback step) that polls https://www.nodebenchai.com/ for up to 3 minutes after a Production deployment_status success and fails if the live meta never equals github.event.deployment.sha. KNOWN HAZARD: this repo's existing .github/workflows/post-deploy-verify.yml runs `npx vercel rollback --yes` on a failed Production deployment_status event and also runs on a 6-hourly schedule. deploy-verify.yml is a separate workflow file triggered only by deployment_status (never the schedule) and carries no rollback step, so it cannot reach that path in either direction. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
Closing in favor of a correctly-named branch: this repo's Branch-name CI check requires |
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.
Summary
node-foyer/vite.config.ts'sfoyer-build-sha) that stamps exactly one<meta name="nodebench-build-sha" content="<sha>" data-provenance="commit">into the builtapps/web/index.html. Precedence:VERCEL_GIT_COMMIT_SHA, thenGITHUB_SHA, thengit rev-parse HEAD. Non-strict — falls back tocontent="unavailable" data-provenance="unavailable"rather than throwing when no signal is available..github/workflows/deploy-verify.yml(on: deployment_status, nothing else) that pollshttps://www.nodebenchai.com/up to 3 minutes after a Production deploy succeeds and fails the check if the live meta never equals the deployed commit sha.This is the FOYER-V3
identity-nodebenchworker task (Node Foyer'sdeployGate: live-domrequires a product's own deploy workflow to read its live identity back; NodeBenchAI currently publishes none — seedocs/campaign/MANIFEST.md's FOYER-V2.1 backlog: "NodeBenchAI, NodeProof and agent-workspace-template publish no build identity").Deploy topology (gh api + vercel evidence)
gh api repos/HomenShum/NodeBenchAI/deployments?per_page=5shows this repo has one Vercel project deploying it, with the production environment name as the bare string"Production"(unlike NodeVoice's two-sibling-project case, no environment-name disambiguation beyond the state/environment check is needed):and the matching status:
vercel project ls/vercel project inspect nodebench-aiconfirm the Vercel project isnodebench-ai(Framework Preset: Vite, Build Commandbash scripts/vercel-build.sh), whose latest-production alias ishttps://scratchnode.live— butdeployment_status.environment_urlis always a unique preview-style URL, never the canonical hostname..github/workflows/post-deploy-verify.yml(pre-existing) already resolves the canonical Production hostname as the fixed stringhttps://www.nodebenchai.comrather than trustingenvironment_url, sodeploy-verify.ymldoes the same and pollshttps://www.nodebenchai.com/directly, matching the task's stated frontend.KNOWN HAZARD — why the rollback path cannot fire from this check
.github/workflows/post-deploy-verify.ymlin this repo runsnpx vercel@latest rollback --yeswhen its ownVerify deployed appstep fails on a Productiondeployment_statusevent, and it is also triggered by aschedule: cron: "0 */6 * * *". Read in full before writing anything: the rollback step's ownif:already requiresgithub.event_name == 'deployment_status', so a scheduled run of that workflow never rolls back on its own. The risk this task was asked to close is a new check accidentally sharing or extending that trigger surface.deploy-verify.ymlavoids it structurally, not by relying on post-deploy-verify.yml's existing guard:deploy-verify.ymlcan be thefailure()that post-deploy-verify.yml's rollback step checks.on: deployment_statusonly — noschedule:, noworkflow_dispatch:. It is structurally incapable of running from the 6-hourly cron.vercel rollback.So the two workflows run independently off the same GitHub event with no shared state, and this PR's check cannot reach post-deploy-verify.yml's rollback path in either direction.
Local proof (observed, this session)
Exactly one tag, content equal to the checkout sha (no
VERCEL_GIT_COMMIT_SHA/GITHUB_SHAset locally, so it fell through togit rev-parse).Served the built output locally and curled it (not just grepped the file on disk):
This is the repo's own CI
Typecheckjob's "App typecheck" step (.github/workflows/ci.yml). The CI job's other two steps —npx convex codegenandnpx tsc -p backend/convex --noEmit— were not run locally:convex codegenperforms a real network push against a Convex deployment and needsCONVEX_DEPLOY_KEY, which this worker does not hold and should not exercise outside CI; this diff touches noconvex//backend/convexfiles, so the Convex typecheck is unaffected. Both steps run in CI on this PR.Secret scan (before push)
Test plan
git worktree add ... origin/main(this local clone was on a codex recovery branch and was excluded per instruction)npm install(fresh worktree)npm run buildthen grep the meta tag indist/index.htmldist/withvite previewand curled the live meta tagnpx tsc --noEmit --pretty false(CI's App typecheck step) greenci.yml) green on this PRdeploy-verify.ymlruns on thedeployment_statusevent and passes🤖 Generated with Claude Code