Skip to content

Backport #1902: Fix compatibility with Zod 4.4.x#1938

Merged
TooTallNate merged 2 commits into
stablefrom
backport/pr-1902-to-stable
May 5, 2026
Merged

Backport #1902: Fix compatibility with Zod 4.4.x#1938
TooTallNate merged 2 commits into
stablefrom
backport/pr-1902-to-stable

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 5, 2026

Automated backport of #1902 to stable.

Triggered by the backport-stable label.

Merge conflicts were resolved by AI (opencode with Claude Opus). Please review the conflict resolution carefully before merging.

* Fix compatibility with Zod 4.4.x

* DCO Remediation Commit for Ziyak <ziyak97@gmail.com>

I, Ziyak <ziyak97@gmail.com>, hereby add my Signed-off-by to this commit: 2bf5871

Signed-off-by: Ziyak <ziyak97@gmail.com>

---------

Signed-off-by: Ziyak <ziyak97@gmail.com>
Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Ziyak Jehangir <53836911+ziyak97@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: cee3e25

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

This PR includes changesets to release 22 packages
Name Type
@workflow/world Patch
@workflow/cli Patch
@workflow/core Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
@workflow/world-local Patch
@workflow/world-postgres Patch
@workflow/world-testing Patch
@workflow/world-vercel Patch
tarballs Patch
workflow Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/ai Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt 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 5, 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 May 5, 2026 8:28am
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 5, 2026 8:28am
example-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-astro-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-express-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-fastify-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-hono-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-nitro-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-nuxt-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-sveltekit-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workbench-vite-workflow Ready Ready Preview, Comment May 5, 2026 8:28am
workflow-docs Ready Ready Preview, Comment, Open in v0 May 5, 2026 8:28am
workflow-swc-playground Ready Ready Preview, Comment May 5, 2026 8:28am
workflow-tarballs Ready Ready Preview, Comment May 5, 2026 8:28am
workflow-web Ready Ready Preview, Comment May 5, 2026 8:28am

@vercel vercel Bot temporarily deployed to Preview – workflow-docs May 5, 2026 08:14 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports #1902 to stable by adjusting the WorkflowRunSchema discriminated union so that fields modeled as z.undefined() are also marked .optional(), restoring compatibility with Zod 4.4.x (where z.undefined()-typed properties are treated as required).

Changes:

  • Make output, error, and completedAt optional in union variants where they are constrained to undefined (e.g., pending, running, cancelled, completed for error, failed for output).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PR #1902 landed without a changeset; this adds the missing patch-level changeset for @workflow/world to the backport branch.
@TooTallNate
Copy link
Copy Markdown
Member

Pushed a follow-up commit (cee3e25d) adding the missing changeset for #1902. The original PR landed without a changeset — companion PR #1939 adds the same changeset to main.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 5, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 901 0 67 968
✅ 💻 Local Development 970 0 86 1056
✅ 📦 Local Production 970 0 86 1056
✅ 🐘 Local Postgres 970 0 86 1056
✅ 🪟 Windows 88 0 0 88
❌ 🌍 Community Worlds 139 83 0 222
✅ 📋 Other 492 0 36 528
Total 4530 83 361 4974

❌ Failed Tests

🌍 Community Worlds (83 failed)

mongodb (11 failed):

  • readableStreamWorkflow | wrun_01KQVKXX6AAGA30W16T05FWMD3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQVKYKG2DCQPV34YEDWEFFR9
  • webhookWorkflow | wrun_01KQVKYWZJ0VXQJTM63YK1RGNP
  • outputStreamWorkflow no startIndex (reads all chunks)
  • 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_01KQVM27N2P1GBHGX908B614DH
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQVM77JBX96Q7BX2G4X7GYBZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQVME19AJNF7RMQPA60R69SS

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQVKYKG2DCQPV34YEDWEFFR9
  • 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_01KQVM77JBX96Q7BX2G4X7GYBZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQVME19AJNF7RMQPA60R69SS

turso (65 failed):

  • addTenWorkflow | wrun_01KQVKX6R9YZH49ZYFCK5G9926
  • addTenWorkflow | wrun_01KQVKX6R9YZH49ZYFCK5G9926
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KQVKYBA0QVDAWTK4DWJJF598
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KQVKXF5Q6MXG2WZMEFMN101D
  • promiseRaceWorkflow | wrun_01KQVKXR8ZBKPNDEF392VNHXZT
  • promiseAnyWorkflow | wrun_01KQVKXTRJJ0JMPQM8HMF8ZA4X
  • importedStepOnlyWorkflow | wrun_01KQVKYR2C72WGCBGP16CYYSKX
  • readableStreamWorkflow | wrun_01KQVKXX6AAGA30W16T05FWMD3
  • hookWorkflow | wrun_01KQVKY74V7YVW1VS44NBBKQCH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQVKYKG2DCQPV34YEDWEFFR9
  • webhookWorkflow | wrun_01KQVKYWZJ0VXQJTM63YK1RGNP
  • sleepingWorkflow | wrun_01KQVKZ7F6CJDGWJ0W0NWKHK2T
  • parallelSleepWorkflow | wrun_01KQVKZM4ENB87VJXGFEF7XR4P
  • nullByteWorkflow | wrun_01KQVKZQMVM25Q5DSABABNBX5S
  • workflowAndStepMetadataWorkflow | wrun_01KQVKZSYNE9HM079BQEWJ3Y5Q
  • 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_01KQVM27N2P1GBHGX908B614DH
  • fetchWorkflow | wrun_01KQVM2N3VPSE0BKR98FY3TM72
  • promiseRaceStressTestWorkflow | wrun_01KQVM2RVBREHRWD4DPACZ0315
  • 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_01KQVM6HXCFEH6SWYC7579VCZ7
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQVM77JBX96Q7BX2G4X7GYBZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KQVM7X66QSNK9BS1Z2W62BVR
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KQVM8KV4WGH4PXP5E6CXAMKB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KQVM8XGTSJVC7EMSBWGT1RW1
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KQVM93HF5JN3J662A5ZSQZ83
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KQVM95YDJ85XTEMVPYARH03B
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KQVM9NPW9RMC6A0AQYA1165D
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KQVM9W21X3JVY22BE5Y5QNF8
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KQVMA29NVVM0H5CD756ZJCWM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KQVMA9F49BT5JXT5AEY3HBXV
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KQVMAGMZ7ENK9J9P5N8PAVRF
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KQVMAS0GG1KGBH7HW9HY6Z9E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KQVMB0T792ST41W2G0SRYJ3X
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KQVMBD7WHCW597CBGM1KFDX1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KQVMBNQ6VJGP0Z6YVTQMQ60G
  • cancelRun - cancelling a running workflow | wrun_01KQVMBX0DSJNMB5MSPPTBHP3E
  • cancelRun via CLI - cancelling a running workflow | wrun_01KQVMC71PDE9EGZPQXTYR1GD7
  • 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_01KQVMCKQX76JFC4E0D29DV80S
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KQVMDA7Z7Y65MBX23HBA5NAP
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KQVMDNC90G09NATBT4T2E6DQ
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KQVMDWK75H05KSV4PWZTEZGY
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KQVMDYYAS4YKT3VK9A69VQEX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQVME19AJNF7RMQPA60R69SS

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 81 0 7
✅ example 81 0 7
✅ express 81 0 7
✅ fastify 81 0 7
✅ hono 81 0 7
✅ nextjs-turbopack 86 0 2
✅ nextjs-webpack 86 0 2
✅ nitro 81 0 7
✅ nuxt 81 0 7
✅ sveltekit 81 0 7
✅ vite 81 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 88 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 58 11 0
✅ redis-dev 5 0 0
❌ redis 62 7 0
✅ turso-dev 5 0 0
❌ turso 4 65 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 82 0 6
✅ e2e-local-dev-tanstack-start-stable 82 0 6
✅ e2e-local-postgres-nest-stable 82 0 6
✅ e2e-local-postgres-tanstack-start-stable 82 0 6
✅ e2e-local-prod-nest-stable 82 0 6
✅ e2e-local-prod-tanstack-start-stable 82 0 6

📋 View full workflow run

@TooTallNate TooTallNate enabled auto-merge (squash) May 5, 2026 08:55
@TooTallNate TooTallNate merged commit 15e44b3 into stable May 5, 2026
289 of 295 checks passed
@TooTallNate TooTallNate deleted the backport/pr-1902-to-stable branch May 5, 2026 22:49
@github-actions github-actions Bot mentioned this pull request May 5, 2026
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.

2 participants