Make serialization functions async - #978

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

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

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

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

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

changeset-botBot commented Feb 8, 2026

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/cliPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@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 8, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production534038572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds110469165
✅ 📋 Other135021156
Total2496462752817

❌ 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
AppPassedFailedSkipped
✅ astro4804
✅ example4804
✅ express4804
✅ fastify4804
✅ hono4804
✅ nextjs-turbopack5101
✅ nextjs-webpack5101
✅ nitro4804
✅ nuxt4804
✅ sveltekit4804
✅ vite4804
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4813
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@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🥇 Nitro0.032s (+17.6% 🔺)1.006s (~)0.974s101.00x
💻 LocalExpress0.032s (+21.6% 🔺)1.005s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.040s1.005s0.965s101.25x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.41x
🌐 MongoDBNext.js (Turbopack)0.104s1.007s0.903s103.26x
🐘 PostgresNitro0.138s (+26.5% 🔺)1.009s (~)0.871s104.31x
🐘 PostgresExpress0.427s (+203.0% 🔺)1.009s (~)0.583s1013.34x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.592s (-17.9% 🟢)1.970s (-29.7% 🟢)1.379s101.00x
▲ VercelNext.js (Turbopack)0.672s (-17.7% 🟢)2.101s (-2.2%)1.429s101.14x
▲ VercelExpress0.717s (-0.7%)1.876s (-16.0% 🟢)1.159s101.21x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.099s2.005s0.907s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.907s101.00x
💻 LocalExpress1.105s (+3.0%)2.005s (~)0.900s101.01x
💻 LocalNitro1.106s (+3.0%)2.006s (~)0.900s101.01x
🌐 MongoDBNext.js (Turbopack)1.311s2.008s0.697s101.19x
🐘 PostgresNitro2.017s (-18.8% 🟢)2.612s (-13.3% 🟢)0.595s101.84x
🐘 PostgresExpress2.294s (-5.7% 🟢)2.813s (-6.8% 🟢)0.519s102.09x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.294s (-1.2%)3.208s (-4.4%)0.914s101.00x
▲ VercelExpress2.298s (-4.8%)2.898s (-19.0% 🟢)0.600s101.00x
▲ VercelNext.js (Turbopack)2.383s (-3.6%)3.443s (-8.7% 🟢)1.060s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.714s11.022s0.308s31.00x
🌐 RedisNext.js (Turbopack)10.729s11.022s0.294s31.00x
💻 LocalExpress10.813s (+2.6%)11.021s (~)0.208s31.01x
💻 LocalNitro10.818s (+2.5%)11.023s (~)0.205s31.01x
🌐 MongoDBNext.js (Turbopack)12.215s13.017s0.802s31.14x
🐘 PostgresExpress15.271s (-24.9% 🟢)16.044s (-23.8% 🟢)0.772s21.43x
🐘 PostgresNitro15.450s (-24.0% 🟢)16.044s (-23.8% 🟢)0.594s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.341s (-2.9%)18.187s (-6.5% 🟢)0.846s21.00x
▲ VercelNitro17.605s (-6.2% 🟢)18.769s (-5.5% 🟢)1.165s21.02x
▲ VercelNext.js (Turbopack)17.703s (-4.3%)18.638s (-7.4% 🟢)0.935s21.02x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.923s27.050s0.127s31.00x
💻 LocalNext.js (Turbopack)27.196s28.051s0.855s31.01x
💻 LocalExpress27.494s (+2.8%)28.051s (+3.7%)0.557s31.02x
💻 LocalNitro27.538s (+2.9%)28.051s (+3.7%)0.513s31.02x
🌐 MongoDBNext.js (Turbopack)30.349s31.030s0.682s21.13x
🐘 PostgresExpress37.581s (-25.3% 🟢)38.085s (-25.5% 🟢)0.503s21.40x
🐘 PostgresNitro38.834s (-22.9% 🟢)39.601s (-22.5% 🟢)0.767s21.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro43.759s (-1.7%)44.390s (-2.2%)0.631s21.00x
▲ VercelExpress43.869s (~)44.977s (-1.1%)1.108s21.00x
▲ VercelNext.js (Turbopack)44.517s (-1.3%)46.168s (-0.6%)1.651s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.362s55.101s0.739s21.00x
💻 LocalNext.js (Turbopack)56.754s57.100s0.346s21.04x
💻 LocalExpress57.242s (+2.9%)58.100s (+3.6%)0.858s21.05x
💻 LocalNitro57.483s (+3.2%)58.105s (+3.6%)0.621s21.06x
🌐 MongoDBNext.js (Turbopack)60.910s61.068s0.158s21.12x
🐘 PostgresExpress74.490s (-25.7% 🟢)75.165s (-25.0% 🟢)0.674s21.37x
🐘 PostgresNitro76.005s (-17.6% 🟢)76.679s (-17.7% 🟢)0.674s21.40x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro95.842s (-0.8%)96.358s (-0.9%)0.516s11.00x
▲ VercelExpress100.042s (+10.3% 🔺)100.777s (+9.8% 🔺)0.735s11.04x
▲ VercelNext.js (Turbopack)101.098s (+7.8% 🔺)102.140s (+7.1% 🔺)1.042s11.05x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.239s2.006s0.767s151.00x
💻 LocalNitro1.408s (+4.8%)2.005s (~)0.597s151.14x
💻 LocalExpress1.409s (+3.4%)2.005s (~)0.596s151.14x
💻 LocalNext.js (Turbopack)1.412s2.006s0.594s151.14x
🐘 PostgresExpress2.151s (-2.2%)2.679s (-11.1% 🟢)0.528s121.74x
🌐 MongoDBNext.js (Turbopack)2.167s3.008s0.841s101.75x
🐘 PostgresNitro2.323s (+9.5% 🔺)2.922s (+12.5% 🔺)0.599s111.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.194s (-14.0% 🟢)3.140s (-10.0% 🟢)0.945s101.00x
▲ VercelExpress2.321s (-20.9% 🟢)3.093s (-19.1% 🟢)0.773s101.06x
▲ VercelNext.js (Turbopack)2.367s (-13.8% 🟢)3.437s (-6.3% 🟢)1.071s91.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.518s3.008s0.490s101.00x
💻 LocalNext.js (Turbopack)2.526s3.007s0.481s101.00x
💻 LocalExpress2.574s (+13.7% 🔺)3.007s (~)0.433s101.02x
💻 LocalNitro2.740s (+20.1% 🔺)3.007s (~)0.267s101.09x
🌐 MongoDBNext.js (Turbopack)4.702s5.175s0.473s61.87x
🐘 PostgresNitro9.502s (~)10.280s (+5.1% 🔺)0.777s43.77x
🐘 PostgresExpress10.640s (+27.6% 🔺)11.030s (+22.0% 🔺)0.390s34.23x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.536s (-29.6% 🟢)3.418s (-29.3% 🟢)0.881s91.00x
▲ VercelNext.js (Turbopack)2.619s (-8.7% 🟢)3.512s (-7.3% 🟢)0.892s91.03x
▲ VercelExpress2.683s (-20.9% 🟢)3.409s (-24.9% 🟢)0.726s91.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.130s4.725s0.595s71.00x
💻 LocalNext.js (Turbopack)7.130s7.766s0.636s41.73x
💻 LocalExpress7.327s (+18.0% 🔺)8.019s (+14.3% 🔺)0.692s41.77x
💻 LocalNitro7.873s (+31.0% 🔺)8.018s (+21.2% 🔺)0.145s41.91x
🌐 MongoDBNext.js (Turbopack)9.796s10.344s0.549s32.37x
🐘 PostgresNitro49.859s (-2.1%)50.116s (-2.0%)0.257s112.07x
🐘 PostgresExpress50.450s (+6.4% 🔺)51.132s (+6.2% 🔺)0.682s112.22x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.177s (-56.0% 🟢)4.570s (-47.4% 🟢)1.393s71.00x
▲ VercelNitro3.393s (-45.0% 🟢)4.402s (-39.2% 🟢)1.009s71.07x
▲ VercelExpress3.572s (-22.8% 🟢)4.366s (-22.2% 🟢)0.795s81.12x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.757s151.00x
💻 LocalNext.js (Turbopack)1.431s2.005s0.573s151.15x
💻 LocalExpress1.438s (+5.1% 🔺)2.005s (~)0.566s151.15x
💻 LocalNitro1.481s (+7.9% 🔺)2.006s (~)0.525s151.19x
🐘 PostgresNitro1.867s (-6.5% 🟢)2.512s (-11.2% 🟢)0.646s121.49x
🌐 MongoDBNext.js (Turbopack)2.158s3.007s0.849s101.73x
🐘 PostgresExpress2.196s (-1.6%)2.679s (~)0.484s121.76x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.187s (-16.2% 🟢)2.869s (-20.3% 🟢)0.681s111.00x
▲ VercelNext.js (Turbopack)2.302s (-9.7% 🟢)3.494s (-2.5%)1.192s91.05x
▲ VercelNitro2.571s (+8.4% 🔺)3.463s (+3.2%)0.892s91.18x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.507s3.008s0.501s101.00x
💻 LocalNext.js (Turbopack)2.618s3.007s0.389s101.04x
💻 LocalExpress2.655s (+11.3% 🔺)3.008s (~)0.353s101.06x
💻 LocalNitro2.890s (+23.2% 🔺)3.342s (+11.1% 🔺)0.452s91.15x
🌐 MongoDBNext.js (Turbopack)4.726s5.177s0.451s61.88x
🐘 PostgresNitro12.004s (+7.3% 🔺)12.365s (+5.7% 🔺)0.361s34.79x
🐘 PostgresExpress12.969s (+17.6% 🔺)13.367s (+17.6% 🔺)0.397s35.17x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.397s (-27.3% 🟢)3.226s (-28.8% 🟢)0.829s101.00x
▲ VercelNitro2.423s (-30.4% 🟢)3.314s (-28.9% 🟢)0.891s101.01x
▲ VercelExpress2.640s (-7.6% 🟢)3.264s (-15.9% 🟢)0.623s101.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.141s5.011s0.870s61.00x
💻 LocalExpress7.790s (+15.4% 🔺)8.020s (+14.4% 🔺)0.229s41.88x
💻 LocalNext.js (Turbopack)7.928s8.766s0.838s41.91x
💻 LocalNitro8.615s (+26.4% 🔺)9.017s (+25.0% 🔺)0.402s42.08x
🌐 MongoDBNext.js (Turbopack)9.685s10.349s0.665s32.34x
🐘 PostgresExpress50.999s (+3.9%)51.122s (+4.0%)0.123s112.32x
🐘 PostgresNitro52.882s (+1.9%)53.103s (+1.9%)0.221s112.77x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.654s (-18.4% 🟢)3.674s (-15.8% 🟢)1.019s91.00x
▲ VercelNitro2.895s (-26.9% 🟢)3.684s (-25.9% 🟢)0.789s91.09x
▲ VercelNext.js (Turbopack)3.055s (-23.4% 🟢)3.986s (-27.8% 🟢)0.930s81.15x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.146s1.001s0.011s1.016s0.871s101.00x
🌐 RedisNext.js (Turbopack)0.152s1.000s0.001s1.007s0.855s101.05x
💻 LocalExpress0.170s (+54.2% 🔺)1.002s (~)0.011s (+25.8% 🔺)1.016s (~)0.846s101.17x
💻 LocalNitro0.174s (+52.7% 🔺)1.002s (~)0.012s (+20.8% 🔺)1.017s (~)0.843s101.19x
🌐 MongoDBNext.js (Turbopack)0.472s0.972s0.001s1.008s0.535s103.25x
🐘 PostgresNitro1.081s (-22.0% 🟢)1.951s (+17.9% 🔺)0.001s (-7.7% 🟢)2.012s (~)0.932s107.42x
🐘 PostgresExpress1.359s (-40.8% 🟢)1.680s (-38.8% 🟢)0.001s (+18.2% 🔺)2.012s (-33.3% 🟢)0.653s109.33x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.888s (-10.6% 🟢)2.425s (-10.1% 🟢)0.576s (+112.9% 🔺)3.516s (-3.1%)1.629s101.00x
▲ VercelNitro2.019s (-8.5% 🟢)2.655s (-9.3% 🟢)0.126s (-55.4% 🟢)3.298s (-13.5% 🟢)1.279s101.07x
▲ VercelNext.js (Turbopack)2.170s (-0.6%)2.825s (+4.5%)0.139s (-47.7% 🟢)3.553s (-0.6%)1.383s101.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis5/12
Nitro💻 Local8/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

