Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp
, '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

Make serialization functions async with Encryptor interface - #955

Closed
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization
Closed

Make serialization functions async with Encryptor interface#955
TooTallNate wants to merge 1 commit into
mainfrom
nate/async-serialization

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Adds Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world
  • Makes World extend Encryptor (all methods are optional, so existing implementations are unaffected)
  • Converts all 8 dehydrate/hydrate functions in serialization.ts to async with new runId and encryptor parameters
  • Adds runId and world to WorkflowOrchestratorContext for threading encryption context through the workflow lifecycle
  • Updates all callers throughout: runtime, step handler, suspension handler, resume-hook, observability, CLI, web-shared, workbenches, world-testing, and tests

This is a no-op refactor — the encryptor parameter is unused (prefixed with _) in this PR. All callers pass {} as the encryptor. The actual encryption logic will be wired in a subsequent PR.

Stack

Test plan

All 303 core tests pass. Build succeeds.

@vercel

vercelBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings February 6, 2026 02:29
@changeset-bot

changeset-botBot commented Feb 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b2edf6

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

This PR includes changesets to release 19 packages
NameType
@workflow/corePatch
@workflow/worldPatch
@workflow/cliPatch
@workflow/webPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@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

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production490038528
✅ 💻 Local Development418062480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds2916312204
✅ 📋 Other123021144
Total19411632602364

❌ Failed Tests

🌍 Community Worlds (163 failed)

