Skip to content

Conversation

@TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Feb 8, 2026

Summary

Makes all 8 dehydrate/hydrate serialization functions async, returning Promise<...> instead of synchronous values. This is a prerequisite for E2E encryption where encrypt/decrypt operations are inherently asynchronous.

This is a no-op refactor — the function bodies remain synchronous, only the signatures and call sites are updated.

Changes

  • Add async keyword to all 8 serialization functions in serialization.ts
  • Add explicit Promise<Uint8Array | unknown> return types where needed
  • Update all callers throughout the codebase with await
  • For callers in synchronous callbacks (step.ts, hook.ts), use .then()/.catch() pattern
  • Make hydrateResourceIO and its internal helpers in observability.ts async
  • Update CLI (inspect/output.ts) and web (workflow-server-actions.ts) callers with await/Promise.all
  • Relax Promise.race ordering test assertion (microtask timing changes with async hydration)

Files changed (21)

Core serialization: serialization.ts (signatures only)
Runtime callers: start.ts, workflow.ts, step.ts, hook.ts, step-handler.ts, suspension-handler.ts, resume-hook.ts, run.ts, runs.ts
Observability: observability.ts
CLI/Web: inspect/output.ts, workflow-server-actions.ts
Workbenches: trigger-pages.ts (2 files)
Tests: serialization.test.ts, workflow.test.ts, step.test.ts, hook.test.ts, observability.test.ts

Test plan

All 305 core tests pass. Build succeeds.

@changeset-bot
Copy link

changeset-bot bot commented Feb 8, 2026

🦋 Changeset detected

Latest commit: 7f8582e

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

This PR includes changesets to release 15 packages
Name Type
@workflow/core Patch
@workflow/cli Patch
@workflow/web Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 490 0 38 528
✅ 💻 Local Development 418 0 62 480
✅ 📦 Local Production 418 0 62 480
✅ 🐘 Local Postgres 418 0 62 480
✅ 🪟 Windows 45 0 3 48
❌ 🌍 Community Worlds 106 41 9 156
✅ 📋 Other 123 0 21 144
Total 2018 41 257 2316

❌ Failed Tests

🌍 Community Worlds (41 failed)

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
App Passed Failed Skipped
✅ astro 44 0 4
✅ example 44 0 4
✅ express 44 0 4
✅ fastify 44 0 4
✅ hono 44 0 4
✅ nextjs-turbopack 47 0 1
✅ nextjs-webpack 47 0 1
✅ nitro 44 0 4
✅ nuxt 44 0 4
✅ sveltekit 44 0 4
✅ vite 44 0 4
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 45 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
✅ mongodb 45 0 3
✅ redis-dev 3 0 0
✅ redis 45 0 3
✅ starter-dev 3 0 0
✅ turso-dev 3 0 0
❌ turso 4 41 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 41 0 7
✅ e2e-local-postgres-nest-stable 41 0 7
✅ e2e-local-prod-nest-stable 41 0 7

