Skip to content

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
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;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Inline class serialization registration to fix 3rd-party package support (v2) by TooTallNate · Pull Request #1503 · vercel/workflow · GitHub
Skip to content

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Inline class serialization registration to fix 3rd-party package support (v2) by TooTallNate · Pull Request #1503 · vercel/workflow · GitHub
Skip to content

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TooTallNate
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Inline class serialization registration to fix 3rd-party package support (v2) by TooTallNate · Pull Request #1503 · vercel/workflow · GitHub
Skip to content

Inline class serialization registration to fix 3rd-party package support (v2) - #1503

Merged
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2
Mar 24, 2026
Merged

Inline class serialization registration to fix 3rd-party package support (v2)#1503
TooTallNate merged 2 commits into
mainfrom
nrajlich/inline-class-serialization-registration-v2

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

Re-lands #1480 (which was reverted in #1493) with the missing CJS require fixture updates.

What happened

PR #1480 was merged to main but the post-merge E2E CI failed with 6 SWC fixture test failures. The failures were in custom-serialization-require-destructured and custom-serialization-require-namespace — fixture directories that were added by PR #1144 (CJS require detection) which landed on main after #1480's branch was created. The original PR's fixtures were correct for all tests that existed at branch time, but the 6 new CJS fixtures still had the old import { registerSerializationClass } pattern.

Fix

Updated the 6 CJS require fixture output files to use the inline IIFE registration pattern, matching all other fixture outputs. All 135 SWC tests pass (129 original + 6 CJS).

Changes

This PR contains two commits:

  1. Cherry-pick of the original Inline class serialization registration to fix 3rd-party package support #1480 merge (inline class serialization)
  2. The 6 missing CJS fixture output updates

The core change is identical to #1480 — see that PR for full context.

…ort (#1480)
* Inline class serialization registration to fix 3rd-party package support
The SWC plugin previously generated:
import { registerSerializationClass } from "workflow/internal/class-serialization";
registerSerializationClass("class//...", ClassName);
This broke for 3rd-party packages (e.g. @vercel/sandbox) that define
serializable classes but don't depend on the 'workflow' package. The
bare 'workflow' specifier is unresolvable from within node_modules of
a package that doesn't list it as a dependency.
Now the plugin generates a self-contained IIFE that uses
Symbol.for('workflow-class-registry') on globalThis directly, with
zero module dependencies:
(function(__wf_cls, __wf_id) {
var __wf_sym = Symbol.for("workflow-class-registry"),
__wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = new Map());
__wf_reg.set(__wf_id, __wf_cls);
Object.defineProperty(__wf_cls, "classId", { ... });
})(ClassName, "class//...");
This is fully compatible with the existing deserialization side in
@workflow/core which reads from the same globalThis registry.
* Address review feedback: fix comment and update docstring
- Fix inaccurate IIFE comment in lib.rs: the second arg is the
generated class ID string, not the literal "classId"
- Update registerSerializationClass docstring to reflect that the
SWC plugin now inlines equivalent logic rather than importing it
The original PR #1480 was merged but reverted because it didn't include
updated fixtures for the CJS require patterns added by PR #1144
(custom-serialization-require-destructured and
custom-serialization-require-namespace). These fixtures still had the
old 'import { registerSerializationClass }' pattern instead of the
new inline IIFE.
@TooTallNate
TooTallNate requested a review from a team as a code ownerMarch 24, 2026 12:23
CopilotAI review requested due to automatic review settings March 24, 2026 12:23
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dba3d5

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

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

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

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production812167880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1245624204
✅ 📋 Other198042240
Total3552576754284

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3