mongodb (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (40 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • 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
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
✅ nextjs-webpack4701
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5403
✅ redis-dev300
❌ redis5403
✅ starter-dev300
❌ starter3423
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds encryption support infrastructure to the Workflow SDK as a no-op refactor, preparing for future E2E encryption implementation. It introduces Encryptor, EncryptionContext, and KeyMaterial interfaces to @workflow/world, extends the World interface to include optional encryption methods, and converts all 8 serialization functions (dehydrate/hydrate) to async with new runId and encryptor parameters.

Changes:

  • Added encryption interfaces (Encryptor, EncryptionContext, KeyMaterial) to @workflow/world package
  • Made all 8 serialization functions async and added runId and encryptor parameters (unused in this PR, prefixed with _)
  • Updated WorkflowOrchestratorContext to include runId and world for threading encryption context through workflow lifecycle
  • Updated all 200+ call sites across runtime, step handlers, hook handlers, CLI, web-shared, workbenches, and tests to await async hydration and pass new parameters

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, KeyMaterial interfaces; extended World to include Encryptor
packages/core/src/serialization.tsConverted all 8 dehydrate/hydrate functions to async with new runId and encryptor parameters
packages/core/src/serialization.test.tsAdded test wrapper functions to maintain backward-compatible signatures for existing tests
packages/core/src/workflow.tsUpdated runWorkflow to accept world parameter and pass it through orchestrator context
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext interface
packages/core/src/workflow/hook.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/step.tsUpdated to use async hydration with .then()/.catch() pattern in event consumer
packages/core/src/runtime/*.tsUpdated start, run, step-handler, suspension-handler, resume-hook to await async serialization
packages/core/src/observability.tsConverted all hydration helper functions to async and properly await them
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to properly await and pass world
packages/web-shared/src/api/workflow-server-actions.tsConverted hydrate helper to async and updated all callers to await
workbench//api/triggerAll 15 workbench trigger endpoints updated to await hydration and pass empty runId/encryptor
packages/core/e2e/e2e.test.tsRemoved withResolvers import and updated dehydrateWorkflowArguments call (missing cleanup on lines 96-97)
packages/core/e2e/bench.bench.tsProperly removed all references to ops variable

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

@TooTallNateGraphite App

TooTallNate commented Feb 6, 2026

Copy link
Copy Markdown
MemberAuthor

@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 8a2fcdc to 07fb637CompareFebruary 8, 2026 07:42
@TooTallNate
TooTallNateforce-pushed the nate/async-serialization branch from 07fb637 to f32020dCompareFebruary 8, 2026 07:46
@github-actions

github-actionsBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.031s (-10.7% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-1.9%)1.005s (~)0.973s101.02x
💻 LocalNext.js (Turbopack)0.041s1.005s0.964s101.31x
🐘 PostgresNitro0.301s (+36.2% 🔺)1.009s (~)0.708s109.72x
🐘 PostgresExpress0.434s (+7.0% 🔺)1.010s (-1.1%)0.576s1013.99x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.857s (-5.2% 🟢)2.877s (+19.1% 🔺)2.020s101.00x
▲ VercelExpress0.859s (-6.0% 🟢)2.727s (+14.9% 🔺)1.868s101.00x
▲ VercelNext.js (Turbopack)0.894s (-8.5% 🟢)2.804s (+0.9%)1.911s101.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.101s2.006s0.904s101.00x
💻 LocalExpress1.102s (~)2.005s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.901s101.00x
🐘 PostgresNitro2.171s (-11.7% 🟢)3.014s (~)0.843s101.97x
🐘 PostgresExpress2.307s (+2.2%)3.015s (~)0.708s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.627s (-3.8%)3.579s (-12.3% 🟢)0.952s101.00x
▲ VercelExpress2.635s (-1.1%)3.874s (+8.4% 🔺)1.240s101.00x
▲ VercelNitro2.681s (+2.9%)3.942s (+3.4%)1.261s101.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.709s11.021s0.312s31.00x
💻 LocalNitro10.822s (~)11.021s (~)0.199s31.01x
💻 LocalExpress10.827s (~)11.021s (~)0.194s31.01x
🐘 PostgresExpress20.171s (~)21.059s (~)0.888s21.88x
🐘 PostgresNitro20.299s (~)21.054s (~)0.754s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.098s (-2.1%)20.649s (+1.0%)1.551s21.00x
▲ VercelNitro19.099s (-2.4%)20.123s (-5.1% 🟢)1.024s21.00x
▲ VercelExpress19.745s (-0.7%)22.467s (+5.6% 🔺)2.721s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)27.151s28.049s0.898s31.00x
💻 LocalExpress27.472s (~)28.051s (~)0.579s31.01x
💻 LocalNitro27.487s (~)28.051s (~)0.564s31.01x
🐘 PostgresNitro50.352s (~)51.139s (~)0.787s21.85x
🐘 PostgresExpress50.478s (~)51.127s (~)0.649s21.86x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express48.630s (~)50.145s (~)1.515s21.00x
▲ VercelNitro48.834s (~)50.305s (-0.6%)1.471s21.00x
▲ VercelNext.js (Turbopack)51.682s (+2.0%)53.957s (+3.0%)2.275s21.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)56.509s57.104s0.595s21.00x
💻 LocalExpress57.075s (~)57.601s (~)0.526s21.01x
💻 LocalNitro57.236s (~)58.101s (~)0.864s21.01x
🐘 PostgresExpress100.196s (~)100.213s (-1.0%)0.017s11.77x
🐘 PostgresNitro100.531s (~)101.243s (~)0.712s11.78x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express99.867s (-5.3% 🟢)101.818s (-4.7%)1.951s11.00x
▲ VercelNitro102.638s (-2.1%)104.169s (-2.4%)1.531s11.03x
▲ VercelNext.js (Turbopack)102.723s (+1.5%)103.516s (+0.7%)0.793s11.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.403s (-0.8%)2.005s (~)0.602s151.00x
💻 LocalNext.js (Turbopack)1.405s2.004s0.599s151.00x
💻 LocalNitro1.424s (+2.2%)2.006s (~)0.582s151.02x
🐘 PostgresExpress2.274s (-2.6%)3.014s (~)0.740s101.62x
🐘 PostgresNitro2.554s (+10.9% 🔺)3.013s (~)0.459s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.790s (-27.0% 🟢)4.445s (-23.0% 🟢)1.655s71.00x
▲ VercelNext.js (Turbopack)2.812s (-5.9% 🟢)4.062s (-3.9%)1.251s81.01x
▲ VercelExpress3.164s (-3.1%)4.638s (+2.8%)1.474s71.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.517s3.006s0.490s101.00x
💻 LocalExpress2.557s (+0.9%)3.007s (~)0.450s101.02x
💻 LocalNitro2.636s (+0.8%)3.007s (~)0.371s101.05x
🐘 PostgresExpress8.667s (-2.8%)9.035s (-2.7%)0.368s43.44x
🐘 PostgresNitro10.017s (+17.6% 🔺)10.700s (+21.9% 🔺)0.683s33.98x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.112s (-8.2% 🟢)4.493s (+0.7%)1.380s71.00x
▲ VercelExpress3.394s (+7.3% 🔺)4.695s (+7.6% 🔺)1.301s71.09x
▲ VercelNext.js (Turbopack)4.336s (+36.5% 🔺)5.606s (+25.8% 🔺)1.270s61.39x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.896s7.415s0.518s51.00x
💻 LocalExpress7.137s (+1.4%)7.767s (~)0.630s41.03x
💻 LocalNitro7.609s (+2.3%)8.017s (~)0.408s41.10x
🐘 PostgresNitro47.120s (-6.9% 🟢)48.118s (-5.9% 🟢)0.998s16.83x
🐘 PostgresExpress49.586s (+1.5%)50.148s (+2.1%)0.562s17.19x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.651s (-5.9% 🟢)5.254s (-2.1%)1.604s61.00x
▲ VercelNitro3.737s (-0.6%)5.738s (-1.8%)2.000s61.02x
▲ VercelExpress4.076s (+16.5% 🔺)5.627s (+7.1% 🔺)1.552s61.12x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.418s (~)2.005s (~)0.586s151.00x
💻 LocalNext.js (Turbopack)1.420s2.005s0.585s151.00x
💻 LocalNitro1.432s (~)2.005s (~)0.574s151.01x
🐘 PostgresNitro2.023s (~)2.474s (+6.7% 🔺)0.451s131.43x
🐘 PostgresExpress2.087s (-4.9%)2.319s (-13.4% 🟢)0.233s131.47x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.664s (-8.3% 🟢)3.870s (-2.5%)1.206s81.00x
▲ VercelNitro2.671s (-5.1% 🟢)3.914s (-2.6%)1.242s81.00x
▲ VercelNext.js (Turbopack)2.680s (-10.7% 🟢)3.755s (-18.0% 🟢)1.075s81.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.637s (-1.2%)3.007s (~)0.370s101.00x
💻 LocalNext.js (Turbopack)2.657s3.011s0.353s101.01x
💻 LocalNitro2.707s (-0.6%)3.008s (~)0.301s101.03x
🐘 PostgresExpress10.315s (-19.0% 🟢)10.697s (-20.0% 🟢)0.382s33.91x
🐘 PostgresNitro12.648s (+11.0% 🔺)13.042s (+11.5% 🔺)0.394s34.80x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.839s (~)3.922s (-2.9%)1.083s81.00x
▲ VercelNitro2.907s (-0.7%)4.240s (-7.4% 🟢)1.334s81.02x
▲ VercelNext.js (Turbopack)3.357s (+12.7% 🔺)4.602s (+10.7% 🔺)1.245s71.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)7.718s8.015s0.297s41.00x
💻 LocalExpress7.779s (+2.1%)8.019s (~)0.240s41.01x
💻 LocalNitro7.881s (-1.5%)8.271s (-5.7% 🟢)0.390s41.02x
🐘 PostgresNitro51.476s (+1.2%)52.118s (+2.0%)0.642s16.67x
🐘 PostgresExpress51.743s (-1.3%)52.122s (-1.9%)0.379s16.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.562s (-2.6%)5.559s (+13.3% 🔺)1.997s61.00x
▲ VercelExpress3.801s (-0.9%)5.080s (-0.7%)1.279s61.07x
▲ VercelNext.js (Turbopack)3.936s (+14.5% 🔺)5.236s (+1.2%)1.300s61.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s1.001s0.010s1.015s0.870s101.00x
💻 LocalExpress0.170s (-3.8%)1.002s (~)0.010s (+5.3% 🔺)1.015s (~)0.845s101.17x
💻 LocalNitro0.175s (~)1.002s (~)0.010s (-10.7% 🟢)1.015s (~)0.840s101.20x
🐘 PostgresNitro2.130s (-11.3% 🟢)2.913s (+10.4% 🔺)0.001s (+8.3% 🔺)3.015s (~)0.885s1014.67x
🐘 PostgresExpress2.328s (+7.5% 🔺)2.715s (-5.6% 🟢)0.001s (~)3.014s (~)0.686s1016.04x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.416s (-9.1% 🟢)3.098s (+0.6%)0.172s (+29.0% 🔺)4.047s (+0.8%)1.631s101.00x
▲ VercelExpress2.466s (-1.9%)3.140s (+5.3% 🔺)0.145s (-46.6% 🟢)4.104s (+2.5%)1.638s101.02x
▲ VercelNext.js (Turbopack)2.545s (-13.4% 🟢)3.078s (-17.0% 🟢)0.149s (-10.2% 🟢)3.913s (-18.0% 🟢)1.368s101.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/12
🐘 PostgresNitro7/12
▲ VercelNitro5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@pranaygppranaygp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: PR #955 - Make serialization functions async with Encryptor interface

This PR appears to combine what has been split into #978 and #979 in the newer stack. Since the split versions are cleaner (separating the async refactor from the Encryptor interface threading), I'd recommend closing this in favor of the split stack: #978 -> #979 -> #956 -> #957.

Detailed reviews are on the individual PRs in the split stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp