Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make serialization functions async#978

Merged
TooTallNate merged 3 commits intomainfrom
nate/async-serde
Feb 18, 2026
Merged

Make serialization functions async#978
TooTallNate merged 3 commits intomainfrom
nate/async-serde

Conversation

@TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Feb 8, 2026

Summary

  • Makes all 8 dehydrate/hydrate serialization functions in @workflow/core async (returning Promise<...>)
  • Updates all call sites across runtime, CLI, and test code to await the results
  • Pure mechanical refactor — no functional changes, prerequisite for encryption support

Part 1 of the end-to-end encryption PR stack.

@changeset-bot
Copy link

changeset-bot bot commented Feb 8, 2026

🦋 Changeset detected

Latest commit: 6d07e58

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

This PR includes changesets to release 14 packages
Name Type
@workflow/core Patch
@workflow/cli Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/world-testing 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 534 0 38 572
✅ 💻 Local Development 556 0 68 624
✅ 📦 Local Production 556 0 68 624
✅ 🐘 Local Postgres 556 0 68 624
✅ 🪟 Windows 49 0 3 52
❌ 🌍 Community Worlds 110 46 9 165
✅ 📋 Other 135 0 21 156
Total 2496 46 275 2817

❌ Failed Tests

🌍 Community Worlds (46 failed)

mongodb (1 failed):

  • webhookWorkflow

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • 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 48 0 4
✅ example 48 0 4
✅ express 48 0 4
✅ fastify 48 0 4
✅ hono 48 0 4
✅ nextjs-turbopack 51 0 1
✅ nextjs-webpack 51 0 1
✅ nitro 48 0 4
✅ nuxt 48 0 4
✅ sveltekit 48 0 4
✅ vite 48 0 4
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 49 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
❌ mongodb 48 1 3
✅ redis-dev 3 0 0
✅ redis 49 0 3
✅ turso-dev 3 0 0
❌ turso 4 45 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 45 0 7
✅ e2e-local-postgres-nest-stable 45 0 7
✅ e2e-local-prod-nest-stable 45 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 (+17.6% 🔺) 1.006s (~) 0.974s 10 1.00x
💻 Local Express 0.032s (+21.6% 🔺) 1.005s (~) 0.973s 10 1.00x
💻 Local Next.js (Turbopack) 0.040s 1.005s 0.965s 10 1.25x
🌐 Redis Next.js (Turbopack) 0.045s 1.005s 0.960s 10 1.41x
🌐 MongoDB Next.js (Turbopack) 0.104s 1.007s 0.903s 10 3.26x
🐘 Postgres Nitro 0.138s (+26.5% 🔺) 1.009s (~) 0.871s 10 4.31x
🐘 Postgres Express 0.427s (+203.0% 🔺) 1.009s (~) 0.583s 10 13.34x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.592s (-17.9% 🟢) 1.970s (-29.7% 🟢) 1.379s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.672s (-17.7% 🟢) 2.101s (-2.2%) 1.429s 10 1.14x
▲ Vercel Express 0.717s (-0.7%) 1.876s (-16.0% 🟢) 1.159s 10 1.21x

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

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
🌐 Redis Next.js (Turbopack) 1.100s 2.006s 0.907s 10 1.00x
💻 Local Express 1.105s (+3.0%) 2.005s (~) 0.900s 10 1.01x
💻 Local Nitro 1.106s (+3.0%) 2.006s (~) 0.900s 10 1.01x
🌐 MongoDB Next.js (Turbopack) 1.311s 2.008s 0.697s 10 1.19x
🐘 Postgres Nitro 2.017s (-18.8% 🟢) 2.612s (-13.3% 🟢) 0.595s 10 1.84x
🐘 Postgres Express 2.294s (-5.7% 🟢) 2.813s (-6.8% 🟢) 0.519s 10 2.09x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.294s (-1.2%) 3.208s (-4.4%) 0.914s 10 1.00x
▲ Vercel Express 2.298s (-4.8%) 2.898s (-19.0% 🟢) 0.600s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.383s (-3.6%) 3.443s (-8.7% 🟢) 1.060s 10 1.04x

