Skip to content

Revert "Inline class serialization registration to fix 3rd-party package support" - #1493

Merged
pranaygp merged 1 commit into
mainfrom
revert-1480-nrajlich/inline-class-serialization-registration
Mar 24, 2026
Merged

Revert "Inline class serialization registration to fix 3rd-party package support"#1493
pranaygp merged 1 commit into
mainfrom
revert-1480-nrajlich/inline-class-serialization-registration

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Reverts #1480

All unit tests are breaking on main

@pranaygp
pranaygp requested a review from a team as a code ownerMarch 24, 2026 00:40
@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings March 24, 2026 00:40
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b1a5b70

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production7803367880
✅ 💻 Local Development7820178960
✅ 📦 Local Production7820178960
✅ 🐘 Local Postgres7820178960
✅ 🪟 Windows720880
❌ 🌍 Community Worlds1185630204
✅ 📋 Other198042240
Total3514896814284

❌ Failed Tests

▲ Vercel Production (33 failed)

astro (5 failed):

  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMEN38Y3AMF4TH8X1XNGF2XX | 🔍 observability
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMEN3GRY5X0PWND4F9180T8E | 🔍 observability
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMEN7E2B5EA76B7A21XWZRNP | 🔍 observability
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMEN94DKKBVMNFKEPDPWED3G | 🔍 observability

example (2 failed):

  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMEN2ZVK4QFNF8YADJM71T1Q | 🔍 observability

express (7 failed):

  • 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 FatalError fails immediately without retries
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMEN4G15JVS26C5C6346G2EG | 🔍 observability
  • cancelRun - cancelling a running workflow | wrun_01KMEN8F3KQT04EPG9V9J3JVV7 | 🔍 observability
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMEN8RBB046GVM1VN44J3XNW | 🔍 observability
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMEN94DKKBVMNFKEPDPWED3G | 🔍 observability

fastify (1 failed):

  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMEN0M5CFSWQ4X62880VS78A | 🔍 observability

