feat(build): nodevoice-build-sha meta + post-deploy readback - #10
Merged
Conversation
Adds a non-strict Vite plugin (adapted from node-foyer's build-provenance plugin) that stamps exactly one <meta name="nodevoice-build-sha"> into the built index.html, sourced from VERCEL_GIT_COMMIT_SHA, then GITHUB_SHA, then git rev-parse HEAD, falling back to content="unavailable" data-provenance="unavailable" when none resolve. Adds .github/workflows/deploy-verify.yml, triggered on deployment_status, that polls https://nodevoice.vercel.app/ for up to 3 minutes after a successful production deploy and fails if the live meta never matches the deployed commit sha. gh api repos/HomenShum/NodeVoice/deployments shows this repo's Vercel production environment as "Production - nodevoice" (a sibling project "local-collab-mvp" also deploys from this repo), so the job filters on that environment name rather than a bare "Production". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
HomenShum
added a commit
to HomenShum/agent-workspace-template
that referenced
this pull request
Sep 13, 2026
) Adopts the NodeVoice PR #10 pattern (HomenShum/NodeVoice#10) so this product moves from reachable-only to verified in node-foyer's registry: a build-sha meta tag rendered in server HTML, plus a workflow that reads it back after a real production deploy. - src/lib/build-identity.ts resolves the commit sha (VERCEL_GIT_COMMIT_SHA, then GITHUB_SHA, then `git rev-parse HEAD`, else "unavailable") the same way node-foyer's vite.config.ts and NodeVoice's vite plugin do it. - src/app/layout.tsx's Metadata `other` field renders it as <meta name="agent-workspace-build-sha" content="<sha>"> in every page's server HTML (Next has no transformIndexHtml hook like Vite; `other` is the native equivalent and needs no client-side JS). - .github/workflows/deploy-verify.yml polls the fixed production URL for up to 3 minutes on deployment_status success and fails if the live meta never matches github.event.deployment.sha. Unlike NodeVoice (two sibling Vercel projects sharing one repo), `gh api .../deployments` and its statuses endpoint show this repo has a single project with production environment exactly "Production", so the job condition is an exact match instead of a startsWith/contains filter. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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-shaprovenance) that stamps exactly one<meta name="nodevoice-build-sha" content="<sha>" data-provenance="commit">into the builtindex.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 (unlike node-foyer's strict-in-production variant)..github/workflows/deploy-verify.yml(on: deployment_status) that pollshttps://nodevoice.vercel.app/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
productsworker's Task 2 for FOYER-V2 (Node Foyer'sdeployGate: live-domrequires a product's own deploy workflow to read its live identity back; NodeVoice currently has none —registry/adapters.jsonin node-foyer only has atext-presencecheck for it).Event-shape evidence (gh api)
This repo has two Vercel projects deploying from it.
gh api repos/HomenShum/NodeVoice/deployments?per_page=5shows the nodevoice project's production environment name is not a bare"Production":and the matching status carries a real environment_url:
So the workflow's job condition filters on
startsWith(environment, 'Production') && contains(environment, 'nodevoice')instead of an exact"Production"match, so the siblinglocal-collab-mvpproject's deploys don't gate this check.Local proof
Exactly one tag, content equal to the checkout sha (no
VERCEL_GIT_COMMIT_SHA/GITHUB_SHAset locally, so it fell through togit rev-parse).Test plan
npm install(fresh clone)npm run buildthen grep the meta tag indist/index.htmlnpm run check:clienttypecheck greenci.yml,node-platform-conformance.yml) green on this PRdeploy-verify.ymlruns and passes on thedeployment_statusevent🤖 Generated with Claude Code