turso (51 failed):

  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • addTenWorkflow | wrun_01KMFWZ0H4Z1XY3401A59QNEVB
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMFX13WWTRD6EMWQQCCPVT45
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMFWZ7QPB50TNEGXJCF0Z6QN
  • promiseRaceWorkflow | wrun_01KMFWZCJQRDBH0RN7SE15WFWW
  • promiseAnyWorkflow | wrun_01KMFWZEVV4JR7B4M4X79TRV5M
  • importedStepOnlyWorkflow | wrun_01KMFX1KVHFN6G7Y2ND0KS79J8
  • hookWorkflow | wrun_01KMFWZV8DX1F9DVWTE76FFFDK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMFX06N3NZ37YQP5EV0ZDWE0
  • webhookWorkflow | wrun_01KMFX0FH01YM8HGVVPA83DJJC
  • sleepingWorkflow | wrun_01KMFX0QQAD7G112D5CJ2D8DAH
  • parallelSleepWorkflow | wrun_01KMFX181E7362FHB816QE04EJ
  • nullByteWorkflow | wrun_01KMFX1CS28H2YM0NBH838VBTJ
  • workflowAndStepMetadataWorkflow | wrun_01KMFX1F3XDYFR84T73D1NADN5
  • fetchWorkflow | wrun_01KMFX475DQ6TW0FGY6Q3AXT7X
  • promiseRaceStressTestWorkflow | wrun_01KMFX4ASH0JQB6VWG05A7WDHC
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMFX7DFB25J5E1JMKTZ4V8GW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMFX82JXFPWWC1500HN1BNM3
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMFX8R67EVAHWPXKWE16BZSQ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMFX9CFTFKHBFD7WJ1F7TNJ6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMFX9NMVN08ZE5M6V1WWA4F4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMFXA3VW78E80H12YP5Z0PX3
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMFXA6BYTN3B6BSD68337QYM
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMFXAP967YCAKQ3G5NH7MB0R
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMFXAW54PR5F3810J900ES0T
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMFXB1XQ35RB76ZPKBQ26SWQ
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMFXB9969298BKTE893A4TX9
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMFXBG9424Y98D305JPF32MH
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMFXBQCF4EADMJFQDW4Z873S
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMFXBYH268FJRE9G5B9Z5GJY
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMFXCA642EMTZYVDHZYW3MME
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMFXCJ92W4CWN6J9Y5A7BN8Q
  • cancelRun - cancelling a running workflow | wrun_01KMFXCS646XKSWGCFQD6JEFZK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMFXD2KQCP15KWBG1MD1D40H
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMFXDEWK9FJNS4MEVDVTQS0B
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMFXE4DJCMBZ33XA38XH1T4F
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMFXEJJS1BXF9YYPKQW20BSB

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7307
✅ example7307
✅ express7307
✅ fastify7307
✅ hono7307
❌ nextjs-turbopack7712
✅ nextjs-webpack7802
✅ nitro7307
✅ nuxt7307
✅ sveltekit7307
✅ vite7307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66014
✅ express-stable66014
✅ fastify-stable66014
✅ hono-stable66014
✅ nextjs-turbopack-canary55025
✅ nextjs-turbopack-stable7208
✅ nextjs-webpack-canary55025
✅ nextjs-webpack-stable7208
✅ nitro-stable66014
✅ nuxt-stable66014
✅ sveltekit-stable66014
✅ vite-stable66014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5238
✅ redis-dev500
❌ redis5328
✅ turso-dev500
❌ turso4518
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66014
✅ e2e-local-postgres-nest-stable66014
✅ e2e-local-prod-nest-stable66014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-10.0% 🟢)1.005s (~)0.962s101.00x
💻 LocalNitro0.045s (+4.9%)1.006s (~)0.961s101.05x
🌐 RedisNext.js (Turbopack)0.054s1.006s0.952s101.25x
🐘 PostgresExpress0.058s (-8.5% 🟢)1.011s (~)0.953s101.35x
🐘 PostgresNext.js (Turbopack)0.061s1.011s0.950s101.41x
🐘 PostgresNitro0.063s (+19.3% 🔺)1.011s (~)0.948s101.45x
🌐 MongoDBNext.js (Turbopack)0.111s1.008s0.897s102.57x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.485s (-10.3% 🟢)2.654s (+19.4% 🔺)2.169s101.00x
▲ VercelNitro0.487s (-12.9% 🟢)2.478s (+12.6% 🔺)1.991s101.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.119s2.007s0.887s101.00x
💻 LocalExpress1.128s (-0.5%)2.005s (~)0.878s101.01x
💻 LocalNitro1.133s (~)2.006s (~)0.873s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.012s0.872s101.02x
🐘 PostgresNitro1.142s (+2.2%)2.010s (~)0.868s101.02x
🐘 PostgresExpress1.151s (~)2.013s (~)0.862s101.03x
🌐 MongoDBNext.js (Turbopack)1.318s2.009s0.690s101.18x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.129s (-1.5%)3.776s (~)1.647s101.00x
▲ VercelNext.js (Turbopack)2.211s (+5.7% 🔺)3.939s (+13.9% 🔺)1.728s101.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.747s11.022s0.276s31.00x
🐘 PostgresNitro10.868s (+2.0%)11.023s (~)0.155s31.01x
🐘 PostgresExpress10.869s (~)11.021s (~)0.152s31.01x
🐘 PostgresNext.js (Turbopack)10.879s11.020s0.142s31.01x
💻 LocalExpress10.894s (~)11.021s (~)0.127s31.01x
💻 LocalNitro10.929s (~)11.025s (~)0.095s31.02x
🌐 MongoDBNext.js (Turbopack)12.238s13.018s0.780s31.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.348s (+3.4%)19.252s (+7.0% 🔺)1.904s21.00x
▲ VercelNext.js (Turbopack)18.005s (-0.5%)20.138s (+5.8% 🔺)2.133s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.228s15.027s0.798s41.00x
🐘 PostgresNext.js (Turbopack)14.445s15.028s0.583s41.02x
🐘 PostgresNitro14.546s (+4.1%)15.027s (+5.7% 🔺)0.482s41.02x
🐘 PostgresExpress14.557s (~)15.022s (~)0.465s41.02x
💻 LocalExpress14.871s (~)15.027s (~)0.156s41.05x
💻 LocalNitro14.950s (~)15.028s (~)0.079s41.05x
🌐 MongoDBNext.js (Turbopack)17.874s18.025s0.151s41.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.795s (-2.3%)34.339s (-2.2%)1.543s21.00x
▲ VercelNext.js (Turbopack)34.116s (-1.7%)36.042s (-1.2%)1.926s21.04x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.348s14.025s0.677s71.00x
🐘 PostgresNext.js (Turbopack)13.821s14.022s0.201s71.04x
🐘 PostgresExpress13.921s (~)14.023s (-1.0%)0.102s71.04x
🐘 PostgresNitro14.213s (+9.1% 🔺)14.881s (+11.8% 🔺)0.668s71.06x
💻 LocalNitro16.513s (~)17.030s (~)0.517s61.24x
💻 LocalExpress16.575s (+0.7%)17.029s (~)0.455s61.24x
🌐 MongoDBNext.js (Turbopack)20.352s21.025s0.673s51.52x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)61.444s (-1.4%)63.186s (-0.5%)1.742s21.00x
▲ VercelNitro210.294s (+273.3% 🔺)212.178s (+271.1% 🔺)1.884s23.42x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.011s0.781s151.00x
🐘 PostgresExpress1.271s (~)2.011s (~)0.740s151.03x
🐘 PostgresNitro1.283s (+6.4% 🔺)2.011s (~)0.728s151.04x
🌐 RedisNext.js (Turbopack)1.338s2.073s0.735s151.09x
💻 LocalExpress1.496s (~)2.006s (~)0.510s151.22x
💻 LocalNitro1.501s (+1.0%)2.005s (~)0.504s151.22x
🌐 MongoDBNext.js (Turbopack)2.148s3.008s0.860s101.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.423s (-9.7% 🟢)3.956s (-13.9% 🟢)1.533s81.00x
▲ VercelNitro2.961s (+17.4% 🔺)4.375s (+13.7% 🔺)1.414s71.22x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.334s (+2.3%)3.011s (~)0.678s101.00x
🐘 PostgresExpress2.372s (+1.8%)3.012s (~)0.640s101.02x
🐘 PostgresNext.js (Turbopack)2.425s3.010s0.585s101.04x
🌐 RedisNext.js (Turbopack)2.577s3.008s0.430s101.10x
💻 LocalExpress2.960s (+3.2%)3.676s (+18.3% 🔺)0.716s91.27x
💻 LocalNitro3.067s (+2.9%)3.758s (+12.5% 🔺)0.691s81.31x
🌐 MongoDBNext.js (Turbopack)4.697s5.176s0.479s62.01x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.864s (+7.3% 🔺)4.367s (-14.5% 🟢)1.504s71.00x
▲ VercelNext.js (Turbopack)3.211s (+15.9% 🔺)5.822s (+48.5% 🔺)2.611s61.12x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.469s (+0.9%)4.015s (~)0.545s81.00x
🐘 PostgresNitro3.470s (+2.8%)4.013s (~)0.543s81.00x
🐘 PostgresNext.js (Turbopack)3.666s4.011s0.345s81.06x
🌐 RedisNext.js (Turbopack)4.118s5.011s0.893s61.19x
💻 LocalExpress7.925s (-7.8% 🟢)8.268s (-8.3% 🟢)0.343s42.28x
💻 LocalNitro8.583s (+8.8% 🔺)9.022s (+2.9%)0.439s42.47x
🌐 MongoDBNext.js (Turbopack)10.088s10.350s0.262s32.91x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.976s (+8.9% 🔺)5.240s (+24.0% 🔺)2.264s61.00x
▲ VercelNext.js (Turbopack)4.167s (+16.6% 🔺)6.126s (+22.1% 🔺)1.959s51.40x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.241s2.009s0.769s151.00x
🐘 PostgresNitro1.251s (+3.5%)2.009s (~)0.758s151.01x
🐘 PostgresExpress1.258s (-0.6%)2.009s (~)0.751s151.01x
🌐 RedisNext.js (Turbopack)1.300s2.006s0.706s151.05x
💻 LocalNitro1.510s (-1.6%)2.005s (~)0.494s151.22x
💻 LocalExpress1.553s (~)2.006s (~)0.453s151.25x
🌐 MongoDBNext.js (Turbopack)2.189s3.008s0.819s101.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.431s (-2.6%)3.979s (+5.1% 🔺)1.548s81.00x
▲ VercelNitro2.548s (+18.0% 🔺)4.201s (+11.5% 🔺)1.653s81.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.331s (+0.6%)3.012s (~)0.681s101.00x
🐘 PostgresNitro2.364s (+4.7%)3.012s (~)0.648s101.01x
🐘 PostgresNext.js (Turbopack)2.387s3.011s0.624s101.02x
🌐 RedisNext.js (Turbopack)2.593s3.007s0.414s101.11x
💻 LocalExpress3.032s (-1.6%)3.885s (+3.3%)0.853s81.30x
💻 LocalNitro3.056s (+1.6%)3.760s (~)0.704s81.31x
🌐 MongoDBNext.js (Turbopack)4.644s5.175s0.531s61.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.433s (-6.4% 🟢)3.907s (+0.5%)1.473s81.00x
▲ VercelNext.js (Turbopack)3.206s (+2.9%)4.836s (+11.8% 🔺)1.631s71.32x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.470s (+2.6%)4.012s (~)0.541s81.00x
🐘 PostgresExpress3.480s (~)4.014s (~)0.534s81.00x
🐘 PostgresNext.js (Turbopack)3.646s4.014s0.368s81.05x
🌐 RedisNext.js (Turbopack)4.148s4.726s0.578s71.20x
💻 LocalNitro8.487s (-0.9%)9.025s (~)0.538s42.45x
💻 LocalExpress8.876s (+2.4%)9.275s (+2.8%)0.399s42.56x
🌐 MongoDBNext.js (Turbopack)10.029s10.349s0.320s32.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.121s (-9.7% 🟢)4.783s (-7.1% 🟢)1.662s71.00x
▲ VercelNext.js (Turbopack)4.599s (+15.7% 🔺)6.009s (+7.9% 🔺)1.411s51.47x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.692s1.021s0.329s591.00x
🐘 PostgresNext.js (Turbopack)0.767s1.008s0.240s601.11x
🐘 PostgresNitro0.815s (+38.8% 🔺)1.006s (~)0.191s601.18x
🐘 PostgresExpress0.820s (~)1.008s (~)0.188s601.18x
💻 LocalExpress0.962s (-1.1%)1.056s (~)0.094s581.39x
💻 LocalNitro0.985s (+2.4%)1.159s (+9.6% 🔺)0.173s521.42x
🌐 MongoDBNext.js (Turbopack)2.140s3.007s0.867s203.09x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)10.141s (-5.0%)12.199s (-8.1% 🟢)2.058s51.00x
▲ VercelNitro11.587s (+4.0%)14.381s (+16.0% 🔺)2.794s51.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.650s2.028s0.377s451.00x
🐘 PostgresNext.js (Turbopack)1.903s2.126s0.223s431.15x
🐘 PostgresNitro1.914s (+33.8% 🔺)2.008s (~)0.094s451.16x
🐘 PostgresExpress2.055s (+7.2% 🔺)2.581s (+24.3% 🔺)0.526s351.25x
💻 LocalExpress2.961s (+0.7%)3.180s (+2.2%)0.219s291.79x
💻 LocalNitro2.968s (~)3.215s (+3.4%)0.247s291.80x
🌐 MongoDBNext.js (Turbopack)5.210s6.011s0.801s153.16x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro32.041s (-1.1%)35.262s (+4.4%)3.221s31.00x
▲ VercelNext.js (Turbopack)32.287s (-2.8%)34.250s (-0.9%)1.962s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.308s4.008s0.700s301.00x
🐘 PostgresNext.js (Turbopack)3.841s4.046s0.205s301.16x
🐘 PostgresNitro3.931s (+35.4% 🔺)4.219s (+36.7% 🔺)0.288s291.19x
🐘 PostgresExpress4.151s (+5.3% 🔺)4.784s (+11.3% 🔺)0.633s261.25x
💻 LocalExpress8.919s (~)9.247s (-0.8%)0.328s132.70x
💻 LocalNitro8.977s (~)9.402s (+0.8%)0.425s132.71x
🌐 MongoDBNext.js (Turbopack)10.379s11.018s0.639s113.14x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro83.526s (-0.7%)85.370s (~)1.844s21.00x
▲ VercelNext.js (Turbopack)96.817s (+9.8% 🔺)99.003s (+10.9% 🔺)2.187s21.16x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.262s1.008s0.746s601.00x
🐘 PostgresNitro0.271s (+23.3% 🔺)1.008s (~)0.737s601.03x
🐘 PostgresExpress0.290s (+5.4% 🔺)1.009s (~)0.719s601.10x
🌐 RedisNext.js (Turbopack)0.434s1.021s0.587s591.65x
💻 LocalNitro0.572s (-1.3%)1.005s (~)0.432s602.18x
💻 LocalExpress0.606s (~)1.004s (-1.7%)0.398s602.31x
🌐 MongoDBNext.js (Turbopack)1.646s2.149s0.503s286.27x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.748s (+8.2% 🔺)3.493s (+12.3% 🔺)1.745s181.00x
▲ VercelNext.js (Turbopack)1.975s (-2.3%)3.978s (-0.5%)2.003s161.13x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.501s (+30.8% 🔺)1.008s (~)0.506s901.00x
🐘 PostgresNext.js (Turbopack)0.504s1.008s0.505s901.00x
🐘 PostgresExpress0.506s (-0.8%)1.008s (~)0.501s901.01x
🌐 RedisNext.js (Turbopack)1.142s2.006s0.864s452.28x
💻 LocalExpress2.452s (~)3.009s (~)0.557s304.89x
💻 LocalNitro2.517s (-1.3%)3.009s (~)0.492s305.02x
🌐 MongoDBNext.js (Turbopack)4.679s5.175s0.497s189.33x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.938s (~)4.675s (+6.8% 🔺)1.737s201.00x
▲ VercelNext.js (Turbopack)3.654s (-16.6% 🟢)5.653s (~)2.000s161.24x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.774s (+33.9% 🔺)1.008s (~)0.235s1191.00x
🐘 PostgresNext.js (Turbopack)0.792s1.009s0.216s1191.02x
🐘 PostgresExpress0.801s (+4.1%)1.010s (~)0.208s1191.04x
🌐 RedisNext.js (Turbopack)2.681s3.007s0.326s403.46x
🌐 MongoDBNext.js (Turbopack)9.882s10.431s0.549s1212.77x
💻 LocalExpress10.786s (-2.6%)11.298s (-1.6%)0.512s1113.94x
💻 LocalNitro10.921s (-2.3%)11.481s (-3.0%)0.560s1114.11x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro7.496s (-4.3%)8.995s (-5.7% 🟢)1.499s141.00x
▲ VercelNext.js (Turbopack)30.614s (-54.6% 🟢)32.799s (-52.7% 🟢)2.185s134.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.190s1.000s0.002s1.010s0.820s101.00x
🌐 RedisNext.js (Turbopack)0.191s1.001s0.002s1.008s0.817s101.00x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.011s (-4.3%)1.017s (~)0.817s101.05x
🐘 PostgresExpress0.201s (-1.8%)0.996s (~)0.001s (-14.3% 🟢)1.012s (~)0.811s101.06x
💻 LocalNitro0.204s (+1.4%)1.003s (~)0.013s (+18.9% 🔺)1.020s (~)0.815s101.07x
🐘 PostgresNitro0.224s (+50.6% 🔺)0.995s (~)0.001s (+30.0% 🔺)1.011s (~)0.787s101.18x
🌐 MongoDBNext.js (Turbopack)0.490s0.964s0.002s1.009s0.519s102.57x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.733s (+3.3%)2.786s (+5.3% 🔺)0.454s (-29.7% 🟢)4.230s (+10.6% 🔺)2.496s101.00x
▲ VercelNext.js (Turbopack)1.856s (+9.1% 🔺)3.059s (+12.0% 🔺)0.397s (-15.3% 🟢)4.111s (+10.3% 🔺)2.255s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.476s1.000s0.003s1.010s0.534s601.00x
🐘 PostgresNitro0.596s (+20.9% 🔺)1.004s (~)0.004s (+6.4% 🔺)1.024s (~)0.428s591.25x
🐘 PostgresNext.js (Turbopack)0.611s1.007s0.004s1.023s0.412s591.28x
🐘 PostgresExpress0.623s (+3.3%)1.003s (~)0.004s (+5.4% 🔺)1.024s (~)0.401s591.31x
💻 LocalExpress0.718s (+0.6%)1.009s (~)0.009s (-0.9%)1.023s (~)0.305s591.51x
💻 LocalNitro0.720s (~)1.009s (~)0.010s (+1.0%)1.023s (~)0.303s591.51x
🌐 MongoDBNext.js (Turbopack)1.319s1.950s0.003s2.012s0.693s302.77x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.949s (+4.1%)6.293s (+8.8% 🔺)0.232s (+15.8% 🔺)7.328s (+11.6% 🔺)2.379s91.00x
▲ VercelNitro5.088s (+27.3% 🔺)6.480s (+22.3% 🔺)0.210s (-44.9% 🟢)7.383s (+18.4% 🔺)2.295s91.03x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.869s1.000s0.000s1.004s0.136s601.00x
🐘 PostgresNext.js (Turbopack)0.960s1.200s0.000s1.214s0.254s501.11x
🐘 PostgresExpress0.988s (+2.1%)1.239s (+2.0%)0.000s (+50.0% 🔺)1.255s (+1.7%)0.267s491.14x
🐘 PostgresNitro1.008s (+9.5% 🔺)1.412s (+29.8% 🔺)0.000s (+27.9% 🔺)1.429s (+28.6% 🔺)0.421s431.16x
💻 LocalNitro1.224s (-1.5%)2.020s (~)0.000s (+50.0% 🔺)2.023s (~)0.799s301.41x
💻 LocalExpress1.231s (~)2.020s (~)0.000s (+18.2% 🔺)2.023s (~)0.792s301.42x
🌐 MongoDBNext.js (Turbopack)2.342s2.953s0.000s3.007s0.665s202.70x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.002s (-6.6% 🟢)3.743s (-5.4% 🟢)0.000s (NaN%)4.445s (-0.8%)1.442s141.00x
▲ VercelNext.js (Turbopack)3.521s (-7.1% 🟢)4.753s (-1.0%)0.000s (+118.2% 🔺)5.553s (+3.3%)2.032s111.17x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.521s2.002s0.000s2.006s0.486s301.00x
🐘 PostgresNitro1.764s (+6.6% 🔺)2.176s (+5.2% 🔺)0.000s (-100.0% 🟢)2.189s (+5.3% 🔺)0.425s281.16x
🐘 PostgresExpress1.771s (-1.3%)2.176s (+3.7%)0.000s (NaN%)2.190s (+3.5%)0.419s281.16x
🐘 PostgresNext.js (Turbopack)1.873s2.105s0.000s2.114s0.241s291.23x
💻 LocalNitro3.476s (-3.5%)4.097s (~)0.001s (-10.0% 🟢)4.102s (~)0.625s152.29x
💻 LocalExpress3.638s (+6.0% 🔺)4.098s (+1.6%)0.001s (+160.0% 🔺)4.103s (+1.6%)0.465s152.39x
🌐 MongoDBNext.js (Turbopack)4.377s4.956s0.000s5.010s0.633s122.88x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.271s (+2.4%)5.398s (+5.4% 🔺)0.000s (~)6.042s (+7.6% 🔺)1.771s111.00x
▲ VercelNext.js (Turbopack)5.947s (+34.2% 🔺)7.196s (+22.0% 🔺)0.000s (+Infinity% 🔺)8.001s (+25.1% 🔺)2.053s81.39x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresNext.js (Turbopack)11/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres18/21
Next.js (Turbopack)🌐 Redis11/21
Nitro🐘 Postgres16/21
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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

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

Re-lands the SWC transform change that inlines class-serialization registration (to avoid importing workflow/internal/class-serialization from transformed 3rd-party packages), and updates fixture outputs (including the missing CommonJS require() fixtures) to match the new generated IIFE.

Changes:

  • SWC plugin now emits a self-contained IIFE to register serializable classes in globalThis[Symbol.for("workflow-class-registry")] (no workflow/* import required).
  • Updates many SWC transform fixture outputs (workflow/step/client + CJS require fixtures) to reflect the new inlined registration.
  • Updates SWC plugin spec examples + core class-serialization docs, and adds a Changeset entry.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsGenerate inline IIFE for class registration; remove import-based registration path.
packages/swc-plugin-workflow/spec.mdUpdate documentation examples to the new inlined registration output.
packages/core/src/class-serialization.tsUpdate docs to note SWC no longer imports this helper in generated code.
.changeset/inline-class-serialization.mdAdds release note for the SWC plugin change.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-namespace/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-workflow.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-step.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-require-destructured/output-client.jsCJS require fixture output updated to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsFixture output updated for multiple class registrations via repeated IIFEs.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsFixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsError fixture output updated from import+call to inline IIFE registration.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsError fixture output updated from import+call to inline IIFE registration.

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

@@ -0,0 +1,5 @@
---
"@workflow/swc-plugin-workflow": patch

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The changeset targets a package name that doesn’t exist in this repo. packages/swc-plugin-workflow/package.json declares the SWC plugin package as @workflow/swc-plugin, so this changeset should likely bump that package instead (otherwise Changesets will fail or ignore the release).

Suggested change
"@workflow/swc-plugin-workflow": patch
"@workflow/swc-plugin": patch

Copilot uses AI. Check for mistakes.
right: Box::new(Expr::New(NewExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: ident_expr("Map"),

CopilotAIMar 24, 2026

Copy link

Choose a reason for hiding this comment

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

The inlined registration uses unqualified globals (Map/Object/Symbol). If the transformed module has local bindings named Map or Object, this will change behavior compared to the previous imported helper (which referenced built-ins from its own module scope). Consider referencing built-ins off globalThis (e.g. globalThis.Map, globalThis.Object, globalThis.Symbol) to avoid shadowing issues in user code.

Suggested change
callee:ident_expr("Map"),
callee:Box::new(Expr::Member(MemberExpr{
span:DUMMY_SP,
obj:ident_expr("globalThis"),
prop:MemberProp::Ident(IdentName{
span:DUMMY_SP,
sym:"Map".into(),
}),
})),

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate merged commit 77fd9ad into mainMar 24, 2026
101 of 104 checks passed
@TooTallNate
TooTallNate deleted the nrajlich/inline-class-serialization-registration-v2 branch March 24, 2026 12:30
@ghostghost mentioned this pull request Mar 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TooTallNate