Skip to content

fix(ci): open the protected immutable cockpit preview with its own automation bypass - #984

Merged
blove merged 1 commit into
mainfrom
blove/cockpit-preview-bypass
Sep 3, 2026
Merged

fix(ci): open the protected immutable cockpit preview with its own automation bypass#984
blove merged 1 commit into
mainfrom
blove/cockpit-preview-bypass

Conversation

@blove

@blove blove commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Production stays blocked until a new repository secret exists — see "Before this can pass" below. Merging without it is safe: the step fails exactly as it does today, only with a message that says what to provision.

Why

#983 let the deploy job reach Exhaustively verify immutable cockpit preview for the first time (run 33767685952). It failed on its first probe:

[preview] root default redirect: expected 308, received 302.

The 302 is Vercel deployment protection: every path on the unaliased cockpit artifact answers 302 -> vercel.com/sso-api, confirmed with a direct request. This is the same wall #974 removed for the Website preview. Bypass secrets are issued per Vercel project, so VERCEL_AUTOMATION_BYPASS_SECRET (threadplane) cannot open threadplane-cockpit.

Seventh push-only failure path in this arc. The step is unreachable from PR CI, which is why it waited behind the other six.

Change

  • deploy-smoke.ts sends x-vercel-protection-bypass on every probe when VERCEL_AUTOMATION_BYPASS_SECRET is set. The value is read from the environment, never argv, so it stays out of process listings and step logs. A 302 to the SSO endpoint now names deployment protection and the missing secret instead of a bare status mismatch.
  • The workflow step supplies the secret from VERCEL_COCKPIT_AUTOMATION_BYPASS_SECRET and fails with a provisioning message when it is unset (the ci: give the Website preview verification a Vercel automation bypass #974 pattern).
  • Tests: header present on every probe including the hostile-header case, absent without a secret, SSO hint text; the workflow guard asserts both preview checks carry their own project's secret and that the cockpit step never reuses the Website one.

Before this can pass

  1. Vercel → threadplane-cockpit project → Settings → Deployment Protection → enable Protection Bypass for Automation.
  2. Store the generated value as the repository secret VERCEL_COCKPIT_AUTOMATION_BYPASS_SECRET.
  3. Re-run the deploy job on main (or land any commit).

Verification

  • deploy-smoke.spec.ts: 12/12. ci-workflow.spec.mjs: 38/38. Cockpit lint: 0 errors. YAML parses.
  • Against the live protected preview without a secret the script now reports: expected 308, received 302. The deployment answered with Vercel deployment protection … supply the owning project's automation bypass secret via VERCEL_AUTOMATION_BYPASS_SECRET.
  • Dry-run unchanged: dry-run:preview:https://cockpit.threadplane.ai:399.

🤖 Generated with Claude Code

…tomation bypass

With #983 the deploy job reached "Exhaustively verify immutable cockpit
preview" for the first time, and it failed on its first probe:

    [preview] root default redirect: expected 308, received 302.

The 302 is Vercel deployment protection sending every path on the unaliased
artifact to vercel.com/sso-api — the same wall #974 removed for the Website
preview. Bypass secrets are issued per Vercel project, so the Website secret
cannot open the cockpit deployment.

- deploy-smoke.ts sends `x-vercel-protection-bypass` on every probe when
  VERCEL_AUTOMATION_BYPASS_SECRET is set, read from the environment so the
  value never lands in argv or step logs. A 302 to the SSO endpoint now names
  deployment protection and the missing secret instead of reporting a bare
  status mismatch.
- The workflow step supplies the secret from
  VERCEL_COCKPIT_AUTOMATION_BYPASS_SECRET and fails with a provisioning
  message when it is unset.
- Unit tests cover the header on every probe (including the hostile-header
  case), its absence without a secret, and the SSO hint; the workflow guard
  asserts both preview checks carry their own project's secret.

Requires the repository secret VERCEL_COCKPIT_AUTOMATION_BYPASS_SECRET.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 3, 2026 3:22pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 5e420e7 into main Sep 3, 2026
76 checks passed
@blove
blove deleted the blove/cockpit-preview-bypass branch September 3, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant