Skip to content

Backport #3914: fix(world): accept lazy terminal run data - fix Zod schema for newer versions - #3939

Open
github-actions[bot] wants to merge 1 commit into
stablefrom
backport/pr-3914-to-stable
Open

github-actions[bot] wants to merge 1 commit into
stablefrom
backport/pr-3914-to-stable

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

AI recommendation: This is a narrow correctness fix to WorkflowRunSchema in packages/world/src/runs.ts, which exists on stable with the identical required output/error keys for the completed/failed variants, and the lazy (remoteRefBehavior: 'lazy') run responses that omit those payloads are also already present on stable (packages/world-vercel/src/runs.ts). Without it, terminal runs returned as remote refs fail validation under Zod's 4.4+ required-object-property semantics, so the change keeps the maintenance line parsing valid World responses rather than adding any capability. It ships as a patch changeset plus a test, with no dependency on main-only APIs.

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

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Signed-off-by: Shalabh Chaturvedi <shalabh.chaturvedi@vercel.com>
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ef3ca7c

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

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

vercel Bot commented Sep 2, 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 2, 2026 8:17pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
example-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-python-workflow Error Error v0 Sep 2, 2026 8:17pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workflow-docs Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workflow-swc-playground Building Building Preview, v0 Sep 2, 2026 8:17pm UTC
workflow-tarballs Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC
workflow-web Ready Ready Preview, v0 Sep 2, 2026 8:17pm UTC

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

A completed workflow run with an unmaterialized (undefined) output passes schema validation but crashes with a cryptic devalue Error('Invalid input') when hydrated, because the completed branch of pollReturnValue was not hardened for lazy terminal data like the failed branch was.

Fix on Vercel

This branch had an error being deployed

1 failed and 17 active deployments
Preview – workflow-swc-playground — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – example-nextjs-workflow-webpack — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – example-nextjs-workflow-turbopack — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-vite-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-tanstack-start-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-nuxt-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-hono-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-astro-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-sveltekit-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workflow-tarballs — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – example-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-nestjs-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-nitro-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-fastify-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-express-workflow — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workflow-web — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workflow-docs — ef3ca7cc Deployed Sep 2, 2026 by vercel[bot]
Preview – workbench-python-workflow — ef3ca7cc Deployed Sep 2, 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.

0 participants