Skip to content

fix: prioritize custom class serialization over generic Error serialization#1172

Merged
TooTallNate merged 1 commit into
mainfrom
fix/custom-error-serde-precedence
Feb 27, 2026
Merged

fix: prioritize custom class serialization over generic Error serialization#1172
TooTallNate merged 1 commit into
mainfrom
fix/custom-error-serde-precedence

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

  • Moves the Instance and Class reducers before the Error reducer in getCommonReducers() so that custom Error subclasses implementing WORKFLOW_SERIALIZE are serialized via the Instance reducer instead of the generic Error reducer.
  • devalue uses a first-match-wins strategy when iterating reducers, so the previous ordering caused custom Error subclasses to silently lose their custom fields — only name, message, and stack were preserved.
  • Adds 5 new unit tests covering custom Error subclass serialization across workflow arguments, step arguments, and step return values, as well as verifying that plain Errors and Error subclasses without WORKFLOW_SERIALIZE still use the generic Error reducer.

…zation

Move the Instance and Class reducers before the Error reducer in
getCommonReducers() so that Error subclasses implementing
WORKFLOW_SERIALIZE are serialized using custom class serialization
instead of the generic Error reducer. devalue uses first-match-wins,
so the previous ordering caused custom Error subclasses to lose their
custom fields (only name/message/stack were preserved).
Copilot AI review requested due to automatic review settings February 23, 2026 23:56
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Feb 23, 2026 11:59pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Feb 23, 2026 11:59pm
example-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-astro-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-express-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-fastify-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-hono-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-nitro-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-nuxt-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workbench-vite-workflow Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Feb 23, 2026 11:59pm
workflow-nest Ready Ready Preview, Comment Feb 23, 2026 11:59pm
workflow-swc-playground Ready Ready Preview, Comment Feb 23, 2026 11:59pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 523 0 49 572
✅ 💻 Local Development 556 0 68 624
✅ 📦 Local Production 556 0 68 624
✅ 🐘 Local Postgres 556 0 68 624
✅ 🪟 Windows 49 0 3 52
❌ 🌍 Community Worlds 111 45 9 165
✅ 📋 Other 135 0 21 156
Total 2486 45 286 2817

❌ Failed Tests

🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 47 0 5
✅ example 47 0 5
✅ express 47 0 5
✅ fastify 47 0 5
✅ hono 47 0 5
✅ nextjs-turbopack 50 0 2
✅ nextjs-webpack 50 0 2
✅ nitro 47 0 5
✅ nuxt 47 0 5
✅ sveltekit 47 0 5
✅ vite 47 0 5
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 49 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
✅ mongodb 49 0 3
✅ redis-dev 3 0 0
✅ redis 49 0 3
✅ turso-dev 3 0 0
❌ turso 4 45 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 45 0 7
✅ e2e-local-postgres-nest-stable 45 0 7
✅ e2e-local-prod-nest-stable 45 0 7

📋 View full workflow run

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 23, 2026

🦋 Changeset detected