📋 View full workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.032s (-5.7% 🟢) 1.005s (~) 0.973s 10 1.00x
💻 Local Express 0.032s (+18.4% 🔺) 1.005s (~) 0.973s 10 1.02x
💻 Local Next.js (Turbopack) 0.040s 1.005s 0.965s 10 1.26x
🌐 Redis Next.js (Turbopack) 0.048s 1.005s 0.957s 10 1.52x
🐘 Postgres Nitro 0.099s (-72.1% 🟢) 1.009s (-0.6%) 0.910s 10 3.15x
🌐 MongoDB Next.js (Turbopack) 0.105s 1.007s 0.902s 10 3.33x
🐘 Postgres Express 0.172s (-28.8% 🟢) 1.009s (~) 0.838s 10 5.45x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.738s (-14.3% 🟢) 2.373s (-9.7% 🟢) 1.635s 10 1.00x
▲ Vercel Express 0.847s (~) 2.559s (+9.5% 🔺) 1.712s 10 1.15x
▲ Vercel Next.js (Turbopack) 0.890s (-3.9%) 2.447s (-7.9% 🟢) 1.557s 10 1.21x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.099s 2.005s 0.907s 10 1.00x
💻 Local Express 1.103s (+2.2%) 2.006s (~) 0.903s 10 1.00x
💻 Local Nitro 1.104s (~) 2.004s (~) 0.900s 10 1.01x
🌐 Redis Next.js (Turbopack) 1.111s 2.006s 0.896s 10 1.01x
🌐 MongoDB Next.js (Turbopack) 1.293s 2.007s 0.714s 10 1.18x
🐘 Postgres Express 2.286s (-5.2% 🟢) 3.013s (~) 0.727s 10 2.08x
🐘 Postgres Nitro 2.489s (+6.1% 🔺) 3.013s (~) 0.524s 10 2.27x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.584s (-5.6% 🟢) 3.874s (+4.6%) 1.290s 10 1.00x
▲ Vercel Nitro 2.659s (-3.6%) 3.816s (-6.1% 🟢) 1.156s 10 1.03x
▲ Vercel Next.js (Turbopack) 2.679s (-3.1%) 3.739s (-9.2% 🟢) 1.060s 10 1.04x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 10.694s 11.022s 0.329s 3 1.00x
🌐 Redis Next.js (Turbopack) 10.736s 11.024s 0.288s 3 1.00x
💻 Local Nitro 10.815s (~) 11.022s (~) 0.206s 3 1.01x
💻 Local Express 10.819s (+1.9%) 11.023s (~) 0.204s 3 1.01x
🌐 MongoDB Next.js (Turbopack) 12.280s 13.021s 0.741s 3 1.15x
🐘 Postgres Nitro 20.363s (+6.1% 🔺) 21.056s (+5.0%) 0.694s 2 1.90x
🐘 Postgres Express 20.423s (+0.8%) 21.057s (~) 0.634s 2 1.91x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 19.378s (-1.3%) 21.425s (+3.1%) 2.047s 2 1.00x
▲ Vercel Next.js (Turbopack) 19.383s (-7.5% 🟢) 20.539s (-9.5% 🟢) 1.156s 2 1.00x
▲ Vercel Nitro 19.424s (-0.7%) 20.879s (-1.2%) 1.456s 2 1.00x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.928s 27.051s 0.123s 3 1.00x
💻 Local Next.js (Turbopack) 27.146s 28.055s 0.909s 3 1.01x
💻 Local Express 27.440s (+1.7%) 28.050s (+2.4%) 0.610s 3 1.02x
💻 Local Nitro 27.445s (~) 28.050s (~) 0.604s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 30.515s 31.037s 0.522s 2 1.13x
🐘 Postgres Express 37.749s (-25.0% 🟢) 38.101s (-24.7% 🟢) 0.351s 2 1.40x
🐘 Postgres Nitro 50.166s (+9.1% 🔺) 51.124s (+9.7% 🔺) 0.958s 2 1.86x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 49.451s (-6.1% 🟢) 51.041s (-5.4% 🟢) 1.590s 2 1.00x
▲ Vercel Express 49.925s (-1.0%) 51.849s (+1.3%) 1.925s 2 1.01x
▲ Vercel Next.js (Turbopack) 51.129s (-3.6%) 52.685s (-3.1%) 1.556s 2 1.03x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 54.466s 55.098s 0.632s 2 1.00x
💻 Local Next.js (Turbopack) 56.560s 57.098s 0.538s 2 1.04x
💻 Local Nitro 57.012s (~) 57.098s (-0.9%) 0.086s 2 1.05x
💻 Local Express 57.085s (+1.9%) 57.599s (+1.8%) 0.514s 2 1.05x
🌐 MongoDB Next.js (Turbopack) 61.015s 61.066s 0.051s 2 1.12x
🐘 Postgres Express 76.185s (-23.9% 🟢) 76.680s (-23.5% 🟢) 0.495s 2 1.40x
🐘 Postgres Nitro 100.389s (+4.5%) 101.243s (+5.2% 🔺) 0.854s 1 1.84x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 109.038s (+1.3%) 111.151s (+1.6%) 2.113s 1 1.00x
▲ Vercel Next.js (Turbopack) 110.356s (+2.9%) 111.179s (+2.0%) 0.823s 1 1.01x
▲ Vercel Nitro 110.979s (+4.9%) 112.405s (+4.5%) 1.426s 1 1.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.249s 2.006s 0.757s 15 1.00x
💻 Local Next.js (Turbopack) 1.380s 2.004s 0.625s 15 1.10x
💻 Local Nitro 1.393s (-2.4%) 2.005s (~) 0.612s 15 1.11x
💻 Local Express 1.397s (+1.2%) 2.005s (~) 0.608s 15 1.12x
🐘 Postgres Express 1.991s (-10.2% 🟢) 2.226s (-26.2% 🟢) 0.234s 14 1.59x
🌐 MongoDB Next.js (Turbopack) 2.124s 3.007s 0.883s 10 1.70x
🐘 Postgres Nitro 2.404s (+6.2% 🔺) 3.013s (~) 0.609s 10 1.92x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.901s (-13.9% 🟢) 3.970s (-11.3% 🟢) 1.069s 8 1.00x
▲ Vercel Nitro 2.934s (-0.8%) 4.042s (-1.0%) 1.108s 8 1.01x
▲ Vercel Express 3.017s (+6.0% 🔺) 4.201s (+8.9% 🔺) 1.184s 8 1.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 2.476s 3.008s 0.532s 10 1.00x
💻 Local Nitro 2.512s (~) 3.007s (~) 0.495s 10 1.01x
💻 Local Express 2.555s (+7.5% 🔺) 3.007s (~) 0.452s 10 1.03x
💻 Local Next.js (Turbopack) 2.578s 3.107s 0.529s 10 1.04x
🌐 MongoDB Next.js (Turbopack) 4.747s 5.177s 0.430s 6 1.92x
🐘 Postgres Nitro 7.661s (-4.6%) 8.026s (-6.0% 🟢) 0.365s 4 3.09x
🐘 Postgres Express 8.796s (+10.1% 🔺) 9.029s (+5.8% 🔺) 0.233s 4 3.55x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.043s (-16.1% 🟢) 4.236s (-12.3% 🟢) 1.193s 8 1.00x
▲ Vercel Express 3.356s (+3.0%) 4.665s (+5.2% 🔺) 1.308s 7 1.10x
▲ Vercel Next.js (Turbopack) 3.620s (-38.0% 🟢) 4.927s (-41.3% 🟢) 1.307s 7 1.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.061s 4.725s 0.663s 7 1.00x
💻 Local Next.js (Turbopack) 7.123s 7.766s 0.642s 4 1.75x
💻 Local Nitro 7.149s (-2.6%) 8.015s (~) 0.866s 4 1.76x
💻 Local Express 7.418s (+12.2% 🔺) 8.024s (+14.4% 🔺) 0.606s 4 1.83x
🌐 MongoDB Next.js (Turbopack) 9.724s 10.346s 0.622s 3 2.39x
🐘 Postgres Nitro 43.746s (-7.4% 🟢) 44.108s (-8.3% 🟢) 0.362s 1 10.77x
🐘 Postgres Express 45.977s (-10.4% 🟢) 46.111s (-11.5% 🟢) 0.134s 1 11.32x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 10.037s (+70.9% 🔺) 11.332s (+43.9% 🔺) 1.295s 3 1.00x
▲ Vercel Express 11.162s (+63.3% 🔺) 12.800s (+53.7% 🔺) 1.639s 4 1.11x
▲ Vercel Nitro 13.551s (+76.4% 🔺) 15.527s (+71.0% 🔺) 1.977s 3 1.35x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.260s 2.006s 0.746s 15 1.00x
💻 Local Next.js (Turbopack) 1.399s 2.005s 0.607s 15 1.11x
💻 Local Nitro 1.425s (-2.8%) 2.005s (~) 0.580s 15 1.13x
💻 Local Express 1.439s (+4.6%) 2.004s (~) 0.566s 15 1.14x
🐘 Postgres Express 2.041s (-3.2%) 2.742s (+9.1% 🔺) 0.701s 11 1.62x
🌐 MongoDB Next.js (Turbopack) 2.145s 3.007s 0.861s 10 1.70x
🐘 Postgres Nitro 2.183s (-4.2%) 2.679s (+3.2%) 0.496s 12 1.73x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.724s (-1.3%) 4.079s (-1.7%) 1.355s 8 1.00x
▲ Vercel Express 2.767s (-19.0% 🟢) 4.071s (-9.5% 🟢) 1.304s 8 1.02x
▲ Vercel Next.js (Turbopack) 7.079s (+140.5% 🔺) 8.363s (+93.5% 🔺) 1.285s 4 2.60x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 2.557s 3.009s 0.452s 10 1.00x
🌐 Redis Next.js (Turbopack) 2.575s 3.008s 0.433s 10 1.01x
💻 Local Nitro 2.659s (-3.5%) 3.007s (-3.3%) 0.348s 10 1.04x
💻 Local Express 2.769s (+15.9% 🔺) 3.007s (~) 0.238s 10 1.08x
🌐 MongoDB Next.js (Turbopack) 4.732s 5.176s 0.444s 6 1.85x
🐘 Postgres Nitro 12.076s (-5.6% 🟢) 12.709s (-4.9%) 0.634s 3 4.72x
🐘 Postgres Express 12.909s (+23.4% 🔺) 13.372s (+21.2% 🔺) 0.463s 3 5.05x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.956s (-20.7% 🟢) 4.211s (-16.3% 🟢) 1.255s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.996s (-29.1% 🟢) 4.032s (-24.8% 🟢) 1.036s 8 1.01x
▲ Vercel Express 3.245s (+13.6% 🔺) 4.430s (+22.1% 🔺) 1.185s 7 1.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.078s 4.725s 0.647s 7 1.00x
💻 Local Nitro 7.581s (-7.0% 🟢) 8.017s (-8.6% 🟢) 0.436s 4 1.86x
💻 Local Express 7.587s (+6.6% 🔺) 8.021s (~) 0.434s 4 1.86x
💻 Local Next.js (Turbopack) 7.733s 8.266s 0.532s 4 1.90x
🌐 MongoDB Next.js (Turbopack) 9.769s 10.351s 0.581s 3 2.40x
🐘 Postgres Express 50.452s (-2.8%) 51.108s (-2.0%) 0.656s 1 12.37x
🐘 Postgres Nitro 52.423s (~) 53.108s (~) 0.685s 1 12.86x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.355s (-61.5% 🟢) 4.767s (-53.7% 🟢) 1.412s 7 1.00x
▲ Vercel Next.js (Turbopack) 3.726s (-41.5% 🟢) 5.064s (-34.2% 🟢) 1.338s 6 1.11x
▲ Vercel Express 3.833s (-47.6% 🟢) 5.274s (-39.0% 🟢) 1.441s 6 1.14x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.141s 1.001s 0.011s 1.016s 0.875s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.154s 1.000s 0.001s 1.007s 0.852s 10 1.10x
💻 Local Express 0.171s (+37.0% 🔺) 1.002s (~) 0.010s (~) 1.015s (~) 0.844s 10 1.22x
💻 Local Nitro 0.172s (~) 1.002s (~) 0.010s (+5.2% 🔺) 1.015s (~) 0.843s 10 1.22x
🌐 MongoDB Next.js (Turbopack) 0.505s 0.941s 0.001s 1.008s 0.503s 10 3.59x
🐘 Postgres Express 1.263s (-44.6% 🟢) 1.806s (-34.5% 🟢) 0.001s (-33.3% 🟢) 2.011s (-33.3% 🟢) 0.749s 10 8.98x
🐘 Postgres Nitro 2.400s (+92.9% 🔺) 2.640s (+47.1% 🔺) 0.001s (+27.3% 🔺) 3.014s (+49.8% 🔺) 0.614s 10 17.07x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.906s (+11.9% 🔺) 3.254s (+8.1% 🔺) 0.059s (-72.7% 🟢) 4.301s (+7.6% 🔺) 1.395s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.917s (-15.1% 🟢) 3.462s (-8.2% 🟢) 0.148s (-18.6% 🟢) 4.443s (-10.2% 🟢) 1.526s 10 1.00x
▲ Vercel Nitro 2.952s (+0.6%) 3.457s (+12.2% 🔺) 0.206s (+44.8% 🔺) 4.524s (+6.7% 🔺) 1.572s 10 1.02x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 9/12
🐘 Postgres Express 7/12
▲ Vercel Nitro 6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 11/12
Next.js (Turbopack) 🌐 Redis 6/12
Nitro 💻 Local 11/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

