Skip to content

test(core): cover cancel run spec version#2004

Open
EfeDurmaz16 wants to merge 4 commits into
vercel:mainfrom
EfeDurmaz16:efe/test-cancel-run-spec-version
Open

test(core): cover cancel run spec version#2004
EfeDurmaz16 wants to merge 4 commits into
vercel:mainfrom
EfeDurmaz16:efe/test-cancel-run-spec-version

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

@EfeDurmaz16 EfeDurmaz16 commented May 15, 2026

Description

Adds regression coverage for cancelRun() so Vercel-backed cancellation keeps sending a run_cancelled event with the target run's specVersion. This protects the issue #1076 path where the Vercel backend rejected cancellation payloads that were missing versioned event fields.

Also covers the legacy fallback path to ensure runs without a stored spec version still use the v1-compatible cancellation endpoint.

While refreshing the PR, I also fixed the Local Postgres E2E setup race visible in recent CI runs. Multiple matrix jobs were starting Graphile migrations concurrently and failing with duplicate Postgres schema / migration rows, so the Postgres queue startup now serializes Graphile migration work behind a Postgres advisory lock held on a single client.

Closes #1076.

How did you test your changes?

  • corepack pnpm exec vitest run packages/core/src/runtime/runs.test.ts
  • corepack pnpm exec biome check packages/core/src/runtime/runs.test.ts
  • corepack pnpm --filter @workflow/core typecheck
  • corepack pnpm exec vitest run packages/world-postgres/src/queue.test.ts
  • corepack pnpm exec biome check packages/world-postgres/src/queue.ts packages/world-postgres/src/queue.test.ts
  • corepack pnpm --filter @workflow/world-postgres typecheck

Note: corepack pnpm turbo run build --filter='!./workbench/*' was blocked locally by a missing Rust wasm32-unknown-unknown target in @workflow/swc-plugin; the targeted Postgres and core checks above pass locally.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
    • Used pnpm changeset --empty because the original change is test-only.
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete

Signed-off-by: EfeDurmaz16 <efebarandurmaz05@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: 2c29e6a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
tarballs Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch
@workflow/ai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

@EfeDurmaz16 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Signed-off-by: EfeDurmaz16 <efebarandurmaz05@gmail.com>
@EfeDurmaz16 EfeDurmaz16 force-pushed the efe/test-cancel-run-spec-version branch from 35eb48f to 04eac55 Compare May 15, 2026 20:55
@EfeDurmaz16 EfeDurmaz16 marked this pull request as ready for review May 15, 2026 21:58
@EfeDurmaz16 EfeDurmaz16 requested a review from a team as a code owner May 15, 2026 21:58
Signed-off-by: EfeDurmaz16 <efebarandurmaz05@gmail.com>
Signed-off-by: EfeDurmaz16 <efebarandurmaz05@gmail.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.

CLI: workflow cancel fails with 400 for Vercel backend (missing specVersion)

1 participant