Skip to content

Backport #4537: [builders] Keep JSON import attributes and stop bundling serde-checker - #4542

Merged
VaguelySerious merged 1 commit into
stablefrom
backport/pr-4537-to-stable
Sep 30, 2026
Merged

VaguelySerious merged 1 commit into
stablefrom
backport/pr-4537-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This is a pure bug fix (patch changeset) to builder behavior that already exists on stable: SWC/esbuild dropped with { type: 'json' }, crashing Node's ESM loader with ERR_IMPORT_ATTRIBUTE_MISSING, and fast discovery matched serde patterns inside string literals, wrongly bundling @workflow/builders' own serde-checker into every step and workflow bundle. The reports motivating it (#3157, #4442) come from the 4.x line, and no feature work is mixed in. Note that the discovery half will conflict: stable's packages/builders/src/fast-discovery.ts still uses a local regex stripComments and transform-utils.ts has no stripCommentsFromSource scanner, so that part needs manual adaptation (the import-attributes half applies as is).

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

@changeset-bot

changeset-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e3dfd0d

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

This PR includes changesets to release 16 packages
Name Type
@workflow/builders Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/vitest Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/web-shared Patch
@workflow/web 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 Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
example-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-python-workflow Error Error v0 Sep 30, 2026 9:43pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workflow-docs Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workflow-swc-playground Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workflow-tarballs Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC
workflow-web Ready Ready Preview, v0 Sep 30, 2026 9:43pm UTC

SWC and esbuild both dropped `with { type: 'json' }`, so an externalized
JSON import crashed Node's ESM loader with ERR_IMPORT_ATTRIBUTE_MISSING.
Fast discovery also matched serde patterns inside string literals, which
pulled @workflow/builders' serde-checker (and its builtin-modules JSON
import) into every step and workflow bundle.

Co-authored-by: Mohith Gajjela <109003762+Mohith26@users.noreply.github.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious force-pushed the backport/pr-4537-to-stable branch from 74839a4 to e3dfd0d Compare September 30, 2026 21:39
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

🧪 E2E Test Results

❌ Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 1098 1 78 1177
✅ 💻 Local Development 1198 0 86 1284
✅ 📦 Local Production 1198 0 86 1284
✅ 🐘 Local Postgres 1198 0 86 1284
✅ 🪟 Windows 107 0 0 107
❌ 🌍 Community Worlds 82 106 9 197
✅ 📋 Other 606 0 36 642
Total 5487 107 381 5975

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

🌍 Community Worlds (106 failed)

redis (21 failed):

  • hookWorkflow | wrun_01M3T49XYRJX8FC23FHFZSB9A0
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M3T4A4NZ1BS6638YEJDJ2HKD
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M3T4ADNGGK1PY5G0VR6YAY05
  • sleepingWorkflow | wrun_01M3T4BBQH9PSSK2ZZS2TWNHPJ
  • 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
  • error handling serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M3T4JRV8SJ89DRX3X9WH36J0
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M3T4K32397Q92HGY7QEWVHF5
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M3T4K9WS9HNP524CT1X4VF1V
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M3T4KRC14ATW2HBZ0Z3C9B69
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M3T4MJST4KM90XKC1V0WSJTV
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M3T4MP50WBVBHTT3BNKA4Q0T
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M3T4MW57XJJFY0CE63F4DGJD
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M3T4N0FP52TE21RFWXJ4RMK7
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M3T4N8TFDYJ0Z1PTC518363W
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M3T4T1ZJJCBXW8GKQM2K1G1N

turso (85 failed):

  • addTenWorkflow | wrun_01M3T492Q7P0MDYJZJKQWW9V5P
  • addTenWorkflow | wrun_01M3T492Q7P0MDYJZJKQWW9V5P
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01M3T4A894WEA1W4T0RRB8TJHM
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01M3T498P16MQMACYDXCYQ9Z9J
  • promiseRaceWorkflow | wrun_01M3T49D2WNREVVBG72YFMZ6GC
  • promiseAnyWorkflow | wrun_01M3T49FB6BSXSQK19AMKQ69YM
  • importedStepOnlyWorkflow | wrun_01M3T4AMAGP7YX14TQH9W8VDA8
  • readableStreamWorkflow | wrun_01M3T49HD73Y5DP92RCPKBE50T
  • hookWorkflow | wrun_01M3T49XYRJX8FC23FHFZSB9A0
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M3T4A4NZ1BS6638YEJDJ2HKD
  • webhookWorkflow | wrun_01M3T4A8HJ6KPMEPZ4FXFFVEB2
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M3T4ADNGGK1PY5G0VR6YAY05
  • sleepingWorkflow | wrun_01M3T4BBQH9PSSK2ZZS2TWNHPJ
  • parallelSleepWorkflow | wrun_01M3T4BTRRB9C4FWA1704BXHKQ
  • sleepWinsRaceWorkflow | wrun_01M3T4BXX7TBX993YN0EK8Y4A1
  • stepWinsRaceWorkflow | wrun_01M3T4C112P16RA7TY1SHT9T6C
  • nullByteWorkflow | wrun_01M3T4C456P9EY8BNC3B636ZVF
  • workflowAndStepMetadataWorkflow | wrun_01M3T4C65Q0HZYWQ8YF8SC3531
  • 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_01M3T4ECCHXMF6X6VXZRQZGRMP
  • writableForwardedFromWorkflowWorkflow | wrun_01M3T4ES04NMNTHC39KPARE5EE
  • writableForwardedFromStepWorkflow | wrun_01M3T4EWG9SEFWHEP9TKZREKKB
  • fetchWorkflow | wrun_01M3T4EZCX8XYS83WMBVTY53AJ
  • promiseRaceStressTestWorkflow | wrun_01M3T4F2TPERWRTZP5DTBSSJ3T
  • 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 serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • 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_01M3T4JES16EN5PS01B8TG9F24
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M3T4JRV8SJ89DRX3X9WH36J0
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M3T4K32397Q92HGY7QEWVHF5
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution | wrun_01M3T4K57ZEQE9DX3V169PTKFB
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution | wrun_01M3T4K7NDTW34YK1VM7KP7HDF
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M3T4K9WS9HNP524CT1X4VF1V
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M3T4KRC14ATW2HBZ0Z3C9B69
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M3T4MJST4KM90XKC1V0WSJTV
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M3T4MP50WBVBHTT3BNKA4Q0T
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M3T4MW57XJJFY0CE63F4DGJD
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M3T4N0FP52TE21RFWXJ4RMK7
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M3T4N8TFDYJ0Z1PTC518363W
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01M3T4NFJRZM6E4P3HZ78P8R77
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01M3T4NX1R5BKYB5XB1ZSBH49W
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01M3T4P4G2BSZWRRRBM7Y4BV6R
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01M3T4P94YEN8XFRJFMWP359V5
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01M3T4PB5YV8RQ4N9GF92NN38E
  • 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_01M3T4PRGQE6JW97T331B6RBXG
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01M3T4PX76SKJ0Z696N0R6J5Z8
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01M3T4Q2ZSKZP0PYT6D1B8YKT5
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01M3T4Q7MYEDG0B5JZVHW50GD8
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01M3T4QDENJ31FWE38038TGTYJ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01M3T4QK8J4KM5ETARJGHJBED1
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01M3T4QSBGCNFYSNNESB04KBZS
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01M3T4R44Y9539NHRKBC6KGEFS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01M3T4RB6JTN8QK093CZ21PMMW
  • cancelRun - cancelling a running workflow | wrun_01M3T4RH2DHPSKBVDJG8Y1575F
  • cancelRun via CLI - cancelling a running workflow | wrun_01M3T4RN2N32SRE1YG7HSBS12Q
  • 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_01M3T4RV717F0SQQ219MQWG3PX
  • hookWithSleepFinalStepWorkflow - step only on final payload | wrun_01M3T4S52FPFRWWT5T5M4MK9X6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01M3T4SCK5F8T8ZWRFJ7N191VG
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01M3T4SQVC5R5DE9ASHGKDGPRX
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01M3T4SXTT3B41H13W54VGN8BT
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01M3T4SZW520J3YFYJVM2X51EK
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M3T4T1ZJJCBXW8GKQM2K1G1N

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 99 0 8
✅ example 99 0 8
✅ express 99 0 8
✅ fastify 99 0 8
✅ hono 99 0 8
✅ nextjs-turbopack 104 0 3
❌ nextjs-webpack 103 1 3
✅ nitro 99 0 8
✅ nuxt 99 0 8
✅ sveltekit 99 0 8
✅ vite 99 0 8
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 107 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 4 0 3
✅ redis-dev 4 0 3
❌ redis 67 21 0
✅ turso-dev 4 0 3
❌ turso 3 85 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 101 0 6
✅ e2e-local-dev-tanstack-start-stable 101 0 6
✅ e2e-local-postgres-nest-stable 101 0 6
✅ e2e-local-postgres-tanstack-start-stable 101 0 6
✅ e2e-local-prod-nest-stable 101 0 6
✅ e2e-local-prod-tanstack-start-stable 101 0 6

📋 View full workflow run


❌ Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@VaguelySerious
VaguelySerious merged commit 6bb5224 into stable Sep 30, 2026
94 of 100 checks passed
@VaguelySerious
VaguelySerious deleted the backport/pr-4537-to-stable branch September 30, 2026 22:58

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — e3dfd0d1 Deployed Sep 30, 2026 by vercel[bot]
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