@vercel
Copy link
Contributor

vercel bot commented Feb 8, 2026

Copy link
Member Author

Copy link
Collaborator

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

Review: PR #978 - Make serialization functions async

Summary: Clean mechanical refactor that makes all 8 dehydrate/hydrate functions async. This is well-structured as a standalone PR since it's a pure no-op refactor -- the function bodies remain synchronous, only signatures and call sites are updated.

Strengths:

  • Good separation of concerns -- this refactor is isolated from the actual encryption logic
  • All callers are properly updated with await / Promise.all
  • The changeset correctly lists all affected packages
  • The Promise.race test assertion relaxation is reasonable given async microtask timing changes

Questions/Concerns:

  1. Performance consideration: In step.ts and hook.ts, the callers that were previously synchronous callbacks now use .then()/.catch() patterns. This is the right approach since you can't use await in the resolve callback of a Promise constructor, but worth noting that this adds microtask overhead on every step completion during replay. For workflows with hundreds of steps, this could add up. Not a blocker, just something to be aware of.

  2. Changeset scope: The changeset includes @workflow/world-testing but I don't see material changes to that package's public API in this diff -- it's just updating test utilities. Consider whether this really warrants a published changeset entry for that package, or if it's just an internal change.

Overall this is a clean, well-scoped PR. Looks good to land.

