Skip to content

Conversation

@pranaygp
Copy link
Collaborator

@pranaygp pranaygp commented Jan 3, 2026

Summary

  • Generates inline sourcemaps for step bundles and propagates stack track to upstream workflow FatalError
  • Add e2e tests to ensure step source maps and stack traces and propagated correctly
    • NOTE: Different frameworks and runtime (build/dev/vercel) have varying degrees of support for this. The utils.ts file includes specific checks to change the test behavior based on the context. It's pretty ugly but will attempt to fix this in future PRs to be consistent. Atleast this PR is an improvement over no stack trace propagation at all
  • Refactor the various error e2e tests into a few cleaner error e2e tests with more clear expectations:
    • error propagation - workflow errors (nested, cross-file) and step errors (basic, cross-file)
    • retry behavior - regular Error, FatalError, RetryableError, maxRetries=0
    • catchability - FatalError.is() detection

Closes #310

Copilot AI review requested due to automatic review settings January 3, 2026 03:48
@vercel
Copy link
Contributor

vercel bot commented Jan 3, 2026

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

Project Deployment Review Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jan 3, 2026 7:08am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jan 3, 2026 7:08am
example-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-astro-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-express-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-fastify-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-hono-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-nitro-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-nuxt-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-sveltekit-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workbench-vite-workflow Ready Ready Preview, Comment Jan 3, 2026 7:08am
workflow-docs Ready Ready Preview, Comment Jan 3, 2026 7:08am

@changeset-bot
Copy link

changeset-bot bot commented Jan 3, 2026

🦋 Changeset detected

Latest commit: 14b0723

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

This PR includes changesets to release 13 packages
Name Type
@workflow/builders Patch
@workflow/core Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/sveltekit Patch
@workflow/docs-typecheck Patch
@workflow/web-shared Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/ai Patch

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 363 0 11 374
✅ 💻 Local Development 332 0 8 340
✅ 📦 Local Production 332 0 8 340
✅ 🐘 Local Postgres 332 0 8 340
✅ 🪟 Windows 34 0 0 34
❌ 🌍 Community Worlds 132 16 0 148
Total 1525 16 35 1576

❌ Failed Tests

🌍 Community Worlds (16 failed)

mongodb (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • 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 catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 33 0 1
✅ example 33 0 1
✅ express 33 0 1
✅ fastify 33 0 1
✅ hono 33 0 1
✅ nextjs-turbopack 33 0 1
✅ nextjs-webpack 33 0 1
✅ nitro 33 0 1
✅ nuxt 33 0 1
✅ sveltekit 33 0 1
✅ vite 33 0 1
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 33 0 1
✅ express-stable 33 0 1
✅ fastify-stable 33 0 1
✅ hono-stable 33 0 1
✅ nextjs-turbopack-stable 34 0 0
✅ nextjs-webpack-stable 34 0 0
✅ nitro-stable 33 0 1
✅ nuxt-stable 33 0 1
✅ sveltekit-stable 33 0 1
✅ vite-stable 33 0 1
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 33 0 1
✅ express-stable 33 0 1
✅ fastify-stable 33 0 1
✅ hono-stable 33 0 1
✅ nextjs-turbopack-stable 34 0 0
✅ nextjs-webpack-stable 34 0 0
✅ nitro-stable 33 0 1
✅ nuxt-stable 33 0 1
✅ sveltekit-stable 33 0 1
✅ vite-stable 33 0 1
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 33 0 1
✅ express-stable 33 0 1
✅ fastify-stable 33 0 1
✅ hono-stable 33 0 1
✅ nextjs-turbopack-stable 34 0 0
✅ nextjs-webpack-stable 34 0 0
✅ nitro-stable 33 0 1
✅ nuxt-stable 33 0 1
✅ sveltekit-stable 33 0 1
✅ vite-stable 33 0 1
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 34 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
❌ mongodb 33 1 0
✅ redis-dev 3 0 0
✅ redis 34 0 0
✅ starter-dev 3 0 0
❌ starter 20 14 0
✅ turso-dev 3 0 0
❌ turso 33 1 0

📋 View full workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 0.035s (-3.6%) 1.017s (~) 0.981s 10 1.00x
💻 Local Next.js (Turbopack) 0.040s (-1.0%) 1.014s (~) 0.974s 10 1.14x
🌐 Redis Next.js (Turbopack) 0.041s (~) 1.017s (~) 0.976s 10 1.17x
💻 Local Nitro 0.041s (-3.7%) 1.006s (~) 0.965s 10 1.17x
💻 Local Express 0.046s (+3.4%) 1.008s (~) 0.962s 10 1.29x
🌐 MongoDB Next.js (Turbopack) 0.065s (-45.4% 🟢) 1.016s (~) 0.952s 10 1.83x
🌐 Turso Next.js (Turbopack) 0.107s (+96.2% 🔺) 1.014s (~) 0.907s 10 3.04x
🐘 Postgres Nitro 0.289s (+4.6%) 1.013s (~) 0.723s 10 8.20x
🐘 Postgres Next.js (Turbopack) 0.291s (-36.6% 🟢) 1.019s (-0.5%) 0.728s 10 8.25x
🐘 Postgres Express 0.320s (-7.4% 🟢) 1.015s (~) 0.695s 10 9.07x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.541s (-12.0% 🟢) 1.659s (+2.6%) 1.118s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.612s (-18.5% 🟢) 1.489s (-14.7% 🟢) 0.878s 10 1.13x
▲ Vercel Nitro 0.636s (-5.7% 🟢) 1.817s (+1.5%) 1.182s 10 1.17x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 1.076s (-1.8%) 2.013s (~) 0.937s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.099s (~) 2.013s (~) 0.914s 10 1.02x
💻 Local Next.js (Turbopack) 1.103s (+0.5%) 2.010s (~) 0.908s 10 1.02x
💻 Local Nitro 1.113s (~) 2.005s (~) 0.892s 10 1.03x
💻 Local Express 1.115s (~) 2.007s (~) 0.891s 10 1.04x
🌐 MongoDB Next.js (Turbopack) 1.307s (~) 2.013s (~) 0.706s 10 1.21x
🌐 Turso Next.js (Turbopack) 1.316s (+1.7%) 2.013s (~) 0.697s 10 1.22x
🐘 Postgres Next.js (Turbopack) 1.877s (-16.7% 🟢) 2.013s (-33.3% 🟢) 0.136s 10 1.74x
🐘 Postgres Express 2.151s (-2.5%) 3.015s (~) 0.864s 10 2.00x
🐘 Postgres Nitro 2.151s (+0.7%) 3.014s (~) 0.863s 10 2.00x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.641s (-11.3% 🟢) 3.571s (-7.3% 🟢) 0.930s 10 1.00x
▲ Vercel Nitro 2.702s (-2.5%) 3.699s (-1.4%) 0.997s 10 1.02x
▲ Vercel Express 2.747s (-6.2% 🟢) 3.700s (-1.9%) 0.953s 10 1.04x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 10.508s (-0.8%) 11.016s (~) 0.508s 5 1.00x
💻 Local Next.js (Turbopack) 10.657s (~) 11.014s (~) 0.357s 5 1.01x
🌐 Redis Next.js (Turbopack) 10.679s (~) 11.020s (~) 0.341s 5 1.02x
💻 Local Nitro 10.793s (~) 11.013s (~) 0.219s 5 1.03x
💻 Local Express 10.804s (~) 11.015s (~) 0.211s 5 1.03x
🌐 Turso Next.js (Turbopack) 12.192s (~) 13.027s (~) 0.836s 5 1.16x
🌐 MongoDB Next.js (Turbopack) 12.287s (+0.5%) 13.027s (~) 0.740s 5 1.17x
🐘 Postgres Next.js (Turbopack) 15.218s (-23.5% 🟢) 16.031s (-23.1% 🟢) 0.813s 5 1.45x
🐘 Postgres Nitro 20.416s (~) 21.033s (~) 0.617s 5 1.94x
🐘 Postgres Express 20.490s (+1.6%) 21.031s (+0.9%) 0.541s 5 1.95x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 22.236s (+2.6%) 23.068s (+3.1%) 0.831s 5 1.00x
▲ Vercel Next.js (Turbopack) 22.294s (+4.2%) 23.006s (+4.7%) 0.712s 5 1.00x
▲ Vercel Nitro 22.665s (+6.8% 🔺) 23.552s (+8.1% 🔺) 0.887s 5 1.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 1.346s (+0.6%) 2.010s (~) 0.664s 15 1.00x
🌐 Redis Next.js (Turbopack) 1.357s (~) 2.010s (~) 0.653s 15 1.01x
💻 Local Next.js (Turbopack) 1.393s (~) 2.014s (~) 0.621s 15 1.04x
💻 Local Nitro 1.409s (~) 2.006s (~) 0.597s 15 1.05x
💻 Local Express 1.422s (+0.8%) 2.007s (~) 0.585s 15 1.06x
🐘 Postgres Next.js (Turbopack) 1.829s (~) 2.010s (~) 0.181s 15 1.36x
🌐 MongoDB Next.js (Turbopack) 2.142s (~) 3.015s (~) 0.874s 10 1.59x
🌐 Turso Next.js (Turbopack) 2.224s (+0.9%) 3.015s (~) 0.791s 10 1.65x
🐘 Postgres Express 2.403s (-1.8%) 3.012s (~) 0.609s 10 1.79x
🐘 Postgres Nitro 2.449s (+34.8% 🔺) 3.012s (+39.9% 🔺) 0.563s 10 1.82x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.809s (-6.0% 🟢) 3.631s (~) 0.822s 9 1.00x
▲ Vercel Nitro 2.838s (-2.0%) 3.784s (+2.1%) 0.946s 8 1.01x
▲ Vercel Express 2.924s (-1.6%) 3.975s (+3.1%) 1.051s 8 1.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 2.147s (+0.7%) 3.045s (~) 0.898s 10 1.00x
💻 Local Nitro 2.211s (~) 3.173s (~) 0.962s 10 1.03x
💻 Local Express 2.256s (+2.9%) 3.196s (+1.5%) 0.941s 10 1.05x
🌐 Starter Next.js (Turbopack) 2.426s (-1.1%) 3.013s (~) 0.586s 10 1.13x
🌐 Redis Next.js (Turbopack) 2.494s (~) 3.013s (~) 0.519s 10 1.16x
🐘 Postgres Next.js (Turbopack) 2.644s (+0.6%) 3.014s (~) 0.371s 10 1.23x
🐘 Postgres Nitro 2.916s (+11.2% 🔺) 3.213s (+6.6% 🔺) 0.298s 10 1.36x
🐘 Postgres Express 2.930s (+4.0%) 3.320s (+10.0% 🔺) 0.390s 10 1.36x
🌐 MongoDB Next.js (Turbopack) 4.665s (~) 5.184s (~) 0.519s 6 2.17x
🌐 Turso Next.js (Turbopack) 4.743s (~) 5.185s (~) 0.442s 6 2.21x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.358s (-24.7% 🟢) 4.029s (-24.1% 🟢) 0.671s 8 1.00x
▲ Vercel Nitro 3.449s (-13.3% 🟢) 4.025s (-15.9% 🟢) 0.576s 8 1.03x
▲ Vercel Express 3.509s (-24.2% 🟢) 4.468s (-22.3% 🟢) 0.959s 7 1.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.350s (-2.1%) 2.010s (~) 0.660s 15 1.00x
🌐 Starter Next.js (Turbopack) 1.363s (+1.6%) 2.009s (~) 0.646s 15 1.01x
💻 Local Next.js (Turbopack) 1.400s (-0.7%) 2.013s (~) 0.613s 15 1.04x
💻 Local Express 1.414s (+0.8%) 2.006s (~) 0.592s 15 1.05x
💻 Local Nitro 1.421s (~) 2.006s (~) 0.585s 15 1.05x
🐘 Postgres Next.js (Turbopack) 1.473s (-0.8%) 2.010s (~) 0.537s 15 1.09x
🐘 Postgres Express 2.098s (+10.8% 🔺) 2.320s (+4.2%) 0.221s 13 1.55x
🌐 MongoDB Next.js (Turbopack) 2.132s (-0.5%) 3.014s (~) 0.882s 10 1.58x
🌐 Turso Next.js (Turbopack) 2.238s (~) 3.016s (~) 0.778s 10 1.66x
🐘 Postgres Nitro 2.511s (+41.3% 🔺) 3.019s (+50.2% 🔺) 0.508s 10 1.86x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.821s (-3.9%) 3.644s (-5.3% 🟢) 0.823s 9 1.00x
▲ Vercel Nitro 2.878s (+3.3%) 3.744s (~) 0.866s 9 1.02x
▲ Vercel Express 2.879s (-1.5%) 3.775s (-3.5%) 0.895s 8 1.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 2.224s (-1.5%) 3.168s (-1.1%) 0.945s 10 1.00x
💻 Local Next.js (Turbopack) 2.232s (~) 3.177s (+1.7%) 0.945s 10 1.00x
💻 Local Express 2.318s (+5.7% 🔺) 3.228s (+2.7%) 0.909s 10 1.04x
🌐 Starter Next.js (Turbopack) 2.424s (-0.7%) 3.011s (~) 0.587s 10 1.09x
🌐 Redis Next.js (Turbopack) 2.452s (-2.2%) 3.010s (~) 0.557s 10 1.10x
🐘 Postgres Next.js (Turbopack) 2.683s (+5.6% 🔺) 3.026s (~) 0.344s 10 1.21x
🐘 Postgres Express 2.797s (-5.2% 🟢) 3.011s (-3.4%) 0.214s 10 1.26x
🐘 Postgres Nitro 2.913s (+18.8% 🔺) 3.016s (~) 0.103s 10 1.31x
🌐 MongoDB Next.js (Turbopack) 4.695s (-1.9%) 5.182s (~) 0.487s 6 2.11x
🌐 Turso Next.js (Turbopack) 4.774s (+1.6%) 5.179s (~) 0.405s 6 2.15x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.166s (+1.2%) 3.936s (+1.4%) 0.770s 8 1.00x
▲ Vercel Nitro 3.325s (+3.1%) 3.901s (+1.3%) 0.576s 8 1.05x
▲ Vercel Next.js (Turbopack) 3.479s (+7.6% 🔺) 4.054s (+8.6% 🔺) 0.575s 8 1.10x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 0.108s (-15.1% 🟢) 1.006s (~) 0.000s (+Infinity% 🔺) 1.013s (~) 0.905s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.140s (-3.6%) 1.005s (~) 0.000s (NaN%) 1.013s (~) 0.873s 10 1.30x
💻 Local Next.js (Turbopack) 0.142s (+1.8%) 1.002s (~) 0.018s (+12.3% 🔺) 1.032s (+0.5%) 0.890s 10 1.32x
💻 Local Nitro 0.177s (-0.5%) 0.993s (~) 0.019s (+9.2% 🔺) 1.026s (~) 0.849s 10 1.64x
💻 Local Express 0.180s (+1.4%) 0.993s (~) 0.016s (-12.4% 🟢) 1.023s (~) 0.843s 10 1.66x
🌐 MongoDB Next.js (Turbopack) 0.518s (+8.6% 🔺) 0.935s (-4.0%) 0.000s (NaN%) 1.014s (~) 0.496s 10 4.80x
🌐 Turso Next.js (Turbopack) 0.520s (-3.8%) 0.934s (+2.4%) 0.000s (~) 1.013s (~) 0.493s 10 4.82x
🐘 Postgres Next.js (Turbopack) 1.155s (-13.7% 🟢) 1.665s (-2.4%) 0.000s (NaN%) 1.817s (-9.9% 🟢) 0.662s 10 10.70x
🐘 Postgres Express 2.310s (-2.1%) 2.732s (+1.8%) 0.000s (~) 3.014s (~) 0.704s 10 21.39x
🐘 Postgres Nitro 2.340s (+44.3% 🔺) 2.702s (+32.2% 🔺) 0.000s (+Infinity% 🔺) 3.014s (+30.3% 🔺) 0.673s 10 21.67x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.800s (+11.3% 🔺) 3.249s (+7.1% 🔺) 0.664s (+65.2% 🔺) 4.337s (+12.6% 🔺) 1.537s 10 1.00x
▲ Vercel Express 2.822s (+9.8% 🔺) 3.306s (+7.9% 🔺) 0.515s (+38.5% 🔺) 4.322s (+11.8% 🔺) 1.500s 10 1.01x
▲ Vercel Nitro 3.022s (+21.2% 🔺) 3.248s (+2.3%) 0.509s (+58.3% 🔺) 4.299s (+9.3% 🔺) 1.277s 10 1.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 8/8
Next.js (Turbopack) 🌐 Starter 5/8
Nitro 💻 Local 8/8
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors error handling end-to-end tests by breaking up consolidated tests into 9 individual, isolated tests organized into semantic groups. The restructuring improves test debuggability and maintainability through clearer organization using nested describe blocks and consistent naming conventions.

  • Breaks up 3 consolidated error workflow tests into 9 focused individual tests
  • Organizes tests into 3 semantic groups: error propagation (workflow/step errors), retry behavior (Error/FatalError/RetryableError/maxRetries), and catchability (FatalError.is())
  • Adds helper functions in helpers.ts to support cross-file error testing

Reviewed changes

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

File Description
workbench/example/workflows/helpers.ts Adds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.ts Removes old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.ts Restructures error handling tests into nested describe blocks with individual test cases, replacing 3 consolidated tests with 9 specific tests

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

Step error workflows now catch the error and return message/stack,
making assertions cleaner. Tests verify both:
- Workflow return value (caught error message)
- CLI step result (original stack with function names)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pretty much a noop here - it's just relevant later for event sourcing

// Steps execute in Node.js context and inline sourcemaps ensure we get
// meaningful stack traces with proper file names and line numbers when errors
// occur in deeply nested function calls across multiple files.
sourcemap: 'inline',
Copy link
Member

Choose a reason for hiding this comment

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

This is the only change that gives me a tiny bit of pause - does this affect performance? It'd be nice to take a quick look at bundle times and see if it's relevant, given we already have complaints about bundling/discovery time, and the caching PR from JJ was reverted recently

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the perf issues were primarily happening in the "discovering workflows/steps" bit - which is not the same as this esbuild.

This shouldn't meaningfully affect benchmarking yet, but we probably should start benchmarking build times soon too @ijjk as you dig deeper into that

@pranaygp pranaygp merged commit 4d6f797 into main Jan 5, 2026
96 checks passed
@pranaygp pranaygp deleted the pranaygp/refactor-error-e2e-tests branch January 5, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants