Skip to content

fix(ci): scope vercel promote to the team that owns the deployment - #982

Merged
blove merged 1 commit into
mainfrom
blove/fix-vercel-promote-scope
Sep 3, 2026
Merged

fix(ci): scope vercel promote to the team that owns the deployment#982
blove merged 1 commit into
mainfrom
blove/fix-vercel-promote-scope

Conversation

@blove

@blove blove commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Production promotion fails on main:

Error: Deployment doesn't belong to current team brian-loves-projects-c1a217a2

vercel build, deploy and pull read the team from .vercel/project.json. promote takes a bare deployment URL and cannot — it falls back to the token's default team, which is a personal one, not cacheplane.

Both promote calls were introduced without --scope in #963, so neither the Website nor the cockpit redirect service has ever promoted since. refs/deploy/last-promoted still points at 86872580 (#945, 2026-09-01): everything merged in the last two days is built and verified, but never went live.

Verification

  • The failing run reached Promote verified Website artifact unchanged with every prior step green — including Verify Website preview runtime embedding policy, which passed for the first time thanks to ci: give the Website preview verification a Vercel automation bypass #974's bypass.
  • Checked both --scope forms against the live API: the team slug cacheplane and the team id in VERCEL_ORG_ID each resolve correctly. Used the existing secret rather than hardcoding a slug.
  • Added a guard asserting every vercel promote carries --scope; mutation-probed by removing it, which fails two tests.
  • Re-pinned the two existing promote assertions to the new form rather than loosening them.
  • ci-workflow.spec.mjs: 37/37.

Note

This is the fourth defect in the same family tonight: a failure path that only exists after merge. PR CI never runs the deploy job, so an unscoped promote could not be caught before main.

🤖 Generated with Claude Code

Production promotion fails on main:

    Error: Deployment doesn't belong to current team brian-loves-projects-c1a217a2

`vercel build`, `deploy` and `pull` read the team from .vercel/project.json,
but `promote` takes a bare deployment URL and cannot — it falls back to the
token's default team, which is a personal one, not cacheplane. Both promote
calls were introduced without --scope in #963, so neither the Website nor the
cockpit redirect service has ever promoted since.

refs/deploy/last-promoted still points at 8687258 (#945, 2026-09-01), so
everything merged in the last two days is built and verified but never live.

Verified both --scope forms against the API: the team slug and the team id in
VERCEL_ORG_ID each resolve to cacheplane. Use the existing secret rather than
hardcoding a slug, and guard it so an unscoped promote cannot return.

Co-Authored-By: Claude Opus 5 <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 7:55am 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 7468f98 into main Sep 3, 2026
76 checks passed
blove added a commit that referenced this pull request Sep 3, 2026
…untime (#983)

The deploy job re-runs the ordinary Website suite against production with
only BASE_URL set, and #982 let that step run for the first time since the
custom-target specs landed. Two failure clusters surfaced, both invisible to
PR CI by construction because only the push-only deploy job runs the suite
against a remote origin:

- Twelve custom-runtime-target cases dial a fixture runtime on 127.0.0.1:4399
  and the local example apps. Those exist only because the Playwright config
  starts them, and it starts nothing when BASE_URL is set, so every case
  failed with ECONNREFUSED after the site had already promoted. The config now
  ignores the fixture-driven specs whenever it starts no local server,
  including production-smoke mode.
- The reduced-motion check held the runtime in its configuring state by
  refusing http://localhost:4300. Against the deployed site the frame loads
  from the production runtime origin, the handshake completes within half a
  second, and the loader is gone before the assertion. The route now matches
  the runtime frame by the session params Run mode stamps on every runtime
  URL, which holds the loader on screen locally and in production alike.

Verified by running the full suite against https://threadplane.ai exactly as
the deploy step does: 105 passed, 0 failed (was 104 passed, 13 failed).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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