@TooTallNate TooTallNate marked this pull request as ready for review February 9, 2026 23:01
@TooTallNate TooTallNate requested review from a team and Copilot February 9, 2026 23:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the core serialization “dehydrate/hydrate” API surface to be async, returning Promise<...>, and updates runtime/CLI/web/test call sites to await (or use Promise.all / .then() where needed). This enables future async-only transforms (e.g., encrypt/decrypt) without another broad signature change.

Changes:

  • Make 8 core serialization functions in packages/core/src/serialization.ts async and update their return types to Promise<...>.
  • Update callers across runtime, observability, CLI, and web server actions to await hydration/dehydration (including batching with Promise.all).
  • Update tests for async serialization/hydration and relax a Promise.race ordering assertion.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/core/src/serialization.ts Converts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.ts Awaits workflow argument hydration and return value dehydration.
packages/core/src/step.ts Adjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.ts Adjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.ts Awaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.ts Awaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.ts Awaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.ts Awaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.ts Awaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.ts Awaits hook metadata hydration and payload dehydration.
packages/core/src/observability.ts Makes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.ts Awaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.ts Makes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.ts Awaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.ts Awaits workflow argument hydration from request body.
packages/core/src/serialization.test.ts Updates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.ts Updates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.ts Updates step tests for async dehydration.
packages/core/src/workflow/hook.test.ts Updates hook tests for async dehydration.
packages/core/src/observability.test.ts Updates observability tests for async hydration/dehydration.
.changeset/async-serde.md Publishes a patch changeset documenting async serialization refactor.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants