Skip to content

Backport #2351: [vitest] Fix local imports failing to load in test step bundles#2542

Open
github-actions[bot] wants to merge 2 commits into
stablefrom
backport/pr-2351-to-stable
Open

Backport #2351: [vitest] Fix local imports failing to load in test step bundles#2542
github-actions[bot] wants to merge 2 commits into
stablefrom
backport/pr-2351-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated backport of #2351 to stable (backport job run).

AI recommendation: This is a bug fix for the vitest builder externalizing project-local step imports, and the PR body explicitly states the stable channel is affected (the .ts.js rewrite, present on stable via rewriteTsExtensions: true, makes every externalized local import fail). The fix relies on the bundleTransitiveLocalStepDependencies option, which already exists on stable (in packages/builders and packages/nitro), so it does not depend on main-only behavior; the only difference is that stable uses the older createWorkflowsBundle/createStepsBundle API, which is a conflict-resolution concern rather than a reason against backporting.

Merge conflicts were resolved by AI (opencode with anthropic/claude-opus-4.8). Please review the conflict resolution carefully before merging.

@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 680f256

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

This PR includes changesets to release 1 package
Name Type
@workflow/vitest 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

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

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 Jun 20, 2026 7:52pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 20, 2026 7:52pm
example-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-astro-workflow Building Building Preview, Comment Jun 20, 2026 7:52pm
workbench-express-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 20, 2026 7:52pm
workflow-swc-playground Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workflow-tarballs Ready Ready Preview, Comment Jun 20, 2026 7:52pm
workflow-web Ready Ready Preview, Comment Jun 20, 2026 7:52pm

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1044 0 78 1122
✅ 💻 Local Development 1138 0 86 1224
✅ 📦 Local Production 1138 0 86 1224
✅ 🐘 Local Postgres 1126 0 98 1224
✅ 🪟 Windows 102 0 0 102
❌ 🌍 Community Worlds 76 99 6 181
✅ 📋 Other 574 0 38 612
Total 5198 99 392 5689

❌ Failed Tests

🌍 Community Worlds (99 failed)

redis (19 failed):

  • hookWorkflow | wrun_01KVK9CJCZW1JJ0JNEGCD2A96V
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KVK9CXW6NWDCJ25GHCSEH5HD
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01KVK9DARYDXEWK89NMZZ8Y9NC
  • sleepingWorkflow | wrun_01KVK9F2C0BKM9Y3MST9VQYTMB
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KVK9QN9RE8F36675TZ7NE0M0
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01KVK9R1ZHVX1CGTXASAZNYH7B
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01KVK9R9N2ZPHWCFGXRDQ6M0KG
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01KVK9RPW9VWT73A2Y4Q4SYVY8
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01KVK9SHKCQ5SHXBSY7T78KD5E
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01KVK9SP6FH8T7CXBVM2X0C6PH
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01KVK9SX7VDXHKGBMWXNBFJGXH
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01KVK9T55RW8WJNKMV92T7BXNQ
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01KVK9THJYHP2NZ8NZ8KFH0NBE
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KVKA0ZR0QVK2QX39W1460NDZ

turso (80 failed):

  • addTenWorkflow | wrun_01KVK9BGZ939X90QNBHE3E56DW
  • addTenWorkflow | wrun_01KVK9BGZ939X90QNBHE3E56DW
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KVK9DSMEJVNMZR3MRV1YTTJ4
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KVK9BSB45XXAGZ7AR79YDAMN
  • promiseRaceWorkflow | wrun_01KVK9C0DWQF4DQGRB2KYWAJ0J
  • promiseAnyWorkflow | wrun_01KVK9C35QSMRBCV945VRNN4RH
  • importedStepOnlyWorkflow | wrun_01KVK9E89H6GNEPERT5NA2W5MD
  • readableStreamWorkflow | wrun_01KVK9C5P03SJ39D48HKS1BN7R
  • hookWorkflow | wrun_01KVK9CJCZW1JJ0JNEGCD2A96V
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KVK9CXW6NWDCJ25GHCSEH5HD
  • webhookWorkflow | wrun_01KVK9D33XXPT16BBMCD5XC29Y
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01KVK9DARYDXEWK89NMZZ8Y9NC
  • sleepingWorkflow | wrun_01KVK9F2C0BKM9Y3MST9VQYTMB
  • parallelSleepWorkflow | wrun_01KVK9FJ4R2M50801KPZCH9EPP
  • nullByteWorkflow | wrun_01KVK9FPT28TESQ0ET79Z4XMB8
  • workflowAndStepMetadataWorkflow | wrun_01KVK9FS2PG7W7JPFRDFYA6KEE
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KVK9JPB4NAZD5R58JE3MJZSP
  • writableForwardedFromWorkflowWorkflow | wrun_01KVK9K6Q9R0F67MC6YN8VX0V4
  • writableForwardedFromStepWorkflow | wrun_01KVK9KAYJ65GM52TXH6KYZ9SG
  • fetchWorkflow | wrun_01KVK9KFNEWKFC4CHP9F7056HX
  • promiseRaceStressTestWorkflow | wrun_01KVK9KK8MCC9HV8FNVTAQM6B3
  • 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_01KVK9Q74DEA4698YZMJFEAFAA
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KVK9QN9RE8F36675TZ7NE0M0
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01KVK9R1ZHVX1CGTXASAZNYH7B
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution | wrun_01KVK9R4GYW9HG3VTHRPFZGE5H
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution | wrun_01KVK9R762T88AEM7PD114ZZWH
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01KVK9R9N2ZPHWCFGXRDQ6M0KG
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01KVK9RPW9VWT73A2Y4Q4SYVY8
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01KVK9SHKCQ5SHXBSY7T78KD5E
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01KVK9SP6FH8T7CXBVM2X0C6PH
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01KVK9SX7VDXHKGBMWXNBFJGXH
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01KVK9T55RW8WJNKMV92T7BXNQ
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01KVK9THJYHP2NZ8NZ8KFH0NBE
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KVK9TSV89D0T49XNVA6D68A9
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KVK9VAVDQ6ZRSY34Y8KRZ2RY
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KVK9VN8GY60P76T4EFXEXEH2
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KVK9VV4T409732C46TNGYRNQ
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KVK9VXBASW3A7YN4RA2SCNKR
  • 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_01KVK9WDEBTXZGMBXQQ8C31FXJ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KVK9WKH1CKR8WCVKE9JR915K
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KVK9WTE3V8V01RCZRZT7Y3DB
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KVK9X1B0PCYWTHSZ6N92DS27
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KVK9X8HNPG479VYH69EHYWFW
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KVK9XFRG2TY35A6HATCQVJF1
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KVK9XQZ3JE0V3HEKSB3SR8Z1
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KVK9Y7D2TDDQ5G7YXRV8EDJM
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KVK9YGVJ233RNBRNAXN3DM7Z
  • cancelRun - cancelling a running workflow | wrun_01KVK9YRZF4HNT27NTK4TZ3NW0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KVK9Z36EN1XYVBN2GKAWCPWM
  • 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_01KVK9ZGAPSWKKXFEQMG9B3JAG
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KVKA02D2J8NKDKRCBT1N8WPC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KVKA0HGXRT136SCD2KS7MSN8
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KVKA0TVQF24V6JKHZ24M8AXV
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KVKA0XG5Y0Y3H5YVNRKWQ9E9
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KVKA0ZR0QVK2QX39W1460NDZ

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 94 0 8
✅ example 94 0 8
✅ express 94 0 8
✅ fastify 94 0 8
✅ hono 94 0 8
✅ nextjs-turbopack 99 0 3
✅ nextjs-webpack 99 0 3
✅ nitro 94 0 8
✅ nuxt 94 0 8
✅ sveltekit 94 0 8
✅ vite 94 0 8
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 96 0 6
✅ express-stable 96 0 6
✅ fastify-stable 96 0 6
✅ hono-stable 96 0 6
✅ nextjs-turbopack-canary 83 0 19
✅ nextjs-turbopack-stable 102 0 0
✅ nextjs-webpack-canary 83 0 19
✅ nextjs-webpack-stable 102 0 0
✅ nitro-stable 96 0 6
✅ nuxt-stable 96 0 6
✅ sveltekit-stable 96 0 6
✅ vite-stable 96 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 96 0 6
✅ express-stable 96 0 6
✅ fastify-stable 96 0 6
✅ hono-stable 96 0 6
✅ nextjs-turbopack-canary 83 0 19
✅ nextjs-turbopack-stable 102 0 0
✅ nextjs-webpack-canary 83 0 19
✅ nextjs-webpack-stable 102 0 0
✅ nitro-stable 96 0 6
✅ nuxt-stable 96 0 6
✅ sveltekit-stable 96 0 6
✅ vite-stable 96 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 95 0 7
✅ express-stable 95 0 7
✅ fastify-stable 95 0 7
✅ hono-stable 95 0 7
✅ nextjs-turbopack-canary 82 0 20
✅ nextjs-turbopack-stable 101 0 1
✅ nextjs-webpack-canary 82 0 20
✅ nextjs-webpack-stable 101 0 1
✅ nitro-stable 95 0 7
✅ nuxt-stable 95 0 7
✅ sveltekit-stable 95 0 7
✅ vite-stable 95 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 102 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 2
✅ redis-dev 3 0 2
❌ redis 64 19 0
✅ turso-dev 3 0 2
❌ turso 3 80 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 96 0 6
✅ e2e-local-dev-tanstack-start-stable 96 0 6
✅ e2e-local-postgres-nest-stable 95 0 7
✅ e2e-local-postgres-tanstack-start-stable 95 0 7
✅ e2e-local-prod-nest-stable 96 0 6
✅ e2e-local-prod-tanstack-start-stable 96 0 6

📋 View full workflow run

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