vercelBot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@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 #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 CopilotFebruary 9, 2026 23:01

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

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
FileDescription
packages/core/src/serialization.tsConverts core (de)serialization APIs to async/Promise return types.
packages/core/src/workflow.tsAwaits workflow argument hydration and return value dehydration.
packages/core/src/step.tsAdjusts step result hydration to async .then/.catch resolution.
packages/core/src/workflow/hook.tsAdjusts hook payload hydration to async .then/.catch resolution.
packages/core/src/runtime/start.tsAwaits workflow argument dehydration before emitting run_created.
packages/core/src/runtime/run.tsAwaits workflow return value hydration for completed runs.
packages/core/src/runtime/runs.tsAwaits workflow argument hydration when recreating runs.
packages/core/src/runtime/step-handler.tsAwaits step argument hydration and step return value dehydration.
packages/core/src/runtime/suspension-handler.tsAwaits dehydration when building hook/step events; uses Promise.all for hook events.
packages/core/src/runtime/resume-hook.tsAwaits hook metadata hydration and payload dehydration.
packages/core/src/observability.tsMakes hydrateResourceIO and helpers async; awaits internal hydration paths.
packages/cli/src/lib/inspect/output.tsAwaits hydrateResourceIO and batches hydration with Promise.all.
packages/web/src/server/workflow-server-actions.tsMakes hydration helper async and batches list hydration via Promise.all.
workbench/nextjs-webpack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
workbench/nextjs-turbopack/pages/api/trigger-pages.tsAwaits workflow argument hydration from request body.
packages/core/src/serialization.test.tsUpdates serialization tests to async/await and promise rejection assertions.
packages/core/src/workflow.test.tsUpdates workflow tests for async serde and relaxes Promise.race ordering assertion.
packages/core/src/step.test.tsUpdates step tests for async dehydration.
packages/core/src/workflow/hook.test.tsUpdates hook tests for async dehydration.
packages/core/src/observability.test.tsUpdates observability tests for async hydration/dehydration.
.changeset/async-serde.mdPublishes a patch changeset documenting async serialization refactor.

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

Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts
Comment threadpackages/core/src/workflow.test.ts Outdated
Comment threadpackages/core/src/step.ts
Comment threadpackages/core/src/step.test.ts
Comment threadpackages/core/src/workflow/hook.test.ts

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

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
Copy Markdown
Contributor

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.

Comment threadpackages/core/src/workflow.test.ts Outdated
const raceResults = await hydrateWorkflowReturnValue(
result as any,
ops,
'wrun_test'

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.

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
Copy Markdown
MemberAuthor

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.

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.

4 participants

@TooTallNate@pranaygp@VaguelySerious