🔍 Observability: Nitro | Express | 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.714s 11.022s 0.308s 3 1.00x
🌐 Redis Next.js (Turbopack) 10.729s 11.022s 0.294s 3 1.00x
💻 Local Express 10.813s (+2.6%) 11.021s (~) 0.208s 3 1.01x
💻 Local Nitro 10.818s (+2.5%) 11.023s (~) 0.205s 3 1.01x
🌐 MongoDB Next.js (Turbopack) 12.215s 13.017s 0.802s 3 1.14x
🐘 Postgres Express 15.271s (-24.9% 🟢) 16.044s (-23.8% 🟢) 0.772s 2 1.43x
🐘 Postgres Nitro 15.450s (-24.0% 🟢) 16.044s (-23.8% 🟢) 0.594s 2 1.44x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 17.341s (-2.9%) 18.187s (-6.5% 🟢) 0.846s 2 1.00x
▲ Vercel Nitro 17.605s (-6.2% 🟢) 18.769s (-5.5% 🟢) 1.165s 2 1.02x
▲ Vercel Next.js (Turbopack) 17.703s (-4.3%) 18.638s (-7.4% 🟢) 0.935s 2 1.02x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.923s 27.050s 0.127s 3 1.00x
💻 Local Next.js (Turbopack) 27.196s 28.051s 0.855s 3 1.01x
💻 Local Express 27.494s (+2.8%) 28.051s (+3.7%) 0.557s 3 1.02x
💻 Local Nitro 27.538s (+2.9%) 28.051s (+3.7%) 0.513s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 30.349s 31.030s 0.682s 2 1.13x
🐘 Postgres Express 37.581s (-25.3% 🟢) 38.085s (-25.5% 🟢) 0.503s 2 1.40x
🐘 Postgres Nitro 38.834s (-22.9% 🟢) 39.601s (-22.5% 🟢) 0.767s 2 1.44x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 43.759s (-1.7%) 44.390s (-2.2%) 0.631s 2 1.00x
▲ Vercel Express 43.869s (~) 44.977s (-1.1%) 1.108s 2 1.00x
▲ Vercel Next.js (Turbopack) 44.517s (-1.3%) 46.168s (-0.6%) 1.651s 2 1.02x

🔍 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.362s 55.101s 0.739s 2 1.00x
💻 Local Next.js (Turbopack) 56.754s 57.100s 0.346s 2 1.04x
💻 Local Express 57.242s (+2.9%) 58.100s (+3.6%) 0.858s 2 1.05x
💻 Local Nitro 57.483s (+3.2%) 58.105s (+3.6%) 0.621s 2 1.06x
🌐 MongoDB Next.js (Turbopack) 60.910s 61.068s 0.158s 2 1.12x
🐘 Postgres Express 74.490s (-25.7% 🟢) 75.165s (-25.0% 🟢) 0.674s 2 1.37x
🐘 Postgres Nitro 76.005s (-17.6% 🟢) 76.679s (-17.7% 🟢) 0.674s 2 1.40x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 95.842s (-0.8%) 96.358s (-0.9%) 0.516s 1 1.00x
▲ Vercel Express 100.042s (+10.3% 🔺) 100.777s (+9.8% 🔺) 0.735s 1 1.04x
▲ Vercel Next.js (Turbopack) 101.098s (+7.8% 🔺) 102.140s (+7.1% 🔺) 1.042s 1 1.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.239s 2.006s 0.767s 15 1.00x
💻 Local Nitro 1.408s (+4.8%) 2.005s (~) 0.597s 15 1.14x
💻 Local Express 1.409s (+3.4%) 2.005s (~) 0.596s 15 1.14x
💻 Local Next.js (Turbopack) 1.412s 2.006s 0.594s 15 1.14x
🐘 Postgres Express 2.151s (-2.2%) 2.679s (-11.1% 🟢) 0.528s 12 1.74x
🌐 MongoDB Next.js (Turbopack) 2.167s 3.008s 0.841s 10 1.75x
🐘 Postgres Nitro 2.323s (+9.5% 🔺) 2.922s (+12.5% 🔺) 0.599s 11 1.87x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.194s (-14.0% 🟢) 3.140s (-10.0% 🟢) 0.945s 10 1.00x
▲ Vercel Express 2.321s (-20.9% 🟢) 3.093s (-19.1% 🟢) 0.773s 10 1.06x
▲ Vercel Next.js (Turbopack) 2.367s (-13.8% 🟢) 3.437s (-6.3% 🟢) 1.071s 9 1.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 2.518s 3.008s 0.490s 10 1.00x
💻 Local Next.js (Turbopack) 2.526s 3.007s 0.481s 10 1.00x
💻 Local Express 2.574s (+13.7% 🔺) 3.007s (~) 0.433s 10 1.02x
💻 Local Nitro 2.740s (+20.1% 🔺) 3.007s (~) 0.267s 10 1.09x
🌐 MongoDB Next.js (Turbopack) 4.702s 5.175s 0.473s 6 1.87x
🐘 Postgres Nitro 9.502s (~) 10.280s (+5.1% 🔺) 0.777s 4 3.77x
🐘 Postgres Express 10.640s (+27.6% 🔺) 11.030s (+22.0% 🔺) 0.390s 3 4.23x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.536s (-29.6% 🟢) 3.418s (-29.3% 🟢) 0.881s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.619s (-8.7% 🟢) 3.512s (-7.3% 🟢) 0.892s 9 1.03x
▲ Vercel Express 2.683s (-20.9% 🟢) 3.409s (-24.9% 🟢) 0.726s 9 1.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.130s 4.725s 0.595s 7 1.00x
💻 Local Next.js (Turbopack) 7.130s 7.766s 0.636s 4 1.73x
💻 Local Express 7.327s (+18.0% 🔺) 8.019s (+14.3% 🔺) 0.692s 4 1.77x
💻 Local Nitro 7.873s (+31.0% 🔺) 8.018s (+21.2% 🔺) 0.145s 4 1.91x
🌐 MongoDB Next.js (Turbopack) 9.796s 10.344s 0.549s 3 2.37x
🐘 Postgres Nitro 49.859s (-2.1%) 50.116s (-2.0%) 0.257s 1 12.07x
🐘 Postgres Express 50.450s (+6.4% 🔺) 51.132s (+6.2% 🔺) 0.682s 1 12.22x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.177s (-56.0% 🟢) 4.570s (-47.4% 🟢) 1.393s 7 1.00x
▲ Vercel Nitro 3.393s (-45.0% 🟢) 4.402s (-39.2% 🟢) 1.009s 7 1.07x
▲ Vercel Express 3.572s (-22.8% 🟢) 4.366s (-22.2% 🟢) 0.795s 8 1.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.250s 2.006s 0.757s 15 1.00x
💻 Local Next.js (Turbopack) 1.431s 2.005s 0.573s 15 1.15x
💻 Local Express 1.438s (+5.1% 🔺) 2.005s (~) 0.566s 15 1.15x
💻 Local Nitro 1.481s (+7.9% 🔺) 2.006s (~) 0.525s 15 1.19x
🐘 Postgres Nitro 1.867s (-6.5% 🟢) 2.512s (-11.2% 🟢) 0.646s 12 1.49x
🌐 MongoDB Next.js (Turbopack) 2.158s 3.007s 0.849s 10 1.73x
🐘 Postgres Express 2.196s (-1.6%) 2.679s (~) 0.484s 12 1.76x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.187s (-16.2% 🟢) 2.869s (-20.3% 🟢) 0.681s 11 1.00x
▲ Vercel Next.js (Turbopack) 2.302s (-9.7% 🟢) 3.494s (-2.5%) 1.192s 9 1.05x
▲ Vercel Nitro 2.571s (+8.4% 🔺) 3.463s (+3.2%) 0.892s 9 1.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 2.507s 3.008s 0.501s 10 1.00x
💻 Local Next.js (Turbopack) 2.618s 3.007s 0.389s 10 1.04x
💻 Local Express 2.655s (+11.3% 🔺) 3.008s (~) 0.353s 10 1.06x
💻 Local Nitro 2.890s (+23.2% 🔺) 3.342s (+11.1% 🔺) 0.452s 9 1.15x
🌐 MongoDB Next.js (Turbopack) 4.726s 5.177s 0.451s 6 1.88x
🐘 Postgres Nitro 12.004s (+7.3% 🔺) 12.365s (+5.7% 🔺) 0.361s 3 4.79x
🐘 Postgres Express 12.969s (+17.6% 🔺) 13.367s (+17.6% 🔺) 0.397s 3 5.17x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.397s (-27.3% 🟢) 3.226s (-28.8% 🟢) 0.829s 10 1.00x
▲ Vercel Nitro 2.423s (-30.4% 🟢) 3.314s (-28.9% 🟢) 0.891s 10 1.01x
▲ Vercel Express 2.640s (-7.6% 🟢) 3.264s (-15.9% 🟢) 0.623s 10 1.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.141s 5.011s 0.870s 6 1.00x
💻 Local Express 7.790s (+15.4% 🔺) 8.020s (+14.4% 🔺) 0.229s 4 1.88x
💻 Local Next.js (Turbopack) 7.928s 8.766s 0.838s 4 1.91x
💻 Local Nitro 8.615s (+26.4% 🔺) 9.017s (+25.0% 🔺) 0.402s 4 2.08x
🌐 MongoDB Next.js (Turbopack) 9.685s 10.349s 0.665s 3 2.34x
🐘 Postgres Express 50.999s (+3.9%) 51.122s (+4.0%) 0.123s 1 12.32x
🐘 Postgres Nitro 52.882s (+1.9%) 53.103s (+1.9%) 0.221s 1 12.77x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.654s (-18.4% 🟢) 3.674s (-15.8% 🟢) 1.019s 9 1.00x
▲ Vercel Nitro 2.895s (-26.9% 🟢) 3.684s (-25.9% 🟢) 0.789s 9 1.09x
▲ Vercel Next.js (Turbopack) 3.055s (-23.4% 🟢) 3.986s (-27.8% 🟢) 0.930s 8 1.15x

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

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.146s 1.001s 0.011s 1.016s 0.871s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.152s 1.000s 0.001s 1.007s 0.855s 10 1.05x
💻 Local Express 0.170s (+54.2% 🔺) 1.002s (~) 0.011s (+25.8% 🔺) 1.016s (~) 0.846s 10 1.17x
💻 Local Nitro 0.174s (+52.7% 🔺) 1.002s (~) 0.012s (+20.8% 🔺) 1.017s (~) 0.843s 10 1.19x
🌐 MongoDB Next.js (Turbopack) 0.472s 0.972s 0.001s 1.008s 0.535s 10 3.25x
🐘 Postgres Nitro 1.081s (-22.0% 🟢) 1.951s (+17.9% 🔺) 0.001s (-7.7% 🟢) 2.012s (~) 0.932s 10 7.42x
🐘 Postgres Express 1.359s (-40.8% 🟢) 1.680s (-38.8% 🟢) 0.001s (+18.2% 🔺) 2.012s (-33.3% 🟢) 0.653s 10 9.33x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.888s (-10.6% 🟢) 2.425s (-10.1% 🟢) 0.576s (+112.9% 🔺) 3.516s (-3.1%) 1.629s 10 1.00x
▲ Vercel Nitro 2.019s (-8.5% 🟢) 2.655s (-9.3% 🟢) 0.126s (-55.4% 🟢) 3.298s (-13.5% 🟢) 1.279s 10 1.07x
▲ Vercel Next.js (Turbopack) 2.170s (-0.6%) 2.825s (+4.5%) 0.139s (-47.7% 🟢) 3.553s (-0.6%) 1.383s 10 1.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

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

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.

Overall this is a clean, well-scoped mechanical refactor. The previous review feedback has been properly addressed (macrotask timing in step.ts, numeric sort comparator, runId in test calls, changeset simplification). Two observations below.

.then((payload) => {
next.resolve(payload);
})
.catch((error) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unlike step.ts where the Copilot reviewer flagged the macrotask-to-microtask timing change and setTimeout was preserved inside .then()/.catch(), this hook hydration path didn't have setTimeout originally (it was a synchronous next.resolve(payload)), so the .then() pattern is technically adding a microtask delay that wasn't there before.

In practice this should be fine since hook payloads are resolved asynchronously anyway, but wanted to flag the asymmetry: step.ts preserves timing with setTimeout inside .then(), while hook.ts does not. If you want full consistency you could add setTimeout here too, but I don't think it's necessary.

const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'
Copy link
Collaborator

Choose a reason for hiding this comment

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

The relaxation from expect(...).toEqual([4, 3, 2, 1, 0]) to a set-equality check is the most important behavioral change in this PR. This confirms that the async refactor does change observable Promise resolution ordering during replay (previously deterministic reverse-event-order, now non-deterministic due to microtask scheduling).

Worth confirming this is acceptable for production workflows that use Promise.race — if user code depends on the specific winner of a race during replay, does the non-deterministic ordering matter? I believe it's fine since Promise.race semantics only guarantee the first resolved value, not the order of all resolutions, but this is the one spot where "pure mechanical refactor, no functional changes" isn't quite accurate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow nice catch. Reverted that change.

@TooTallNate TooTallNate merged commit 0d5323c into main Feb 18, 2026
103 checks passed
@TooTallNate TooTallNate deleted the nate/async-serde branch February 18, 2026 07:18
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.

4 participants