hono (3 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMEN1DC8JZKXB956YGHYVPRC | 🔍 observability
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMEN38Y3AMF4TH8X1XNGF2XX | 🔍 observability
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMEN3GRY5X0PWND4F9180T8E | 🔍 observability

nextjs-turbopack (4 failed):

  • error handling error propagation step errors basic step error preserves message and stack trace
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMEN61TPZFBWC3JKZWC3ANBZ | 🔍 observability
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMEN7E2B5EA76B7A21XWZRNP | 🔍 observability
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMEN7MRSHA9F259BRMEWPFE0 | 🔍 observability

nextjs-webpack (1 failed):

  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMEN5TXWNF21D2DK372B2900 | 🔍 observability

nitro (2 failed):

  • error handling retry behavior maxRetries=0 disables retries
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMEN4G15JVS26C5C6346G2EG | 🔍 observability

nuxt (3 failed):

  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMEN7E2B5EA76B7A21XWZRNP | 🔍 observability

sveltekit (2 failed):

  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMEN4PPQHEW9XGT2KFRGV7R6 | 🔍 observability

vite (3 failed):

  • 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
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMEN3GRY5X0PWND4F9180T8E | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMEMQGYNDR7016H7CZTDJ0B8
  • webhookWorkflow | wrun_01KMEMQT5GE9N8S5FM3J462FCG
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMEN0M5CFSWQ4X62880VS78A

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow | wrun_01KMEMP9V8RBAMCV44GQ37PFAC
  • addTenWorkflow | wrun_01KMEMP9V8RBAMCV44GQ37PFAC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMEMQYQ349B41PN4QT6DHGE9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMEMPGVV1C25ZSCRYN0T1GZF
  • promiseRaceWorkflow | wrun_01KMEMPN7ESV9SGXK4VWS24Q7W
  • promiseAnyWorkflow | wrun_01KMEMPRW85RGTDVB51DCJ6YVW
  • importedStepOnlyWorkflow | wrun_01KMEMRFKJYZZDV83Q4FC7EBQ3
  • hookWorkflow | wrun_01KMEMQ6HQP14E2AJ9H9JCZ58J
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMEMQGYNDR7016H7CZTDJ0B8
  • webhookWorkflow | wrun_01KMEMQT5GE9N8S5FM3J462FCG
  • sleepingWorkflow | wrun_01KMEMR1BJJ91546P0PKPEAYHZ
  • parallelSleepWorkflow | wrun_01KMEMRFMWQR3CR5QDSBDKVFKC
  • nullByteWorkflow | wrun_01KMEMRNM87X0ZNYFEHVSNBJXT
  • workflowAndStepMetadataWorkflow | wrun_01KMEMRQWCD7VWY5T2NGR2VWG9
  • fetchWorkflow | wrun_01KMEMVSM4BHNHCREAD6508C3W
  • promiseRaceStressTestWorkflow | wrun_01KMEMVXNQ2J2B3VKXXJZYABQP
  • 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_01KMEN00W4REF77GJB9F70TX6D
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMEN0M5CFSWQ4X62880VS78A
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMEN1DC8JZKXB956YGHYVPRC
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMEN2ZVK4QFNF8YADJM71T1Q
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMEN38Y3AMF4TH8X1XNGF2XX
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMEN3EEVH6R48AJ1RQ6D98PM
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMEN3GRY5X0PWND4F9180T8E
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMEN4G15JVS26C5C6346G2EG
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMEN4PPQHEW9XGT2KFRGV7R6
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMEN5TXWNF21D2DK372B2900
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMEN61TPZFBWC3JKZWC3ANBZ
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMEN68F0VZC6X1656DCJ4Y3V
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMEN7E2B5EA76B7A21XWZRNP
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMEN7MRSHA9F259BRMEWPFE0
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMEN805NW79J6VZDP1GH71XZ
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMEN88BKEVSDRWESZTTMK3WZ
  • cancelRun - cancelling a running workflow | wrun_01KMEN8F3KQT04EPG9V9J3JVV7
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMEN8RBB046GVM1VN44J3XNW
  • 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_01KMEN94DKKBVMNFKEPDPWED3G
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMENARG93N5F5HRQ5EMYSP90
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMENB47W2W1Q3Q47GPF2A373

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
❌ astro6857
❌ example7127
❌ express6677
❌ fastify7217
❌ hono7037
❌ nextjs-turbopack7442
❌ nextjs-webpack7712
❌ nitro7127
❌ nuxt7037
❌ sveltekit7127
❌ vite7037
✅ 💻 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-dev302
❌ mongodb5238
✅ redis-dev302
❌ redis5328
✅ turso-dev302
❌ 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 (-7.4% 🟢)1.005s (~)0.963s101.00x
💻 LocalNitro0.043s (+12.6% 🔺)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.048s1.005s0.958s101.12x
🐘 PostgresExpress0.058s (+4.9%)1.011s (~)0.953s101.37x
🐘 PostgresNitro0.078s (+11.9% 🔺)1.014s (~)0.936s101.83x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.472s (-31.8% 🟢)8.748s (+197.4% 🔺)8.276s101.00x
▲ VercelNext.js (Turbopack)0.500s (-24.4% 🟢)20.428s (+754.4% 🔺)19.928s101.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.107s2.006s0.899s101.00x
💻 LocalExpress1.124s (~)2.006s (~)0.882s101.02x
💻 LocalNitro1.130s (+3.4%)2.005s (~)0.875s101.02x
🐘 PostgresExpress1.145s (-0.7%)2.012s (~)0.867s101.03x
🐘 PostgresNitro1.182s (+1.7%)2.015s (~)0.832s101.07x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.034s (-3.5%)7.202s (+93.0% 🔺)5.168s101.00x
▲ VercelNext.js (Turbopack)2.512s (+21.8% 🔺)3.954s (+7.9% 🔺)1.442s101.24x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.591s11.024s0.433s31.00x
💻 LocalNitro10.911s (+2.7%)11.023s (~)0.112s31.03x
💻 LocalExpress10.932s (~)11.023s (~)0.090s31.03x
🐘 PostgresExpress10.952s (~)11.357s (+2.9%)0.405s31.03x
🐘 PostgresNitro11.026s (-1.0%)11.695s (-2.9%)0.668s31.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.520s (-9.6% 🟢)19.465s (-8.3% 🟢)1.945s21.00x
▲ VercelNext.js (Turbopack)17.868s (+3.8%)19.316s (+1.5%)1.448s21.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.858s14.027s0.168s51.00x
🐘 PostgresExpress14.561s (-1.7%)15.022s (~)0.461s41.05x
🐘 PostgresNitro14.761s (-0.9%)15.274s (+1.5%)0.513s41.07x
💻 LocalExpress14.931s (-0.7%)15.028s (-4.8%)0.096s41.08x
💻 LocalNitro14.961s (+5.2% 🔺)15.030s (~)0.069s41.08x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)32.196s (-4.3%)33.636s (-3.4%)1.440s21.00x
▲ VercelExpress34.146s (+1.9%)50.930s (+45.7% 🔺)16.784s21.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)12.751s13.167s0.416s71.00x
🐘 PostgresExpress14.075s (-2.5%)14.735s (-2.0%)0.660s71.10x
🐘 PostgresNitro14.154s (-4.7%)14.882s (-2.2%)0.729s71.11x
💻 LocalExpress16.548s (-2.9%)17.029s (-1.9%)0.482s61.30x
💻 LocalNitro16.814s (+13.0% 🔺)17.197s (+14.4% 🔺)0.383s61.32x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)64.882s (+6.0% 🔺)66.227s (+5.9% 🔺)1.345s21.00x
▲ VercelExpress68.024s (+12.2% 🔺)70.318s (+11.8% 🔺)2.294s21.05x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.256s (-2.0%)2.011s (~)0.754s151.00x
🐘 PostgresNitro1.305s (~)2.014s (~)0.708s151.04x
🌐 RedisNext.js (Turbopack)1.325s2.073s0.748s151.05x
💻 LocalExpress1.509s (-1.4%)2.005s (~)0.497s151.20x
💻 LocalNitro1.525s (+4.6%)2.005s (~)0.480s151.21x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.441s (-5.8% 🟢)3.566s (-13.0% 🟢)1.125s91.00x
▲ VercelExpress2.680s (-5.7% 🟢)4.022s (-9.1% 🟢)1.341s81.10x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.320s (-5.0%)3.010s (~)0.690s101.00x
🐘 PostgresNitro2.347s (-5.9% 🟢)3.011s (~)0.664s101.01x
🌐 RedisNext.js (Turbopack)2.432s3.008s0.575s101.05x
💻 LocalExpress3.006s (-3.0%)3.759s (-6.3% 🟢)0.753s81.30x
💻 LocalNitro3.104s (+22.8% 🔺)3.884s (+29.1% 🔺)0.780s81.34x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.993s (+1.9%)4.481s (+4.5%)1.488s71.00x
▲ VercelExpress3.065s (-6.2% 🟢)4.455s (-13.8% 🟢)1.390s71.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.486s (-4.9%)4.013s (~)0.527s81.00x
🐘 PostgresExpress3.495s (-2.1%)4.015s (~)0.520s81.00x
🌐 RedisNext.js (Turbopack)3.940s4.438s0.498s71.13x
💻 LocalExpress8.273s (-5.1% 🟢)9.025s (-2.7%)0.752s42.37x
💻 LocalNitro8.418s (+26.0% 🔺)9.021s (+28.6% 🔺)0.603s42.41x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.659s (+16.1% 🔺)5.197s (+6.7% 🔺)1.538s61.00x
▲ VercelNext.js (Turbopack)3.903s (-6.3% 🟢)5.501s (-1.0%)1.598s61.07x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.242s2.006s0.764s151.00x
🐘 PostgresNitro1.274s (-1.3%)2.008s (~)0.735s151.03x
🐘 PostgresExpress1.275s (-1.2%)2.011s (~)0.736s151.03x
💻 LocalExpress1.555s (+0.7%)2.005s (~)0.450s151.25x
💻 LocalNitro1.565s (+6.9% 🔺)2.006s (~)0.440s151.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.293s (+1.3%)3.880s (-0.7%)1.587s81.00x
▲ VercelNext.js (Turbopack)2.764s (+6.9% 🔺)3.995s (+5.7% 🔺)1.231s81.21x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.333s (-6.5% 🟢)3.011s (~)0.679s101.00x
🐘 PostgresExpress2.336s (-4.8%)3.010s (~)0.674s101.00x
🌐 RedisNext.js (Turbopack)2.406s3.008s0.601s101.03x
💻 LocalNitro2.967s (+3.5%)3.454s (+11.1% 🔺)0.487s91.27x
💻 LocalExpress3.035s (-4.3%)3.760s (-6.2% 🟢)0.725s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.694s (+12.7% 🔺)4.314s (+9.3% 🔺)1.620s81.00x
▲ VercelNext.js (Turbopack)2.925s (-2.4%)4.469s (+4.2%)1.544s71.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.460s (-3.8%)4.014s (~)0.554s81.00x
🐘 PostgresNitro3.477s (-4.7%)4.011s (~)0.534s81.00x
🌐 RedisNext.js (Turbopack)3.946s4.134s0.188s81.14x
💻 LocalNitro8.586s (+16.1% 🔺)9.019s (+12.5% 🔺)0.433s42.48x
💻 LocalExpress8.789s (-4.0%)9.025s (-9.9% 🟢)0.237s42.54x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.025s (+28.7% 🔺)5.819s (+24.3% 🔺)1.794s61.00x
▲ VercelNext.js (Turbopack)4.306s (+20.1% 🔺)5.633s (+14.4% 🔺)1.327s61.07x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.550s1.004s0.454s601.00x
🐘 PostgresExpress0.809s (-11.6% 🟢)1.007s (-6.7% 🟢)0.198s601.47x
🐘 PostgresNitro0.857s (-11.5% 🟢)1.042s (-15.6% 🟢)0.185s581.56x
💻 LocalNitro0.962s (+42.8% 🔺)1.056s (+5.2% 🔺)0.094s581.75x
💻 LocalExpress0.969s (-4.2%)1.075s (-30.4% 🟢)0.106s571.76x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.240s (+4.5%)13.184s (+7.0% 🔺)1.944s51.00x
▲ VercelNext.js (Turbopack)11.996s (+20.7% 🔺)19.294s (+56.1% 🔺)7.299s51.07x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.322s2.005s0.683s451.00x
🐘 PostgresExpress1.897s (-14.8% 🟢)2.054s (-31.8% 🟢)0.157s441.43x
🐘 PostgresNitro1.968s (-14.9% 🟢)2.228s (-26.0% 🟢)0.260s411.49x
💻 LocalNitro2.962s (+35.1% 🔺)3.222s (+7.1% 🔺)0.259s282.24x
💻 LocalExpress2.966s (-2.3%)3.222s (-12.7% 🟢)0.256s282.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)35.328s (+8.9% 🔺)36.677s (+9.0% 🔺)1.350s31.00x
▲ VercelExpress36.615s (+21.4% 🔺)38.159s (+19.3% 🔺)1.544s31.04x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.649s3.057s0.408s401.00x
🐘 PostgresExpress3.951s (-12.1% 🟢)4.252s (-15.2% 🟢)0.302s291.49x
🐘 PostgresNitro4.023s (-16.0% 🟢)4.567s (-10.4% 🟢)0.544s271.52x
💻 LocalNitro9.009s (+24.4% 🔺)9.555s (+19.2% 🔺)0.546s133.40x
💻 LocalExpress9.032s (+2.5%)9.479s (+3.5%)0.447s133.41x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express89.895s (~)92.053s (~)2.158s21.00x
▲ VercelNext.js (Turbopack)93.718s (+8.8% 🔺)95.489s (+7.9% 🔺)1.771s21.04x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.239s1.004s0.765s601.00x
🐘 PostgresExpress0.275s (-7.2% 🟢)1.008s (~)0.733s601.15x
🐘 PostgresNitro0.299s (-5.6% 🟢)1.008s (~)0.709s601.25x
💻 LocalExpress0.583s (+2.5%)1.004s (~)0.422s602.44x
💻 LocalNitro0.600s (+7.0% 🔺)1.005s (~)0.404s602.52x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.110s (+11.6% 🔺)3.624s (-3.4%)1.514s171.00x
▲ VercelExpress2.222s (+13.2% 🔺)4.048s (+12.7% 🔺)1.826s151.05x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.488s (-10.9% 🟢)1.008s (~)0.520s901.00x
🐘 PostgresNitro0.515s (-11.7% 🟢)1.007s (~)0.493s901.05x
🌐 RedisNext.js (Turbopack)1.092s2.005s0.914s452.24x
💻 LocalExpress2.510s (+2.4%)3.009s (~)0.498s305.14x
💻 LocalNitro2.514s (+7.2% 🔺)3.009s (~)0.495s305.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.293s (+17.5% 🔺)5.085s (+8.6% 🔺)1.792s181.00x
▲ VercelNext.js (Turbopack)4.572s (+40.9% 🔺)6.108s (+29.3% 🔺)1.537s151.39x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.778s (-15.3% 🟢)1.009s (-18.6% 🟢)0.230s1191.00x
🐘 PostgresNitro0.792s (-18.1% 🟢)1.008s (-27.9% 🟢)0.216s1191.02x
🌐 RedisNext.js (Turbopack)2.611s3.007s0.396s403.35x
💻 LocalNitro11.168s (+12.5% 🔺)11.570s (+11.7% 🔺)0.402s1114.35x
💻 LocalExpress11.213s (+1.8%)12.029s (+3.1%)0.816s1014.40x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.062s (-74.9% 🟢)9.568s (-71.7% 🟢)1.506s131.00x
▲ VercelExpress8.876s (+33.7% 🔺)10.721s (+22.4% 🔺)1.845s121.10x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.150s1.000s0.001s1.007s0.857s101.00x
💻 LocalExpress0.201s (-2.5%)1.003s (~)0.011s (-5.9% 🟢)1.017s (~)0.816s101.34x
🐘 PostgresExpress0.204s (-8.5% 🟢)0.998s (~)0.002s (+15.4% 🔺)1.012s (~)0.808s101.36x
🐘 PostgresNitro0.206s (-14.5% 🟢)0.994s (~)0.002s (-11.1% 🟢)1.011s (~)0.805s101.37x
💻 LocalNitro0.218s (+57.0% 🔺)1.003s (~)0.012s (+21.6% 🔺)1.018s (~)0.800s101.45x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.893s (+15.7% 🔺)2.927s (~)0.527s (+32.1% 🔺)3.963s (+2.3%)2.069s101.00x
▲ VercelExpress2.067s (-3.4%)3.196s (-4.6%)0.431s (+281.5% 🔺)4.285s (+2.6%)2.218s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.389s0.999s0.004s1.011s0.622s601.00x
🐘 PostgresExpress0.618s (-12.2% 🟢)1.002s (~)0.004s (-37.5% 🟢)1.027s (-0.5%)0.410s591.59x
🐘 PostgresNitro0.619s (-14.6% 🟢)1.003s (~)0.008s (+32.9% 🔺)1.027s (~)0.409s591.59x
💻 LocalExpress0.721s (~)1.009s (~)0.009s (-4.2%)1.022s (~)0.301s591.85x
💻 LocalNitro0.745s (+31.4% 🔺)1.009s (~)0.010s (+7.0% 🔺)1.024s (~)0.278s591.92x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.798s (+5.1% 🔺)5.814s (+4.0%)0.386s (+71.6% 🔺)6.788s (+5.0% 🔺)1.991s91.00x
▲ VercelExpress6.236s (+37.3% 🔺)7.623s (+36.2% 🔺)0.184s (-22.5% 🟢)8.615s (+27.9% 🔺)2.379s71.30x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.847s1.000s0.000s1.004s0.157s601.00x
🐘 PostgresNitro0.980s (-16.2% 🟢)1.355s (-32.1% 🟢)0.000s (+2.3%)1.372s (-32.2% 🟢)0.392s441.16x
🐘 PostgresExpress0.983s (-12.4% 🟢)1.270s (-28.7% 🟢)0.000s (-63.8% 🟢)1.286s (-29.0% 🟢)0.302s471.16x
💻 LocalExpress1.227s (+1.9%)2.020s (~)0.000s (+28.6% 🔺)2.023s (~)0.796s301.45x
💻 LocalNitro1.245s (+9.8% 🔺)2.020s (~)0.000s (-25.0% 🟢)2.023s (~)0.778s301.47x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.163s (-1.3%)4.020s (-6.7% 🟢)0.000s (-92.9% 🟢)4.713s (-8.4% 🟢)1.550s131.00x
▲ VercelNext.js (Turbopack)4.921s (+39.8% 🔺)5.904s (+26.9% 🔺)0.001s (+Infinity% 🔺)6.437s (+23.6% 🔺)1.516s101.56x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.597s2.035s0.000s2.039s0.442s301.00x
🐘 PostgresNitro1.809s (-20.1% 🟢)2.138s (-27.6% 🟢)0.000s (+50.0% 🔺)2.154s (-27.5% 🟢)0.345s281.13x
🐘 PostgresExpress1.811s (-12.0% 🟢)2.218s (-10.5% 🟢)0.000s (NaN%)2.270s (-9.2% 🟢)0.459s271.13x
💻 LocalNitro3.500s (+1.2%)4.032s (~)0.001s (-15.4% 🟢)4.036s (~)0.536s152.19x
💻 LocalExpress3.517s (+3.7%)4.033s (-1.6%)0.000s (+250.0% 🔺)4.037s (-1.6%)0.520s152.20x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.948s (-11.8% 🟢)4.706s (-13.1% 🟢)0.000s (-8.3% 🟢)5.240s (-11.9% 🟢)1.293s121.00x
▲ VercelExpress4.368s (+10.7% 🔺)5.382s (+8.0% 🔺)0.000s (NaN%)6.150s (+5.0% 🔺)1.782s101.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress13/21
🐘 PostgresExpress16/21
▲ VercelExpress11/21
Fastest World by Framework

Winner determined by most benchmark wins

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

@pranaygp
pranaygp merged commit 7c31cd7 into mainMar 24, 2026
26 of 51 checks passed
@pranaygp
pranaygp deleted the revert-1480-nrajlich/inline-class-serialization-registration branch March 24, 2026 00:41

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reverts the prior change that inlined class-serialization registration logic inside SWC-generated output, restoring the previous approach of importing and calling registerSerializationClass from workflow/internal/class-serialization. This aims to fix widespread unit test breakage currently on main.

Changes:

  • Update SWC transform to generate import { registerSerializationClass } from "workflow/internal/class-serialization" and emit registerSerializationClass(classId, ClassName) calls instead of an inlined IIFE.
  • Refresh SWC plugin fixtures/snapshots to match the reverted generated output across workflow/step/client modes.
  • Update SWC plugin spec docs and remove the now-obsolete changeset describing the inlining approach.

Reviewed changes

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

Show a summary per file
FileDescription
packages/swc-plugin-workflow/transform/src/lib.rsReverts transform output back to import-based class registration and updates import insertion logic.
packages/core/src/class-serialization.tsUpdates docstring to reflect SWC plugin usage expectations.
packages/swc-plugin-workflow/spec.mdUpdates documentation examples to show registerSerializationClass import/calls rather than an inlined IIFE.
.changeset/inline-class-serialization.mdRemoves the changeset that described the reverted inlining behavior.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-workflow.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-step.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/step-with-this-arguments-super/output-client.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-workflow.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-step.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/output-client.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-workflow.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-step.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-step/output-client.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-workflow.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-step.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/instance-method-nested-step/output-client.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-workflow.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-step.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization/output-client.jsUpdates expected generated output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-workflow.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-step.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-local-const/output-client.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-workflow.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-step.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/custom-serialization-imported/output-client.jsUpdates expected generated output to use registerSerializationClass (multiple classes).
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-workflow.jsUpdates expected generated output to use registerSerializationClass for class expressions.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-step.jsUpdates expected generated output to use registerSerializationClass for class expressions.
packages/swc-plugin-workflow/transform/tests/fixture/class-expression-binding-name/output-client.jsUpdates expected generated output to use registerSerializationClass for class expressions.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-workflow.jsUpdates expected error fixture output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-step.jsUpdates expected error fixture output to use registerSerializationClass.
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/output-client.jsUpdates expected error fixture output to use registerSerializationClass.

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

Comment on lines +4448 to +4450
// In step mode, we need:
// 1. registerSerializationClass(classId, ClassName) - for deserialization
// 2. ClassName.classId = "..." - for serialization (though not typically needed in step mode)

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 comment suggests step mode needs both registerSerializationClass(...) and a separate ClassName.classId = "..." assignment, but registerSerializationClass already defines the non-enumerable classId property. Consider updating/removing the second bullet to match the actual generated behavior.

Suggested change
// In step mode, we need:
// 1. registerSerializationClass(classId, ClassName) - for deserialization
// 2. ClassName.classId = "..." - for serialization (though not typically needed in step mode)
// In step mode, we register classes with:
// registerSerializationClass(classId, ClassName)
// This defines the non-enumerable `classId` property used for (de)serialization.

Copilot uses AI. Check for mistakes.
* self-contained IIFE (using the same globalThis Symbol-keyed registry),
* so this function is no longer imported by generated code. It is retained
* for programmatic use and testing.
* Called by the SWC plugin in both step mode and workflow mode.

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.

Docstring says this is called by the SWC plugin in step mode and workflow mode, but the plugin also imports/calls registerSerializationClass in client mode (see generated fixtures and transform logic). Updating the comment to include client mode would keep the docs accurate for consumers reading this file.

Suggested change
*CalledbytheSWCplugininbothstepmodeandworkflowmode.
*CalledbytheSWCplugininstepmode,workflowmode,andclientmode.

Copilot uses AI. Check for mistakes.
Comment on lines 4870 to 4873
match self.mode {
TransformMode::Workflow => {
// No imports needed for workflow mode
// Class serialization registration is inlined (no import needed)
}

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 transform has non-trivial Program::Script handling here, but the fixture harness currently runs with module: Some(true) (so Script codepaths aren’t exercised). Consider adding a test fixture that runs with module: Some(false) and includes a serializable class to prevent regressions in this branch.

Copilot uses AI. Check for mistakes.
@@ -5033,18 +4870,25 @@ impl VisitMut for StepTransform {
match self.mode {
TransformMode::Workflow => {
// No imports needed for workflow mode

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.

In the Program::Script branch, workflow mode doesn't handle classes_needing_serialization at all (no registerSerializationClass import and no registrations), whereas the Program::Module branch does. If the input is parsed as a Script and contains serializable classes, workflow-mode output will leave them unregistered and break class (de)serialization.

Suggested change
// No imports needed for workflow mode
// In workflow mode, ensure class serialization support if needed
let needs_class_serialization =
!self.classes_needing_serialization.is_empty();
if needs_class_serialization {
module_items.push(self.create_class_serialization_import());
}

Copilot uses AI. Check for mistakes.
Comment on lines 4874 to +4882
TransformMode::Step => {
let needs_class_serialization =
!self.classes_needing_serialization.is_empty();
if !self.registration_calls.is_empty() {
module_items.push(self.create_private_imports(true, false));
}
// Class serialization registration is inlined (no import needed)
if needs_class_serialization {
module_items.push(self.create_class_serialization_import());
}

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.

In the Program::Script branch, step mode conditionally adds the registerSerializationClass import (needs_class_serialization), but this branch does not appear to append any registerSerializationClass(classId, ClassName) statements for classes_needing_serialization (unlike the Program::Module branch). That would leave classes unregistered in step-mode script transforms.

Copilot uses AI. Check for mistakes.
Comment on lines +4461 to +4493
let registration_call = Stmt::Expr(ExprStmt {
span: DUMMY_SP,
expr: Box::new(Expr::Call(CallExpr {
span: DUMMY_SP,
ctxt: SyntaxContext::empty(),
callee: Callee::Expr(Box::new(Expr::Ident(Ident::new(
"registerSerializationClass".into(),
DUMMY_SP,
SyntaxContext::empty(),
)))),
args: vec![
// First argument: class ID
ExprOrSpread {
spread: None,
expr: Box::new(Expr::Lit(Lit::Str(Str {
span: DUMMY_SP,
value: class_id.into(),
raw: None,
}))),
},
// Second argument: ClassName
ExprOrSpread {
spread: None,
expr: Box::new(Expr::Ident(Ident::new(
class_name.into(),
DUMMY_SP,
SyntaxContext::empty(),
))),
},
],
type_args: None,
})),
});

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.

This step-mode loop re-implements the AST for registerSerializationClass(...) inline. Since create_class_serialization_registration() already exists (and is used for workflow/client), it would be less error-prone to reuse that helper here to avoid the different modes drifting over time.

Suggested change
let registration_call = Stmt::Expr(ExprStmt{
span:DUMMY_SP,
expr:Box::new(Expr::Call(CallExpr{
span:DUMMY_SP,
ctxt:SyntaxContext::empty(),
callee:Callee::Expr(Box::new(Expr::Ident(Ident::new(
"registerSerializationClass".into(),
DUMMY_SP,
SyntaxContext::empty(),
)))),
args: vec![
// First argument: class ID
ExprOrSpread{
spread:None,
expr:Box::new(Expr::Lit(Lit::Str(Str{
span:DUMMY_SP,
value: class_id.into(),
raw:None,
}))),
},
// Second argument: ClassName
ExprOrSpread{
spread:None,
expr:Box::new(Expr::Ident(Ident::new(
class_name.into(),
DUMMY_SP,
SyntaxContext::empty(),
))),
},
],
type_args:None,
})),
});
let registration_call =
self.create_class_serialization_registration(&class_id,&class_name);

Copilot uses AI. Check for mistakes.
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
* origin/main:
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
pranaygp added a commit that referenced this pull request Mar 24, 2026
…naygp-db9e68c1
* 'main' of https://github.com/vercel/workflow: (32 commits)
chore: bump @nestjs/* to ^11.1.17 (#1497)
chore: bump hono to ^4.12.8 (#1495)
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
[cli] [world-local] Ensure update checks don't suggest upgrading from stable release to pre-releases (#1490)
Remove NestJS Vercel integration while in experimental phase (#1485)
feat: export semantic error types and add API reference docs (#1447)
feat: enforce max queue deliveries in handlers with graceful failure (#1344)
[world-postgres] Migrate client from `postgres.js` to `pg` (#1484)
Inline class serialization registration to fix 3rd-party package support (#1480)
[ai] Add experimental_context to DurableAgentOptions (#1489)
[ai] Expose configured tools on DurableAgent instances (#1488)
fix(builders): catch node builtin usage when entry fields diverge (#1455)
[web-shared] Fix timeline duration format and precision (#1482)
[cli] Add bulk cancel, --status filter, fix step JSON hydration (#1467)
[utils] Re-export parseName utilities and add workflow/observability module (#1453)
[o11y] Polish display when run data has expired (#1438)
Add CommonJS `require()` support for class serialization detection in SWC plugin (#1144)
fix(next): stabilize deferred canary e2e in nextjs workbenches (#1468)
[web] Support legacy newline-delimited stream format in `useStreamReader` (#1473)
...
pranaygp added a commit that referenced this pull request Mar 24, 2026
…naygp-6fadd605
* 'main' of https://github.com/vercel/workflow: (73 commits)
chore: bump next to 16.2.1 and fix deferred build (#1496)
chore: bump nitropack to ^2.13.1 (#1501)
chore: bump nuxt ecosystem dependencies (#1500)
chore: bump sveltekit ecosystem (#1498)
chore: bump express and fastify in workbenches (#1499)
chore: bump @nestjs/* to ^11.1.17 (#1497)
chore: bump hono to ^4.12.8 (#1495)
Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
[world] Add stream pagination and metadata endpoints (#1470)
[cli] [world-local] Ensure update checks don't suggest upgrading from stable release to pre-releases (#1490)
Remove NestJS Vercel integration while in experimental phase (#1485)
feat: export semantic error types and add API reference docs (#1447)
feat: enforce max queue deliveries in handlers with graceful failure (#1344)
[world-postgres] Migrate client from `postgres.js` to `pg` (#1484)
Inline class serialization registration to fix 3rd-party package support (#1480)
[ai] Add experimental_context to DurableAgentOptions (#1489)
[ai] Expose configured tools on DurableAgent instances (#1488)
fix(builders): catch node builtin usage when entry fields diverge (#1455)
[web-shared] Fix timeline duration format and precision (#1482)
[cli] Add bulk cancel, --status filter, fix step JSON hydration (#1467)
...
# Conflicts:
#	packages/core/src/runtime/start.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@karthikscale3