You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: PR-side deploy verification against real Vercel previews (#992)
* docs(specs): PR-side deploy verification design
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(plans): PR-side deploy verification implementation plan
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(website): playwright global setup that seeds the runtime origin bypass cookie
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(plans): keep the runtime bypass storage state out of uploaded artifact dirs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(website): harden the runtime bypass setup — redact, relocate state, SameSite=None, loopback tests
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(website): opt-in runtime bypass storage state for protected previews
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: smoke a throwaway cockpit preview on pull requests
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(specs): record the mixed-credential probe result for the runtime origin
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci(cockpit-preview-smoke): fail on an empty deploy URL and remove the throwaway preview
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: run the Website suite against an aliased preview with a matching examples preview
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: drop --skip-domain from preview deploys, validate preview URLs, request a SameSite=None bypass cookie
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(specs): gate the preview lanes only when they were eligible to run
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: gate merges on the PR-side preview verifications when they were eligible to run
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: name a skipped-but-eligible preview lane; document the PR-side lanes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: validate the cockpit preview URL before removal; keep the bypass cookie header off the runtime origin; cover the 307 bypass answer
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(specs): match the implementation — no --skip-domain on previews, samesitenone, cockpit cleanup
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
url=$(node -e 'const parsed = new URL(process.argv[1]); if (parsed.protocol !== "https:" || parsed.username || parsed.password || parsed.pathname !== "/" || parsed.search || parsed.hash) throw new Error("Vercel returned a non-origin cockpit preview URL"); process.stdout.write(parsed.origin)' "$url")
398
+
echo "deployment_url=$url" >> "$GITHUB_OUTPUT"
399
+
- name: Exhaustively verify the cockpit preview
400
+
run: |
401
+
if [ -z "${VERCEL_AUTOMATION_BYPASS_SECRET}" ]; then
402
+
echo "::error::VERCEL_COCKPIT_AUTOMATION_BYPASS_SECRET is unset — the protected cockpit preview cannot be verified. Enable 'Protection Bypass for Automation' on the Vercel threadplane-cockpit project and store the value as this repository secret."
# Both previews sit behind deployment protection, and bypass secrets
794
+
# are issued per Vercel project. Fail before creating anything.
795
+
run: |
796
+
if [ -z "${VERCEL_AUTOMATION_BYPASS_SECRET}" ]; then
797
+
echo "::error::VERCEL_AUTOMATION_BYPASS_SECRET is unset — the protected Website preview cannot be verified. Enable 'Protection Bypass for Automation' on the Vercel threadplane project and store the value as this repository secret."
798
+
exit 1
799
+
fi
800
+
if [ -z "${VERCEL_EXAMPLES_AUTOMATION_BYPASS_SECRET}" ]; then
801
+
echo "::error::VERCEL_EXAMPLES_AUTOMATION_BYPASS_SECRET is unset — the runtime iframe from the protected examples preview cannot load. Enable 'Protection Bypass for Automation' on the Vercel threadplane-examples project and store the value as this repository secret."
# Scoped check for the PR-side preview lanes: enforced only when the
953
+
# lanes were eligible to run; otherwise treated as unselected, where
954
+
# only a real failure or cancellation is an error.
955
+
require_preview() {
956
+
local scope_key="$1"
957
+
local label="$2"
958
+
local result="$3"
959
+
local scoped="$4"
960
+
961
+
if [[ "$PREVIEW_LANES_ELIGIBLE" == "true" && "$scoped" == "true" && "$result" == "skipped" ]]; then
962
+
echo "::error::${label} was eligible and in scope ${scope_key} but was skipped — its job-level if no longer matches the gate's PREVIEW_LANES_ELIGIBLE expression."
963
+
failed=1
964
+
return
965
+
fi
966
+
967
+
if [[ "$PREVIEW_LANES_ELIGIBLE" == "true" ]]; then
0 commit comments