Latest commit: 0d34afb

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

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

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.032s (+0.6%) 1.005s (~) 0.973s 10 1.00x
💻 Local Express 0.032s (+0.6%) 1.005s (~) 0.973s 10 1.01x
💻 Local Next.js (Turbopack) 0.040s (-11.4% 🟢) 1.005s (~) 0.965s 10 1.24x
🌐 Redis Next.js (Turbopack) 0.048s (+5.2% 🔺) 1.005s (~) 0.956s 10 1.51x
🐘 Postgres Nitro 0.054s (-9.0% 🟢) 1.011s (~) 0.957s 10 1.68x
🐘 Postgres Express 0.055s (~) 1.010s (~) 0.955s 10 1.71x
🌐 MongoDB Next.js (Turbopack) 0.092s (-1.9%) 1.007s (~) 0.915s 10 2.87x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.449s (-14.2% 🟢) 1.884s (-13.0% 🟢) 1.435s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.494s (-10.0% 🟢) 1.807s (-9.1% 🟢) 1.313s 10 1.10x
▲ Vercel Express 0.577s (+29.0% 🔺) 2.012s (+5.5% 🔺) 1.435s 10 1.29x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.102s (~) 2.006s (~) 0.903s 10 1.00x
💻 Local Nitro 1.105s (~) 2.005s (~) 0.900s 10 1.00x
💻 Local Express 1.108s (~) 2.006s (~) 0.898s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.109s (~) 2.006s (~) 0.898s 10 1.01x
🐘 Postgres Nitro 1.133s (~) 2.011s (~) 0.878s 10 1.03x
🐘 Postgres Express 1.145s (+2.0%) 2.011s (~) 0.867s 10 1.04x
🌐 MongoDB Next.js (Turbopack) 1.298s (-1.5%) 2.008s (~) 0.710s 10 1.18x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.093s (-1.7%) 3.045s (-12.5% 🟢) 0.952s 10 1.00x
▲ Vercel Express 2.158s (+10.2% 🔺) 3.315s (+9.3% 🔺) 1.157s 10 1.03x
▲ Vercel Nitro 2.700s (+10.5% 🔺) 3.734s (-1.8%) 1.034s 10 1.29x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 10.743s (~) 11.022s (~) 0.279s 3 1.00x
🌐 Redis Next.js (Turbopack) 10.747s (~) 11.023s (~) 0.277s 3 1.00x
💻 Local Nitro 10.819s (~) 11.023s (~) 0.204s 3 1.01x
💻 Local Express 10.842s (~) 11.023s (~) 0.181s 3 1.01x
🐘 Postgres Express 10.921s (+0.7%) 11.048s (~) 0.127s 3 1.02x
🐘 Postgres Nitro 10.958s (~) 11.043s (~) 0.085s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 12.198s (-0.7%) 13.018s (~) 0.820s 3 1.14x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 16.186s (~) 17.372s (~) 1.186s 2 1.00x
▲ Vercel Express 16.209s (+2.0%) 17.260s (~) 1.051s 2 1.00x
▲ Vercel Next.js (Turbopack) 16.328s (~) 17.575s (+1.1%) 1.248s 2 1.01x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.916s (~) 27.052s (~) 0.135s 3 1.00x
💻 Local Next.js (Turbopack) 27.183s (~) 28.055s (~) 0.871s 3 1.01x
🐘 Postgres Nitro 27.328s (~) 28.062s (~) 0.734s 3 1.02x
🐘 Postgres Express 27.339s (+0.7%) 28.065s (~) 0.726s 3 1.02x
💻 Local Nitro 27.472s (~) 28.050s (~) 0.578s 3 1.02x
💻 Local Express 27.484s (~) 28.050s (~) 0.566s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 30.407s (~) 31.029s (~) 0.622s 2 1.13x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 39.587s (-1.3%) 40.331s (-2.6%) 0.745s 2 1.00x
▲ Vercel Express 39.834s (~) 41.522s (+0.7%) 1.688s 2 1.01x
▲ Vercel Next.js (Turbopack) 40.081s (-2.5%) 40.748s (-3.5%) 0.667s 2 1.01x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 54.432s (~) 55.102s (~) 0.670s 2 1.00x
🐘 Postgres Nitro 55.211s (~) 56.112s (+0.9%) 0.902s 2 1.01x
🐘 Postgres Express 55.282s (+1.0%) 56.102s (+1.9%) 0.820s 2 1.02x
💻 Local Next.js (Turbopack) 56.554s (~) 57.103s (~) 0.548s 2 1.04x
💻 Local Express 57.181s (~) 58.095s (~) 0.915s 2 1.05x
💻 Local Nitro 57.265s (~) 58.102s (+1.8%) 0.837s 2 1.05x
🌐 MongoDB Next.js (Turbopack) 60.831s (-0.6%) 61.061s (-1.6%) 0.229s 2 1.12x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 81.621s (-1.7%) 82.694s (-1.4%) 1.073s 2 1.00x
▲ Vercel Express 81.843s (~) 82.948s (~) 1.105s 2 1.00x
▲ Vercel Next.js (Turbopack) 84.477s (+2.1%) 85.627s (+2.4%) 1.151s 2 1.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.246s (-2.4%) 2.006s (~) 0.761s 15 1.00x
🐘 Postgres Nitro 1.363s (~) 2.010s (~) 0.647s 15 1.09x
🐘 Postgres Express 1.390s (+1.8%) 2.010s (~) 0.620s 15 1.12x
💻 Local Next.js (Turbopack) 1.393s (-0.9%) 2.004s (~) 0.611s 15 1.12x
💻 Local Express 1.418s (+0.7%) 2.004s (~) 0.586s 15 1.14x
💻 Local Nitro 1.422s (+2.2%) 2.005s (~) 0.583s 15 1.14x
🌐 MongoDB Next.js (Turbopack) 2.149s (~) 3.007s (~) 0.858s 10 1.72x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.239s (-1.5%) 3.576s (+8.5% 🔺) 1.337s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.355s (-1.1%) 3.199s (-13.0% 🟢) 0.844s 10 1.05x
▲ Vercel Nitro 2.532s (+15.8% 🔺) 3.615s (+6.2% 🔺) 1.083s 9 1.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.980s (-1.6%) 2.515s (~) 0.535s 12 1.00x
🐘 Postgres Nitro 2.028s (-1.4%) 2.680s (+6.5% 🔺) 0.651s 12 1.02x
🌐 Redis Next.js (Turbopack) 2.477s (~) 3.008s (~) 0.531s 10 1.25x
💻 Local Next.js (Turbopack) 2.500s (+1.2%) 3.008s (~) 0.508s 10 1.26x
💻 Local Express 2.526s (-0.9%) 3.007s (~) 0.480s 10 1.28x
💻 Local Nitro 2.553s (+1.2%) 3.007s (~) 0.454s 10 1.29x
🌐 MongoDB Next.js (Turbopack) 4.694s (~) 5.176s (~) 0.483s 6 2.37x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.194s (-19.0% 🟢) 3.046s (-19.7% 🟢) 0.852s 10 1.00x
▲ Vercel Express 2.376s (+0.7%) 3.533s (-6.3% 🟢) 1.156s 9 1.08x
▲ Vercel Nitro 2.398s (-2.9%) 3.334s (-9.4% 🟢) 0.936s 9 1.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.275s (-8.4% 🟢) 4.142s (~) 0.868s 8 1.00x
🐘 Postgres Express 3.878s (+26.9% 🔺) 4.455s (+18.3% 🔺) 0.577s 7 1.18x
🌐 Redis Next.js (Turbopack) 4.199s (+3.9%) 5.012s (+9.4% 🔺) 0.813s 6 1.28x
💻 Local Next.js (Turbopack) 6.704s (-3.6%) 7.513s (-3.2%) 0.809s 4 2.05x
💻 Local Express 7.264s (-3.3%) 8.021s (~) 0.756s 4 2.22x
💻 Local Nitro 7.340s (+5.0% 🔺) 8.020s (+6.7% 🔺) 0.680s 4 2.24x
🌐 MongoDB Next.js (Turbopack) 9.873s (+0.8%) 10.347s (~) 0.474s 3 3.02x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.655s (+4.3%) 3.541s (+5.8% 🔺) 0.886s 9 1.00x
▲ Vercel Next.js (Turbopack) 3.468s (+19.4% 🔺) 4.330s (+13.6% 🔺) 0.862s 7 1.31x
▲ Vercel Nitro 3.519s (+3.5%) 4.403s (+1.2%) 0.883s 7 1.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.281s (+3.2%) 2.006s (~) 0.725s 15 1.00x
🐘 Postgres Nitro 1.370s (+1.4%) 2.010s (~) 0.640s 15 1.07x
🐘 Postgres Express 1.401s (+2.3%) 2.010s (~) 0.609s 15 1.09x
💻 Local Express 1.419s (-0.9%) 2.005s (~) 0.586s 15 1.11x
💻 Local Nitro 1.425s (+1.4%) 2.006s (~) 0.581s 15 1.11x
💻 Local Next.js (Turbopack) 1.434s (+0.6%) 2.005s (~) 0.570s 15 1.12x
🌐 MongoDB Next.js (Turbopack) 2.180s (+1.2%) 3.007s (~) 0.827s 10 1.70x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.005s (-5.8% 🟢) 3.187s (-6.1% 🟢) 1.182s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.026s (-3.1%) 3.025s (-12.6% 🟢) 0.999s 10 1.01x
▲ Vercel Express 2.098s (+5.3% 🔺) 3.327s (+10.1% 🔺) 1.229s 10 1.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.036s (+1.4%) 2.594s (~) 0.558s 12 1.00x
🐘 Postgres Express 2.177s (+3.9%) 2.833s (+12.8% 🔺) 0.656s 11 1.07x
🌐 Redis Next.js (Turbopack) 2.478s (-0.5%) 3.008s (~) 0.530s 10 1.22x
💻 Local Next.js (Turbopack) 2.563s (-2.3%) 3.009s (~) 0.446s 10 1.26x
💻 Local Nitro 2.657s (+2.3%) 3.008s (~) 0.351s 10 1.30x
💻 Local Express 2.740s (+2.1%) 3.007s (~) 0.268s 10 1.35x
🌐 MongoDB Next.js (Turbopack) 4.564s (-3.4%) 5.175s (~) 0.612s 6 2.24x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.205s (+1.0%) 3.207s (-4.0%) 1.002s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.705s (+13.7% 🔺) 3.695s (+2.7%) 0.990s 10 1.23x
▲ Vercel Express 3.222s (+54.2% 🔺) 4.334s (+43.7% 🔺) 1.112s 7 1.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.709s (-2.2%) 4.310s (-6.2% 🟢) 0.601s 7 1.00x
🐘 Postgres Express 3.971s (+19.0% 🔺) 4.598s (+14.5% 🔺) 0.628s 7 1.07x
🌐 Redis Next.js (Turbopack) 4.028s (+1.2%) 4.440s (~) 0.413s 7 1.09x
💻 Local Next.js (Turbopack) 7.255s (~) 7.766s (~) 0.512s 4 1.96x
💻 Local Express 7.515s (-4.3%) 8.019s (~) 0.503s 4 2.03x
💻 Local Nitro 7.802s (+2.6%) 8.021s (~) 0.219s 4 2.10x
🌐 MongoDB Next.js (Turbopack) 9.761s (~) 10.348s (~) 0.587s 3 2.63x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.853s (-11.8% 🟢) 3.641s (-17.4% 🟢) 0.789s 9 1.00x
▲ Vercel Express 3.210s (+18.2% 🔺) 4.003s (+12.6% 🔺) 0.793s 8 1.13x
▲ Vercel Nitro 3.454s (+20.8% 🔺) 4.204s (+10.0% 🔺) 0.750s 8 1.21x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.145s (-1.0%) 1.001s (~) 0.010s (-9.1% 🟢) 1.015s (~) 0.870s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.152s (+4.7%) 1.000s (~) 0.001s (-31.3% 🟢) 1.007s (~) 0.855s 10 1.05x
💻 Local Express 0.168s (-4.8%) 1.003s (~) 0.011s (-0.9%) 1.016s (~) 0.848s 10 1.16x
💻 Local Nitro 0.174s (+3.9%) 1.003s (~) 0.011s (+1.9%) 1.016s (~) 0.842s 10 1.20x
🐘 Postgres Nitro 0.191s (+0.6%) 0.993s (~) 0.002s (+36.4% 🔺) 1.013s (~) 0.822s 10 1.31x
🐘 Postgres Express 0.210s (+18.2% 🔺) 0.992s (~) 0.002s (~) 1.012s (~) 0.802s 10 1.45x
🌐 MongoDB Next.js (Turbopack) 0.471s (-3.7%) 0.973s (+1.7%) 0.002s (~) 1.008s (~) 0.537s 10 3.24x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.509s (-6.5% 🟢) 1.820s (-15.6% 🟢) 0.649s (+434.4% 🔺) 2.913s (+5.0%) 1.404s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.539s (-7.4% 🟢) 2.055s (-5.6% 🟢) 0.171s (+20.8% 🔺) 2.646s (-6.6% 🟢) 1.107s 10 1.02x
▲ Vercel Express 1.605s (+2.1%) 2.062s (-10.3% 🟢) 0.155s (+28.8% 🔺) 2.741s (-2.4%) 1.136s 10 1.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 6/12
Next.js (Turbopack) 🌐 Redis 5/12
Nitro 🐘 Postgres 7/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical serialization bug where custom Error subclasses implementing WORKFLOW_SERIALIZE were losing their custom fields due to incorrect reducer ordering. The fix leverages devalue's first-match-wins strategy by moving the Instance and Class reducers before the Error reducer in getCommonReducers(), ensuring custom Error serialization takes precedence over the generic Error serialization that only preserves name, message, and stack.

Changes:

  • Relocated Instance and Class reducers to appear before Error reducer in serialization order
  • Added 5 comprehensive unit tests covering custom Error subclass serialization across different code paths
  • Added changeset documenting the patch-level fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/core/src/serialization.ts Moved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.ts Added 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.md Documented the patch-level bug fix

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

@TooTallNate TooTallNate requested a review from a team February 24, 2026 06:52
@TooTallNate TooTallNate merged commit 6f2cbcd into main Feb 27, 2026
106 checks passed
@TooTallNate TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants