Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start() - #2070

Merged
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable
Jun 1, 2026
Merged

Backport #2059: feat(core): support passing parent WritableStream to child workflow via start()#2070
pranaygp merged 2 commits into
stablefrom
backport/pr-2059-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

AI recommendation: This commit fixes two real bugs in existing functionality that exists on stable — forwarding a parent's WritableStream (from getWritable()) to a child workflow via start(). On stable this pattern silently drops child writes after the parent step process exits (notably on Vercel after ~15 minutes) and double-frames every chunk so external consumers see the inner devalue frame instead of raw bytes. The affected files (encryption.ts, serialization.ts, step/writable-stream.ts, symbols.ts, 99_e2e.ts) all exist on stable, and the change is self-contained without dependencies on main-only APIs.

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

…ia start() (#2059)
* test(e2e): cover WritableStream passed as start() argument
Adds an e2e workflow + test where a parent workflow gets a WritableStream
via getWritable(), forwards it through start() to a child workflow, and
the child step writes raw bytes to it. Asserts the external reader on
the parent's stream observes the exact bytes the child wrote.
* fix(core): avoid double-framing when WritableStream is forwarded via start()
When a workflow's getWritable() handle is passed across start() to a
child workflow, the parent step's reviver wraps it in a serialize
transform that pipes into a workflow server stream. Until now,
getExternalReducers.WritableStream then installed a second serialize
transform on top of that — so every chunk the child step wrote got
devalue-framed twice but only deframed once on the reader side, and
external consumers saw the inner frame instead of the original bytes.
Fix: tag every user-visible writable that's already backed by a
workflow server stream with its (runId, name). When the external
reducer recognizes those tags during dehydration, it bridges bytes
straight from the new child-side server stream to the original server
stream instead of piping through the user's writable. That leaves the
producer-side serialize transform (installed once by the child's step
reviver) as the only framing layer in the chain.
* fix(core): forward (runId, name) when a tagged WritableStream crosses start()
Replaces the previous in-process bridge with first-class writable
forwarding at the descriptor level. When a parent workflow's
getWritable() handle is passed as an argument to a child workflow,
the dehydrated descriptor now carries the original (runId, name).
The child run's step-side reviver opens the writable against the
parent's server stream directly and resolves the parent run's
encryption key (encrypt-only) via getEncryptionKeyForRun.
This removes the architectural limitation that the bridge could
only stay alive for the duration of the parent step process — on
Vercel that capped forwarding at ~15 minutes regardless of the
child run's lifetime, dropping any writes the child made after the
parent step process exited.
importKey() now accepts a usages parameter, defaulting to
['encrypt', 'decrypt']. The cross-run forwarding path imports with
['encrypt'] only so a compromised child run cannot decrypt any
existing data on the parent's stream — only contribute new writes.
* test: rename writable-forwarded workflows and cover step-context getWritable()
Addresses PR review:
- Rename writableForwardedToChildChildWorkflow → writableForwardedChildWorkflow
(drops the duplicated 'Child' segment).
- Split writableForwardedToChildWorkflow into two variants covered by a
test.each: writableForwardedFromWorkflowWorkflow (workflow-context
getWritable, the original test) and writableForwardedFromStepWorkflow
(step-context getWritable passed directly into start() from the same
step that called getWritable()).
- Terser changeset description.
Signed-off-by: Nathan Rajlich <n@n8.io>
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 75cdb77

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

This PR includes changesets to release 17 packages
NameType
@workflow/coreMinor
workflowMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/aiMajor
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented May 25, 2026

Copy link
Copy Markdown
ContributorAuthor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production838260900
✅ 💻 Local Development9940861080
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds1571086
✅ 📋 Other504036540
Total4429733544856

❌ Failed Tests

▲ Vercel Production (2 failed)

astro (1 failed):

example (1 failed):

🌍 Community Worlds (71 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 (68 failed):

  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • addTenWorkflow | wrun_01KSG30CBRT35MR32MC7D2Q56R
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KSG3290F70PEDWM8QYYF401T
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KSG30KC39KY62NSA9YVG3PAE
  • promiseRaceWorkflow | wrun_01KSG30TG3MS5NMFRNZCTGPK18
  • promiseAnyWorkflow | wrun_01KSG30WTTNKQJSGQV58G0CV1Z
  • importedStepOnlyWorkflow | wrun_01KSG32N7AADQ8DXBAWNMQ6XY7
  • readableStreamWorkflow | wrun_01KSG30YRC99AMZG0Y8HHDRD37
  • hookWorkflow | wrun_01KSG31BBJXB1MG8N5W5SB03VH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KSG31HK5KB6ZDX8CP0NGZR2E
  • webhookWorkflow | wrun_01KSG31NWDB0E36ADEVN1243RQ
  • sleepingWorkflow | wrun_01KSG31WYHK1JQ07DJV88KE8F6
  • parallelSleepWorkflow | wrun_01KSG32B283XFVZQKPZF055V1C
  • nullByteWorkflow | wrun_01KSG32E61H0CCJ5GW1PJS0C6E
  • workflowAndStepMetadataWorkflow | wrun_01KSG32G42ZM3Z5N9H11FRKK6T
  • 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_01KSG34SXVS8RN4KN7B0TXF4T0
  • writableForwardedFromWorkflowWorkflow | wrun_01KSG357AZYHN72HZWSWWDC21Q
  • writableForwardedFromStepWorkflow | wrun_01KSG35BX6K85A09PVD718QEA5
  • fetchWorkflow | wrun_01KSG35F9CFVFA9NE0M9PJJP8X
  • promiseRaceStressTestWorkflow | wrun_01KSG35JC5EDYQ5J8E64K4SQGX
  • 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_01KSG38M3QPNXTJ03N00QWSBCF
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KSG38Z2S3Q9ED5TW00YV5FK3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KSG39D6VEGTPR0823ST4B7KV
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KSG39V3ZB0YS404004GTAYVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KSG3A33GGD9QD8KKE0V96KRF
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KSG3A7ZSR3S1BAQW1DCRX988
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KSG3AA0CFGR86W1SWARH1NAG
  • 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_01KSG3AQFH7C03YQG41JF7N3YY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KSG3AW785TKH4A5VQ3ZMD8VP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KSG3B25KQ4VQW8MXN428DR42
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KSG3B82JM8FJ86HZ2BKQ7FD5
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KSG3BE2WEVQVC564V99R9HKD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KSG3BKXQGE1EQYY0V814E12E
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KSG3BSTWK7S6BRA2D4N3318R
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KSG3C51D8SVYFDYJKN012SQC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KSG3CDBX06X4EWCYCKKZDBBY
  • cancelRun - cancelling a running workflow | wrun_01KSG3CKASNPH6VS1Z07MHHXY0
  • cancelRun via CLI - cancelling a running workflow | wrun_01KSG3CVSSM7W16VM4E0KM7Y90
  • 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_01KSG3D77222BTXE1TK6PXXMMJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KSG3DPEFYN7BT95WX2FNYC9P
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KSG3E0MA8XQX1FJ6DMS8HMZD
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KSG3E7KQ15Q8D1W9AVD20YDG
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KSG3E9KHB9F4TBS7HE5441ZZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KSG3EBH81453X065DXQH11YT

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro8217
❌ example8217
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
❌ mongodb-dev410
❌ redis-dev410
❌ turso-dev410
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-postgres-tanstack-start-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 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.

Sign up for freeto 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

@pranaygp@TooTallNate