Skip to content

[cli] [core] Probe deployment specVersion before CLI start#1629

Open
VaguelySerious wants to merge 2 commits intopeter/cbor-transport-compatfrom
peter/cli-specversion-probe
Open

[cli] [core] Probe deployment specVersion before CLI start#1629
VaguelySerious wants to merge 2 commits intopeter/cbor-transport-compatfrom
peter/cli-specversion-probe

Conversation

@VaguelySerious
Copy link
Copy Markdown
Member

Summary

Based on #1627. CLI start command now probes the target deployment's specVersion via health check before calling start(), ensuring the correct queue transport is used.

  • Health check always uses JSON transport (specVersion: SPEC_VERSION_LEGACY) so the probe works against both old and new deployments
  • Adds deploymentId option to HealthCheckOptions for targeted health checks
  • Falls back to the existing run's specVersion if health check fails (e.g. old deployment without health check support)

Other paths that call start() without knowing specVersion

Call site Knows specVersion? Notes
CLI start Now probed This PR
recreateRunFromExisting (web dashboard replay) Yes Uses run.specVersion from original run
User code (import { start } from 'workflow') N/A Runs ON the deployment, so SPEC_VERSION_CURRENT is correct
Testing server (world-testing) No Not production-relevant

Test plan

  • packages/core unit tests pass (580/580)
  • Full build passes
  • e2e: CLI start against old deployment uses JSON transport
  • e2e: CLI start against new deployment uses CBOR transport
  • e2e: CLI start with health check timeout falls back to run specVersion

🤖 Generated with Claude Code

CLI start command now queries the deployment's health check endpoint
to determine its specVersion before calling start(). This ensures the
correct queue transport is used (JSON for old deployments, CBOR for
new). Falls back to the run's specVersion if health check fails.

Health check always uses JSON transport (specVersion: SPEC_VERSION_LEGACY)
so the probe works against both old and new deployments. Also adds
deploymentId option to HealthCheckOptions for targeted health checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 7, 2026 0:45am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 7, 2026 0:45am
example-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-astro-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-express-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-fastify-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-hono-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-nitro-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workbench-vite-workflow Ready Ready Preview, Comment Apr 7, 2026 0:45am
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 7, 2026 0:45am
workflow-swc-playground Ready Ready Preview, Comment Apr 7, 2026 0:45am

@VaguelySerious VaguelySerious requested a review from a team as a code owner April 7, 2026 00:22
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

🦋 Changeset detected

Latest commit: e2d9425

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

This PR includes changesets to release 16 packages
Name Type
@workflow/core Patch
@workflow/cli Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
workflow Patch
@workflow/world-testing 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 879 0 67 946
✅ 💻 Local Development 854 0 178 1032
✅ 📦 Local Production 854 0 178 1032
✅ 🐘 Local Postgres 854 0 178 1032
✅ 🪟 Windows 78 0 8 86
❌ 🌍 Community Worlds 15 61 8 84
✅ 📋 Other 216 0 42 258
Total 3750 61 659 4470

❌ Failed Tests

🌍 Community Worlds (61 failed)

mongodb-dev (1 failed):

  • dev e2e should rebuild on imported step dependency change

redis-dev (1 failed):

  • dev e2e should rebuild on imported step dependency change

turso-dev (1 failed):

  • dev e2e should rebuild on imported step dependency change

