Fix step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@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 step stack trace propogation and refactor e2e error tests - #720

Merged
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests
Jan 5, 2026
Merged

Fix step stack trace propogation and refactor e2e error tests#720
pranaygp merged 16 commits into
mainfrom
pranaygp/refactor-error-e2e-tests

Conversation

@pranaygp

@pranaygppranaygp commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

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

CopilotAI review requested due to automatic review settings January 3, 2026 03:48
@vercel

vercelBot commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jan 3, 2026

Copy link
Copy Markdown

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

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 Jan 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds132160148
Total152516351576

❌ 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
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
✅ redis3400
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 3, 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
🌐 Starter🥇 Next.js (Turbopack)0.035s (-3.6%)1.017s (~)0.981s101.00x
💻 LocalNext.js (Turbopack)0.040s (-1.0%)1.014s (~)0.974s101.14x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.17x
💻 LocalNitro0.041s (-3.7%)1.006s (~)0.965s101.17x
💻 LocalExpress0.046s (+3.4%)1.008s (~)0.962s101.29x
🌐 MongoDBNext.js (Turbopack)0.065s (-45.4% 🟢)1.016s (~)0.952s101.83x
🌐 TursoNext.js (Turbopack)0.107s (+96.2% 🔺)1.014s (~)0.907s103.04x
🐘 PostgresNitro0.289s (+4.6%)1.013s (~)0.723s108.20x
🐘 PostgresNext.js (Turbopack)0.291s (-36.6% 🟢)1.019s (-0.5%)0.728s108.25x
🐘 PostgresExpress0.320s (-7.4% 🟢)1.015s (~)0.695s109.07x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.541s (-12.0% 🟢)1.659s (+2.6%)1.118s101.00x
▲ VercelNext.js (Turbopack)0.612s (-18.5% 🟢)1.489s (-14.7% 🟢)0.878s101.13x
▲ VercelNitro0.636s (-5.7% 🟢)1.817s (+1.5%)1.182s101.17x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.076s (-1.8%)2.013s (~)0.937s101.00x
🌐 RedisNext.js (Turbopack)1.099s (~)2.013s (~)0.914s101.02x
💻 LocalNext.js (Turbopack)1.103s (+0.5%)2.010s (~)0.908s101.02x
💻 LocalNitro1.113s (~)2.005s (~)0.892s101.03x
💻 LocalExpress1.115s (~)2.007s (~)0.891s101.04x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.013s (~)0.706s101.21x
🌐 TursoNext.js (Turbopack)1.316s (+1.7%)2.013s (~)0.697s101.22x
🐘 PostgresNext.js (Turbopack)1.877s (-16.7% 🟢)2.013s (-33.3% 🟢)0.136s101.74x
🐘 PostgresExpress2.151s (-2.5%)3.015s (~)0.864s102.00x
🐘 PostgresNitro2.151s (+0.7%)3.014s (~)0.863s102.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.641s (-11.3% 🟢)3.571s (-7.3% 🟢)0.930s101.00x
▲ VercelNitro2.702s (-2.5%)3.699s (-1.4%)0.997s101.02x
▲ VercelExpress2.747s (-6.2% 🟢)3.700s (-1.9%)0.953s101.04x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.508s (-0.8%)11.016s (~)0.508s51.00x
💻 LocalNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
🌐 RedisNext.js (Turbopack)10.679s (~)11.020s (~)0.341s51.02x
💻 LocalNitro10.793s (~)11.013s (~)0.219s51.03x
💻 LocalExpress10.804s (~)11.015s (~)0.211s51.03x
🌐 TursoNext.js (Turbopack)12.192s (~)13.027s (~)0.836s51.16x
🌐 MongoDBNext.js (Turbopack)12.287s (+0.5%)13.027s (~)0.740s51.17x
🐘 PostgresNext.js (Turbopack)15.218s (-23.5% 🟢)16.031s (-23.1% 🟢)0.813s51.45x
🐘 PostgresNitro20.416s (~)21.033s (~)0.617s51.94x
🐘 PostgresExpress20.490s (+1.6%)21.031s (+0.9%)0.541s51.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.236s (+2.6%)23.068s (+3.1%)0.831s51.00x
▲ VercelNext.js (Turbopack)22.294s (+4.2%)23.006s (+4.7%)0.712s51.00x
▲ VercelNitro22.665s (+6.8% 🔺)23.552s (+8.1% 🔺)0.887s51.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.346s (+0.6%)2.010s (~)0.664s151.00x
🌐 RedisNext.js (Turbopack)1.357s (~)2.010s (~)0.653s151.01x
💻 LocalNext.js (Turbopack)1.393s (~)2.014s (~)0.621s151.04x
💻 LocalNitro1.409s (~)2.006s (~)0.597s151.05x
💻 LocalExpress1.422s (+0.8%)2.007s (~)0.585s151.06x
🐘 PostgresNext.js (Turbopack)1.829s (~)2.010s (~)0.181s151.36x
🌐 MongoDBNext.js (Turbopack)2.142s (~)3.015s (~)0.874s101.59x
🌐 TursoNext.js (Turbopack)2.224s (+0.9%)3.015s (~)0.791s101.65x
🐘 PostgresExpress2.403s (-1.8%)3.012s (~)0.609s101.79x
🐘 PostgresNitro2.449s (+34.8% 🔺)3.012s (+39.9% 🔺)0.563s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.809s (-6.0% 🟢)3.631s (~)0.822s91.00x
▲ VercelNitro2.838s (-2.0%)3.784s (+2.1%)0.946s81.01x
▲ VercelExpress2.924s (-1.6%)3.975s (+3.1%)1.051s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.147s (+0.7%)3.045s (~)0.898s101.00x
💻 LocalNitro2.211s (~)3.173s (~)0.962s101.03x
💻 LocalExpress2.256s (+2.9%)3.196s (+1.5%)0.941s101.05x
🌐 StarterNext.js (Turbopack)2.426s (-1.1%)3.013s (~)0.586s101.13x
🌐 RedisNext.js (Turbopack)2.494s (~)3.013s (~)0.519s101.16x
🐘 PostgresNext.js (Turbopack)2.644s (+0.6%)3.014s (~)0.371s101.23x
🐘 PostgresNitro2.916s (+11.2% 🔺)3.213s (+6.6% 🔺)0.298s101.36x
🐘 PostgresExpress2.930s (+4.0%)3.320s (+10.0% 🔺)0.390s101.36x
🌐 MongoDBNext.js (Turbopack)4.665s (~)5.184s (~)0.519s62.17x
🌐 TursoNext.js (Turbopack)4.743s (~)5.185s (~)0.442s62.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.358s (-24.7% 🟢)4.029s (-24.1% 🟢)0.671s81.00x
▲ VercelNitro3.449s (-13.3% 🟢)4.025s (-15.9% 🟢)0.576s81.03x
▲ VercelExpress3.509s (-24.2% 🟢)4.468s (-22.3% 🟢)0.959s71.05x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.350s (-2.1%)2.010s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.363s (+1.6%)2.009s (~)0.646s151.01x
💻 LocalNext.js (Turbopack)1.400s (-0.7%)2.013s (~)0.613s151.04x
💻 LocalExpress1.414s (+0.8%)2.006s (~)0.592s151.05x
💻 LocalNitro1.421s (~)2.006s (~)0.585s151.05x
🐘 PostgresNext.js (Turbopack)1.473s (-0.8%)2.010s (~)0.537s151.09x
🐘 PostgresExpress2.098s (+10.8% 🔺)2.320s (+4.2%)0.221s131.55x
🌐 MongoDBNext.js (Turbopack)2.132s (-0.5%)3.014s (~)0.882s101.58x
🌐 TursoNext.js (Turbopack)2.238s (~)3.016s (~)0.778s101.66x
🐘 PostgresNitro2.511s (+41.3% 🔺)3.019s (+50.2% 🔺)0.508s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.821s (-3.9%)3.644s (-5.3% 🟢)0.823s91.00x
▲ VercelNitro2.878s (+3.3%)3.744s (~)0.866s91.02x
▲ VercelExpress2.879s (-1.5%)3.775s (-3.5%)0.895s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.224s (-1.5%)3.168s (-1.1%)0.945s101.00x
💻 LocalNext.js (Turbopack)2.232s (~)3.177s (+1.7%)0.945s101.00x
💻 LocalExpress2.318s (+5.7% 🔺)3.228s (+2.7%)0.909s101.04x
🌐 StarterNext.js (Turbopack)2.424s (-0.7%)3.011s (~)0.587s101.09x
🌐 RedisNext.js (Turbopack)2.452s (-2.2%)3.010s (~)0.557s101.10x
🐘 PostgresNext.js (Turbopack)2.683s (+5.6% 🔺)3.026s (~)0.344s101.21x
🐘 PostgresExpress2.797s (-5.2% 🟢)3.011s (-3.4%)0.214s101.26x
🐘 PostgresNitro2.913s (+18.8% 🔺)3.016s (~)0.103s101.31x
🌐 MongoDBNext.js (Turbopack)4.695s (-1.9%)5.182s (~)0.487s62.11x
🌐 TursoNext.js (Turbopack)4.774s (+1.6%)5.179s (~)0.405s62.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.166s (+1.2%)3.936s (+1.4%)0.770s81.00x
▲ VercelNitro3.325s (+3.1%)3.901s (+1.3%)0.576s81.05x
▲ VercelNext.js (Turbopack)3.479s (+7.6% 🔺)4.054s (+8.6% 🔺)0.575s81.10x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.108s (-15.1% 🟢)1.006s (~)0.000s (+Infinity% 🔺)1.013s (~)0.905s101.00x
🌐 RedisNext.js (Turbopack)0.140s (-3.6%)1.005s (~)0.000s (NaN%)1.013s (~)0.873s101.30x
💻 LocalNext.js (Turbopack)0.142s (+1.8%)1.002s (~)0.018s (+12.3% 🔺)1.032s (+0.5%)0.890s101.32x
💻 LocalNitro0.177s (-0.5%)0.993s (~)0.019s (+9.2% 🔺)1.026s (~)0.849s101.64x
💻 LocalExpress0.180s (+1.4%)0.993s (~)0.016s (-12.4% 🟢)1.023s (~)0.843s101.66x
🌐 MongoDBNext.js (Turbopack)0.518s (+8.6% 🔺)0.935s (-4.0%)0.000s (NaN%)1.014s (~)0.496s104.80x
🌐 TursoNext.js (Turbopack)0.520s (-3.8%)0.934s (+2.4%)0.000s (~)1.013s (~)0.493s104.82x
🐘 PostgresNext.js (Turbopack)1.155s (-13.7% 🟢)1.665s (-2.4%)0.000s (NaN%)1.817s (-9.9% 🟢)0.662s1010.70x
🐘 PostgresExpress2.310s (-2.1%)2.732s (+1.8%)0.000s (~)3.014s (~)0.704s1021.39x
🐘 PostgresNitro2.340s (+44.3% 🔺)2.702s (+32.2% 🔺)0.000s (+Infinity% 🔺)3.014s (+30.3% 🔺)0.673s1021.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.800s (+11.3% 🔺)3.249s (+7.1% 🔺)0.664s (+65.2% 🔺)4.337s (+12.6% 🔺)1.537s101.00x
▲ VercelExpress2.822s (+9.8% 🔺)3.306s (+7.9% 🔺)0.515s (+38.5% 🔺)4.322s (+11.8% 🔺)1.500s101.01x
▲ VercelNitro3.022s (+21.2% 🔺)3.248s (+2.3%)0.509s (+58.3% 🔺)4.299s (+9.3% 🔺)1.277s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelNext.js (Turbopack)5/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/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

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

FileDescription
workbench/example/workflows/helpers.tsAdds new helper functions and documentation for testing cross-file error propagation in both workflow and step contexts
workbench/example/workflows/99_e2e.tsRemoves old consolidated error test workflows and adds 9 new focused error test workflows with consistent naming and clear documentation
packages/core/e2e/e2e.test.tsRestructures 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 <noreply@anthropic.com>
pranaygpand others added 10 commits January 2, 2026 21:11
- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
(known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
correlationId: stepId,
eventData: {
error: errorMessage,
stack: step.error?.stack,

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pranaygp@VaguelySerious