fix(ci): plumb VERCEL_AUTOMATION_BYPASS_SECRET into preview-smoke + visual-diff #17
No reviewers
Labels
No labels
agent-context-drift
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rstillwell/deckhearth#17
Loading…
Reference in a new issue
No description provided.
Delete branch "convoy/fix-vercel-deployment-protection-in-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes the CI-infra follow-up that PR #16 exposed. Vercel Deployment Protection 401s anonymous GitHub-runner GETs against preview URLs, which made both
Playwright smokeandScreenshot difftime out at 10 minutes on every PR. This convoy plumbsVERCEL_AUTOMATION_BYPASS_SECRETend-to-end and the wait-action's healthcheck now succeeds in 194 milliseconds.Convoy artifacts
.convoys/fix-vercel-deployment-protection-in-ci.md(architect ratified 4 decisions: A/B/C/D).convoys/fix-vercel-deployment-protection-in-ci/brief-1-inject-bypass-secret-into-ci-workflows.mdCommits (3 commits, all on workflow YAML only)
365e9f0— fix(ci): plumb VERCEL_AUTOMATION_BYPASS_SECRET into preview-smoke + visual-diff (Brief 1)b6f8688— fix(ci): route github.event.pull_request.body through env: to avoid shell injection043a6ee— fix(ci): drop x-vercel-set-bypass-cookie=true from wait-action pathCommits 2 and 3 are scope expansions discovered during CI validation of commit 1, not separate convoys, because both were latent bugs in the same two files that actively blocked validation of commit 1's success metric. Total diff: 2 files, +42/-10.
Decisions ratified
Scope expansions discovered during validation
Shell-injection hardening (commit
b6f8688)The pre-existing
Decidestep inlined${{ github.event.pull_request.body }}directly into a bash script. When this PR's body contained parenthesized phrases like "(was: 10-minute timeout)", bash parsed(as a subshell start and the workflow failed withsyntax error near unexpected token '('. This is GitHub's documented anti-pattern (SC2086-class shell injection). Fix: route PR body and fork flag through env: vars (PR_BODY,PR_IS_FORK), then quote them in shell. Same change in both workflows.Cookie-param removal (commit
043a6ee)The architect's brief specified
?x-vercel-protection-bypass=...&x-vercel-set-bypass-cookie=true— but Vercel responds to that with 307 + Set-Cookie, and axios in Node has no cookie jar, so the followup request after the redirect drops the cookie and 401s. For a one-shot healthcheck, the cookie variant is unnecessary; the per-request bypass query is enough. The cookie variant stays reserved for the future Playwright config (adopt-playwright-smoke) where a real browser cookie jar exists. Verified locally:curl -sI ".../?bypass=X"→ HTTP/2 200 ✅curl -sI ".../?bypass=X&set-bypass-cookie=true"→ HTTP/2 307 (the broken path)CI proof
From this PR's most recent run (job
77628243264):Wait-action elapsed: 194 ms. (Was: 10 minute timeout on every PR.)
Step breakdown on Playwright smoke after this PR:
Wait for Vercel Preview deployment— successactions/setup-node— successnpm ci— successInstall Playwright browsers— successRun smoke tests— failure (expected —playwright.config.jsdoesn't exist yet; that'sadopt-playwright-smoke's scope)Expected CI on this PR
Should run?gatePlaywright smokenpx playwright testbecause no config exists yetScreenshot diffThe visible red on Playwright smoke is the documented expected outcome. After
adopt-playwright-smokeships, both checks reach the actual test step and either pass (smoke green) or fail on real assertions.Out of scope (deferred / pre-existing)
adopt-playwright-smoke— authorsplaywright.config.js,@playwright/test, and the actual smoke specs. This is the next convoy in the chain.AGENTS.md§ 7 noun correction — current wording says "header (x-vercel-protection-bypass)" but per Decision A we landed query-param. Doc-writer pass at convoy close handles this.wait-for-vercel-previewaction — flagged forreplace-wait-for-vercel-previewfollow-up if the action ages out further (last release Mar 2024).Test plan
curl -sIreturns HTTP/2 200)set -x, noecho/cat/printfof the bypass URL or secret in any modified steppermissions:blocks unchanged (PR #16 contracts preserved)concurrency:blocks unchangedCloses the CI-infra side-effect of P0 #7. Doc-writer will mark the queued convoy as RESOLVED in
.convoys/ship-readiness.md, update AGENTS.md § 7's "header" wording, and note the env-var-safety hardening as a separable finding.The latest updates on your projects. Learn more about Vercel for GitHub.
Pipeline Health
Build + CI gates
Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).
Role reports
See individual comments above for details. This rollup updates automatically.