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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

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

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

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

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

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

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

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).
CopilotAI review requested due to automatic review settings February 23, 2026 23:56
@vercel

vercelBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentFeb 23, 2026 11:59pm
example-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-astro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-express-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-fastify-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-hono-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nitro-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-nuxt-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-sveltekit-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workbench-vite-workflowReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-docsReadyReadyPreview, Comment, Open in v0Feb 23, 2026 11:59pm
workflow-nestReadyReadyPreview, CommentFeb 23, 2026 11:59pm
workflow-swc-playgroundReadyReadyPreview, CommentFeb 23, 2026 11:59pm

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2486452862817

❌ 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
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run

@changeset-bot

Copy link
Copy Markdown

🦋 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
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@github-actions

github-actionsBot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.032s (+0.6%)1.005s (~)0.973s101.00x
💻 LocalExpress0.032s (+0.6%)1.005s (~)0.973s101.01x
💻 LocalNext.js (Turbopack)0.040s (-11.4% 🟢)1.005s (~)0.965s101.24x
🌐 RedisNext.js (Turbopack)0.048s (+5.2% 🔺)1.005s (~)0.956s101.51x
🐘 PostgresNitro0.054s (-9.0% 🟢)1.011s (~)0.957s101.68x
🐘 PostgresExpress0.055s (~)1.010s (~)0.955s101.71x
🌐 MongoDBNext.js (Turbopack)0.092s (-1.9%)1.007s (~)0.915s102.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.449s (-14.2% 🟢)1.884s (-13.0% 🟢)1.435s101.00x
▲ VercelNext.js (Turbopack)0.494s (-10.0% 🟢)1.807s (-9.1% 🟢)1.313s101.10x
▲ VercelExpress0.577s (+29.0% 🔺)2.012s (+5.5% 🔺)1.435s101.29x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.102s (~)2.006s (~)0.903s101.00x
💻 LocalNitro1.105s (~)2.005s (~)0.900s101.00x
💻 LocalExpress1.108s (~)2.006s (~)0.898s101.00x
🌐 RedisNext.js (Turbopack)1.109s (~)2.006s (~)0.898s101.01x
🐘 PostgresNitro1.133s (~)2.011s (~)0.878s101.03x
🐘 PostgresExpress1.145s (+2.0%)2.011s (~)0.867s101.04x
🌐 MongoDBNext.js (Turbopack)1.298s (-1.5%)2.008s (~)0.710s101.18x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.093s (-1.7%)3.045s (-12.5% 🟢)0.952s101.00x
▲ VercelExpress2.158s (+10.2% 🔺)3.315s (+9.3% 🔺)1.157s101.03x
▲ VercelNitro2.700s (+10.5% 🔺)3.734s (-1.8%)1.034s101.29x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.743s (~)11.022s (~)0.279s31.00x
🌐 RedisNext.js (Turbopack)10.747s (~)11.023s (~)0.277s31.00x
💻 LocalNitro10.819s (~)11.023s (~)0.204s31.01x
💻 LocalExpress10.842s (~)11.023s (~)0.181s31.01x
🐘 PostgresExpress10.921s (+0.7%)11.048s (~)0.127s31.02x
🐘 PostgresNitro10.958s (~)11.043s (~)0.085s31.02x
🌐 MongoDBNext.js (Turbopack)12.198s (-0.7%)13.018s (~)0.820s31.14x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.186s (~)17.372s (~)1.186s21.00x
▲ VercelExpress16.209s (+2.0%)17.260s (~)1.051s21.00x
▲ VercelNext.js (Turbopack)16.328s (~)17.575s (+1.1%)1.248s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.916s (~)27.052s (~)0.135s31.00x
💻 LocalNext.js (Turbopack)27.183s (~)28.055s (~)0.871s31.01x
🐘 PostgresNitro27.328s (~)28.062s (~)0.734s31.02x
🐘 PostgresExpress27.339s (+0.7%)28.065s (~)0.726s31.02x
💻 LocalNitro27.472s (~)28.050s (~)0.578s31.02x
💻 LocalExpress27.484s (~)28.050s (~)0.566s31.02x
🌐 MongoDBNext.js (Turbopack)30.407s (~)31.029s (~)0.622s21.13x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro39.587s (-1.3%)40.331s (-2.6%)0.745s21.00x
▲ VercelExpress39.834s (~)41.522s (+0.7%)1.688s21.01x
▲ VercelNext.js (Turbopack)40.081s (-2.5%)40.748s (-3.5%)0.667s21.01x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.432s (~)55.102s (~)0.670s21.00x
🐘 PostgresNitro55.211s (~)56.112s (+0.9%)0.902s21.01x
🐘 PostgresExpress55.282s (+1.0%)56.102s (+1.9%)0.820s21.02x
💻 LocalNext.js (Turbopack)56.554s (~)57.103s (~)0.548s21.04x
💻 LocalExpress57.181s (~)58.095s (~)0.915s21.05x
💻 LocalNitro57.265s (~)58.102s (+1.8%)0.837s21.05x
🌐 MongoDBNext.js (Turbopack)60.831s (-0.6%)61.061s (-1.6%)0.229s21.12x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro81.621s (-1.7%)82.694s (-1.4%)1.073s21.00x
▲ VercelExpress81.843s (~)82.948s (~)1.105s21.00x
▲ VercelNext.js (Turbopack)84.477s (+2.1%)85.627s (+2.4%)1.151s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.246s (-2.4%)2.006s (~)0.761s151.00x
🐘 PostgresNitro1.363s (~)2.010s (~)0.647s151.09x
🐘 PostgresExpress1.390s (+1.8%)2.010s (~)0.620s151.12x
💻 LocalNext.js (Turbopack)1.393s (-0.9%)2.004s (~)0.611s151.12x
💻 LocalExpress1.418s (+0.7%)2.004s (~)0.586s151.14x
💻 LocalNitro1.422s (+2.2%)2.005s (~)0.583s151.14x
🌐 MongoDBNext.js (Turbopack)2.149s (~)3.007s (~)0.858s101.72x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.239s (-1.5%)3.576s (+8.5% 🔺)1.337s91.00x
▲ VercelNext.js (Turbopack)2.355s (-1.1%)3.199s (-13.0% 🟢)0.844s101.05x
▲ VercelNitro2.532s (+15.8% 🔺)3.615s (+6.2% 🔺)1.083s91.13x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.980s (-1.6%)2.515s (~)0.535s121.00x
🐘 PostgresNitro2.028s (-1.4%)2.680s (+6.5% 🔺)0.651s121.02x
🌐 RedisNext.js (Turbopack)2.477s (~)3.008s (~)0.531s101.25x
💻 LocalNext.js (Turbopack)2.500s (+1.2%)3.008s (~)0.508s101.26x
💻 LocalExpress2.526s (-0.9%)3.007s (~)0.480s101.28x
💻 LocalNitro2.553s (+1.2%)3.007s (~)0.454s101.29x
🌐 MongoDBNext.js (Turbopack)4.694s (~)5.176s (~)0.483s62.37x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.194s (-19.0% 🟢)3.046s (-19.7% 🟢)0.852s101.00x
▲ VercelExpress2.376s (+0.7%)3.533s (-6.3% 🟢)1.156s91.08x
▲ VercelNitro2.398s (-2.9%)3.334s (-9.4% 🟢)0.936s91.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.275s (-8.4% 🟢)4.142s (~)0.868s81.00x
🐘 PostgresExpress3.878s (+26.9% 🔺)4.455s (+18.3% 🔺)0.577s71.18x
🌐 RedisNext.js (Turbopack)4.199s (+3.9%)5.012s (+9.4% 🔺)0.813s61.28x
💻 LocalNext.js (Turbopack)6.704s (-3.6%)7.513s (-3.2%)0.809s42.05x
💻 LocalExpress7.264s (-3.3%)8.021s (~)0.756s42.22x
💻 LocalNitro7.340s (+5.0% 🔺)8.020s (+6.7% 🔺)0.680s42.24x
🌐 MongoDBNext.js (Turbopack)9.873s (+0.8%)10.347s (~)0.474s33.02x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.655s (+4.3%)3.541s (+5.8% 🔺)0.886s91.00x
▲ VercelNext.js (Turbopack)3.468s (+19.4% 🔺)4.330s (+13.6% 🔺)0.862s71.31x
▲ VercelNitro3.519s (+3.5%)4.403s (+1.2%)0.883s71.33x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.281s (+3.2%)2.006s (~)0.725s151.00x
🐘 PostgresNitro1.370s (+1.4%)2.010s (~)0.640s151.07x
🐘 PostgresExpress1.401s (+2.3%)2.010s (~)0.609s151.09x
💻 LocalExpress1.419s (-0.9%)2.005s (~)0.586s151.11x
💻 LocalNitro1.425s (+1.4%)2.006s (~)0.581s151.11x
💻 LocalNext.js (Turbopack)1.434s (+0.6%)2.005s (~)0.570s151.12x
🌐 MongoDBNext.js (Turbopack)2.180s (+1.2%)3.007s (~)0.827s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.005s (-5.8% 🟢)3.187s (-6.1% 🟢)1.182s101.00x
▲ VercelNext.js (Turbopack)2.026s (-3.1%)3.025s (-12.6% 🟢)0.999s101.01x
▲ VercelExpress2.098s (+5.3% 🔺)3.327s (+10.1% 🔺)1.229s101.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.036s (+1.4%)2.594s (~)0.558s121.00x
🐘 PostgresExpress2.177s (+3.9%)2.833s (+12.8% 🔺)0.656s111.07x
🌐 RedisNext.js (Turbopack)2.478s (-0.5%)3.008s (~)0.530s101.22x
💻 LocalNext.js (Turbopack)2.563s (-2.3%)3.009s (~)0.446s101.26x
💻 LocalNitro2.657s (+2.3%)3.008s (~)0.351s101.30x
💻 LocalExpress2.740s (+2.1%)3.007s (~)0.268s101.35x
🌐 MongoDBNext.js (Turbopack)4.564s (-3.4%)5.175s (~)0.612s62.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.205s (+1.0%)3.207s (-4.0%)1.002s101.00x
▲ VercelNext.js (Turbopack)2.705s (+13.7% 🔺)3.695s (+2.7%)0.990s101.23x
▲ VercelExpress3.222s (+54.2% 🔺)4.334s (+43.7% 🔺)1.112s71.46x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.709s (-2.2%)4.310s (-6.2% 🟢)0.601s71.00x
🐘 PostgresExpress3.971s (+19.0% 🔺)4.598s (+14.5% 🔺)0.628s71.07x
🌐 RedisNext.js (Turbopack)4.028s (+1.2%)4.440s (~)0.413s71.09x
💻 LocalNext.js (Turbopack)7.255s (~)7.766s (~)0.512s41.96x
💻 LocalExpress7.515s (-4.3%)8.019s (~)0.503s42.03x
💻 LocalNitro7.802s (+2.6%)8.021s (~)0.219s42.10x
🌐 MongoDBNext.js (Turbopack)9.761s (~)10.348s (~)0.587s32.63x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.853s (-11.8% 🟢)3.641s (-17.4% 🟢)0.789s91.00x
▲ VercelExpress3.210s (+18.2% 🔺)4.003s (+12.6% 🔺)0.793s81.13x
▲ VercelNitro3.454s (+20.8% 🔺)4.204s (+10.0% 🔺)0.750s81.21x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.145s (-1.0%)1.001s (~)0.010s (-9.1% 🟢)1.015s (~)0.870s101.00x
🌐 RedisNext.js (Turbopack)0.152s (+4.7%)1.000s (~)0.001s (-31.3% 🟢)1.007s (~)0.855s101.05x
💻 LocalExpress0.168s (-4.8%)1.003s (~)0.011s (-0.9%)1.016s (~)0.848s101.16x
💻 LocalNitro0.174s (+3.9%)1.003s (~)0.011s (+1.9%)1.016s (~)0.842s101.20x
🐘 PostgresNitro0.191s (+0.6%)0.993s (~)0.002s (+36.4% 🔺)1.013s (~)0.822s101.31x
🐘 PostgresExpress0.210s (+18.2% 🔺)0.992s (~)0.002s (~)1.012s (~)0.802s101.45x
🌐 MongoDBNext.js (Turbopack)0.471s (-3.7%)0.973s (+1.7%)0.002s (~)1.008s (~)0.537s103.24x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.509s (-6.5% 🟢)1.820s (-15.6% 🟢)0.649s (+434.4% 🔺)2.913s (+5.0%)1.404s101.00x
▲ VercelNext.js (Turbopack)1.539s (-7.4% 🟢)2.055s (-5.6% 🟢)0.171s (+20.8% 🔺)2.646s (-6.6% 🟢)1.107s101.02x
▲ VercelExpress1.605s (+2.1%)2.062s (-10.3% 🟢)0.155s (+28.8% 🔺)2.741s (-2.4%)1.136s101.06x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)10/12
🐘 PostgresNitro10/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

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

FileDescription
packages/core/src/serialization.tsMoved Instance and Class reducers before Error reducer to fix serialization precedence for custom Error subclasses
packages/core/src/serialization.test.tsAdded 5 new tests verifying custom Error serialization, plain Error handling, and edge cases
.changeset/custom-error-serde-precedence.mdDocumented 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 teamFebruary 24, 2026 06:52
@TooTallNate
TooTallNate merged commit 6f2cbcd into mainFeb 27, 2026
106 checks passed
@TooTallNate
TooTallNate deleted the fix/custom-error-serde-precedence branch February 27, 2026 21:11
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

@TooTallNate@VaguelySerious