turso (58 failed):

  • addTenWorkflow | wrun_01KNJPH6HB2Z02PT1ZG4STC8CV
  • addTenWorkflow | wrun_01KNJPH6HB2Z02PT1ZG4STC8CV
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNJPH6RGZEC6NPF0C2NGTFWM
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNJPHCZBA1TVYAW79ETB2WSA
  • promiseRaceWorkflow | wrun_01KNJPHG3GHHX73XAWR45QJ5BN
  • promiseAnyWorkflow | wrun_01KNJPHJ4SV1R8Y99ZHE6F54CH
  • importedStepOnlyWorkflow | wrun_01KNJPHG8N0SVPKPGH5AH352TY
  • hookWorkflow | wrun_01KNJPHXYCKCWRNBNVHCZ33BA0
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNJPJ9XBGD5SGHK4HYG036YK
  • webhookWorkflow | wrun_01KNJPJJZE1223JHBNDGVB1NNW
  • sleepingWorkflow | wrun_01KNJPJSBVW0T4EXCGDF0GVXH1
  • parallelSleepWorkflow | wrun_01KNJPK5WEFS6G0XE7NKC03DV1
  • nullByteWorkflow | wrun_01KNJPKA7S25M9Z2ENKX59H8Z5
  • workflowAndStepMetadataWorkflow | wrun_01KNJPKCB4V44FGHP8JX794T09
  • fetchWorkflow | wrun_01KNJPNZY7528V2EEN8SYG398X
  • promiseRaceStressTestWorkflow | wrun_01KNJPP35CV7VH0KXRYGRN2580
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNJPSJR6S41827N588E3T2AX
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNJPT6ZGW3S6RSMW1E09KAFQ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNJPTVY6D16TC416SV5C0TDF
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNJPVH0SYT4N23922ZJTKQAB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNJPVSJNTEAQKMBZECACMM5S
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNJPW01PZF9HYVSZ3VDBXB99
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNJPW23BSDEGGYGZPPRJMWN4
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNJPWFV1FSYAYRHZ7ERTHKBN
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNJPWNST27C3V982RHAYBJCW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNJPWW5WHH577TZ7H9TRAPBB
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNJPX28ZCT1ZZKDMKSQXT05B
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNJPX8SJ3YFYW9DDAFV74QZZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNJPXF4PASE56Y8D0AQSR6MY
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNJPXPQCXMBJBAF41AT4ZA1K
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNJPY1KC5AV5MB51CMCA1S5G
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNJPY96DYNE7J3SMF9WEK48V
  • cancelRun - cancelling a running workflow | wrun_01KNJPYFHZA7H0CZXBADHJRNR2
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNJPYRH1R0P60TSSV82BR1ZD
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNJPZ4B819FFB0PGAYTK254W
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNJPZR7MKRKVQQQWFGHAFXY6
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNJQ02KRVZMBCR341BE8CSW6
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNJQ09JGV7C8HWP03QNA7C79
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNJQ0CFDVRMPXG7KT2B9NF9T
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNJQ0EF60KQBJXYWK3F4GMR8

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 79 0 7
✅ example 79 0 7
✅ express 79 0 7
✅ fastify 79 0 7
✅ hono 79 0 7
✅ nextjs-turbopack 84 0 2
✅ nextjs-webpack 84 0 2
✅ nitro 79 0 7
✅ nuxt 79 0 7
✅ sveltekit 79 0 7
✅ vite 79 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 72 0 14
✅ express-stable 72 0 14
✅ fastify-stable 72 0 14
✅ hono-stable 72 0 14
✅ nextjs-turbopack-canary 61 0 25
✅ nextjs-turbopack-stable 78 0 8
✅ nextjs-webpack-canary 61 0 25
✅ nextjs-webpack-stable 78 0 8
✅ nitro-stable 72 0 14
✅ nuxt-stable 72 0 14
✅ sveltekit-stable 72 0 14
✅ vite-stable 72 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 72 0 14
✅ express-stable 72 0 14
✅ fastify-stable 72 0 14
✅ hono-stable 72 0 14
✅ nextjs-turbopack-canary 61 0 25
✅ nextjs-turbopack-stable 78 0 8
✅ nextjs-webpack-canary 61 0 25
✅ nextjs-webpack-stable 78 0 8
✅ nitro-stable 72 0 14
✅ nuxt-stable 72 0 14
✅ sveltekit-stable 72 0 14
✅ vite-stable 72 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 72 0 14
✅ express-stable 72 0 14
✅ fastify-stable 72 0 14
✅ hono-stable 72 0 14
✅ nextjs-turbopack-canary 61 0 25
✅ nextjs-turbopack-stable 78 0 8
✅ nextjs-webpack-canary 61 0 25
✅ nextjs-webpack-stable 78 0 8
✅ nitro-stable 72 0 14
✅ nuxt-stable 72 0 14
✅ sveltekit-stable 72 0 14
✅ vite-stable 72 0 14
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 78 0 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
❌ mongodb-dev 4 1 0
❌ redis-dev 4 1 0
❌ turso-dev 4 1 0
❌ turso 3 58 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 72 0 14
✅ e2e-local-postgres-nest-stable 72 0 14
✅ e2e-local-prod-nest-stable 72 0 14

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@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.

1 participant