Skip to content

Update workbench tests to build and run outside of monorepo #1230

Merged
ijjk merged 21 commits intomainfrom
ijjk/fix-lazy-test-handling
Mar 3, 2026
Merged

Update workbench tests to build and run outside of monorepo #1230
ijjk merged 21 commits intomainfrom
ijjk/fix-lazy-test-handling

Conversation

@ijjk
Copy link
Copy Markdown
Member

@ijjk ijjk commented Mar 1, 2026

This PR fixes deferred/lazy behavior outside the monorepo and updates our local E2E flow to run workbenches from staged tarballs so tests match real user installs.

What changed

  • Added scripts/stage-workbench-with-tarballs.mjs to:
    • copy a workbench into $TMPDIR with symlinks resolved
    • copy workbench/scripts and repo lib into the staged workspace
    • pnpm pack all monorepo packages and rewrite staged dependencies to local tarballs
    • apply pnpm tarball overrides for transitive monorepo packages
    • install dependencies in the staged workbench
  • Wired staged Next.js workbenches into local dev/prod CI setup (.github/workflows/tests.yml) and updated E2E path resolution via WORKBENCH_APP_PATH.
  • Added/updated regression coverage for deferred/lazy imported-step behavior in:
    • dev mode (packages/core/e2e/dev.test.ts)
    • build/start mode (packages/core/e2e/e2e.test.ts)
  • Fixed deferred discovery/rebuild issues in @workflow/next:
    • include steps discovered via workflow imports
    • rebuild deferred entries on discovered/tracked file updates
    • keep deferred behavior socket-driven (no Watchpack dependency watcher)
    • for deferred copied step files, notify discovery using original source path and register original source as a dependency so source edits (including non-signature edits like console.log changes) trigger rebuild/HMR correctly outside monorepo

Validation

  • Verified against ~/dev/repros/lazy-workflow using latest tarball build:
    • edit src/workflows/chat/steps.ts
    • retrigger /api/test
    • updated step implementation is used in dev without server restart
  • Verified against Next.js webpack and turbopack workbench staged local dev/start flows.

x-ref: #1159

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 1, 2026

🦋 Changeset detected

Latest commit: a783ad6

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

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

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

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 1, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 1, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.032s (-3.9%) 1.005s (~) 0.973s 10 1.00x
💻 Local Express 0.033s (-6.0% 🟢) 1.005s (~) 0.972s 10 1.03x
💻 Local Next.js (Turbopack) 0.037s 1.005s 0.967s 10 1.17x
🌐 Redis Next.js (Turbopack) 0.043s 1.005s 0.961s 10 1.36x
🐘 Postgres Express 0.054s (-12.5% 🟢) 1.010s (-0.8%) 0.956s 10 1.71x
🐘 Postgres Nitro 0.055s (+3.6%) 1.011s (~) 0.956s 10 1.72x
🌐 MongoDB Next.js (Turbopack) 0.093s 1.008s 0.915s 10 2.92x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.420s (-22.6% 🟢) 1.846s (-19.8% 🟢) 1.426s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.444s (-20.8% 🟢) 1.837s (-16.7% 🟢) 1.393s 10 1.06x
▲ Vercel Nitro 0.480s (+6.5% 🔺) 2.007s (-3.4%) 1.527s 10 1.14x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.096s 2.005s 0.909s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.105s 2.006s 0.901s 10 1.01x
💻 Local Nitro 1.105s (~) 2.006s (~) 0.900s 10 1.01x
💻 Local Express 1.107s (~) 2.004s (~) 0.898s 10 1.01x
🐘 Postgres Express 1.125s (-0.7%) 2.011s (~) 0.886s 10 1.03x
🐘 Postgres Nitro 1.130s (+0.8%) 2.012s (~) 0.882s 10 1.03x
🌐 MongoDB Next.js (Turbopack) 1.315s 2.009s 0.694s 10 1.20x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.002s (-5.3% 🟢) 3.095s (-7.1% 🟢) 1.093s 10 1.00x
▲ Vercel Nitro 2.010s (-11.6% 🟢) 3.222s (-6.2% 🟢) 1.212s 10 1.00x
▲ Vercel Express 2.033s (~) 2.955s (-11.7% 🟢) 0.922s 10 1.02x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.706s 11.022s 0.316s 3 1.00x
💻 Local Next.js (Turbopack) 10.752s 11.023s 0.271s 3 1.00x
💻 Local Nitro 10.826s (~) 11.022s (~) 0.196s 3 1.01x
💻 Local Express 10.857s (~) 11.024s (~) 0.167s 3 1.01x
🐘 Postgres Express 10.887s (~) 11.042s (~) 0.154s 3 1.02x
🐘 Postgres Nitro 10.907s (~) 11.041s (~) 0.134s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 12.304s 13.021s 0.718s 3 1.15x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.271s (-1.6%) 17.336s (-5.4% 🟢) 1.065s 2 1.00x
▲ Vercel Next.js (Turbopack) 16.582s (~) 17.597s (~) 1.015s 2 1.02x
▲ Vercel Nitro 16.790s (+1.5%) 17.975s (+3.0%) 1.185s 2 1.03x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.923s 27.050s 0.126s 3 1.00x
🐘 Postgres Express 27.218s (~) 28.063s (~) 0.845s 3 1.01x
💻 Local Next.js (Turbopack) 27.306s 28.052s 0.745s 3 1.01x
🐘 Postgres Nitro 27.311s (~) 28.066s (~) 0.754s 3 1.01x
💻 Local Nitro 27.507s (~) 28.048s (~) 0.541s 3 1.02x
💻 Local Express 27.574s (~) 28.052s (~) 0.478s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 30.560s 31.044s 0.484s 2 1.14x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 41.800s (-4.0%) 43.338s (-2.4%) 1.539s 2 1.00x
▲ Vercel Express 42.802s (-2.1%) 44.192s (-1.8%) 1.390s 2 1.02x
▲ Vercel Next.js (Turbopack) 44.915s (+4.8%) 46.117s (+2.2%) 1.202s 2 1.07x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 54.428s 55.097s 0.669s 2 1.00x
🐘 Postgres Express 55.018s (~) 55.597s (+0.9%) 0.579s 2 1.01x
🐘 Postgres Nitro 55.185s (~) 56.104s (+1.8%) 0.918s 2 1.01x
💻 Local Next.js (Turbopack) 56.891s 57.099s 0.208s 2 1.05x
💻 Local Nitro 57.356s (~) 58.101s (~) 0.745s 2 1.05x
💻 Local Express 57.504s (~) 58.104s (~) 0.600s 2 1.06x
🌐 MongoDB Next.js (Turbopack) 61.277s 62.084s 0.807s 2 1.13x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 89.975s (-3.1%) 90.930s (-3.6%) 0.955s 1 1.00x
▲ Vercel Nitro 97.200s (+3.8%) 98.344s (+4.3%) 1.144s 1 1.08x
▲ Vercel Next.js (Turbopack) 105.909s (+13.2% 🔺) 107.412s (+14.1% 🔺) 1.503s 1 1.18x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.252s 2.006s 0.754s 15 1.00x
🐘 Postgres Nitro 1.355s (-1.9%) 2.010s (~) 0.656s 15 1.08x
🐘 Postgres Express 1.387s (+2.5%) 2.010s (~) 0.623s 15 1.11x
💻 Local Express 1.402s (-0.9%) 2.005s (~) 0.602s 15 1.12x
💻 Local Nitro 1.405s (-0.7%) 2.005s (~) 0.600s 15 1.12x
💻 Local Next.js (Turbopack) 1.408s 2.005s 0.597s 15 1.12x
🌐 MongoDB Next.js (Turbopack) 2.139s 3.007s 0.868s 10 1.71x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.221s (-9.2% 🟢) 3.144s (-10.4% 🟢) 0.923s 10 1.00x
▲ Vercel Nitro 2.329s (+4.2%) 3.583s (+6.3% 🔺) 1.254s 9 1.05x
▲ Vercel Next.js (Turbopack) 2.460s (-5.6% 🟢) 3.595s (~) 1.135s 9 1.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.001s (+3.0%) 2.514s (+8.3% 🔺) 0.513s 12 1.00x
🐘 Postgres Nitro 2.019s (-2.0%) 2.515s (~) 0.495s 12 1.01x
🌐 Redis Next.js (Turbopack) 2.509s 3.008s 0.499s 10 1.25x
💻 Local Next.js (Turbopack) 2.540s 3.007s 0.467s 10 1.27x
💻 Local Nitro 2.618s (+1.6%) 3.007s (~) 0.388s 10 1.31x
💻 Local Express 2.636s (~) 3.007s (~) 0.372s 10 1.32x
🌐 MongoDB Next.js (Turbopack) 4.790s 5.344s 0.555s 6 2.39x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.801s (-7.6% 🟢) 3.719s (-9.2% 🟢) 0.918s 9 1.00x
▲ Vercel Nitro 3.179s (+21.5% 🔺) 5.107s (+40.8% 🔺) 1.928s 6 1.14x
▲ Vercel Next.js (Turbopack) 3.308s (+23.7% 🔺) 4.369s (+22.9% 🔺) 1.062s 7 1.18x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.621s (+4.8%) 4.321s (+4.2%) 0.701s 7 1.00x
🐘 Postgres Express 3.666s (-7.3% 🟢) 4.306s (-6.3% 🟢) 0.640s 7 1.01x
🌐 Redis Next.js (Turbopack) 4.062s 4.868s 0.806s 7 1.12x
💻 Local Next.js (Turbopack) 7.301s 7.766s 0.464s 4 2.02x
💻 Local Nitro 7.521s (+3.7%) 8.016s (~) 0.495s 4 2.08x
💻 Local Express 7.608s (+0.6%) 8.018s (~) 0.410s 4 2.10x
🌐 MongoDB Next.js (Turbopack) 9.893s 10.352s 0.459s 3 2.73x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.982s (+3.7%) 4.016s (+5.5% 🔺) 1.034s 8 1.00x
▲ Vercel Next.js (Turbopack) 3.016s (+2.6%) 3.974s (-0.7%) 0.957s 8 1.01x
▲ Vercel Nitro 3.544s (+17.0% 🔺) 4.600s (+14.0% 🔺) 1.056s 7 1.19x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.296s 2.006s 0.709s 15 1.00x
🐘 Postgres Express 1.390s (~) 2.011s (~) 0.621s 15 1.07x
🐘 Postgres Nitro 1.395s (+1.7%) 2.011s (~) 0.616s 15 1.08x
💻 Local Next.js (Turbopack) 1.404s 2.005s 0.601s 15 1.08x
💻 Local Express 1.443s (+1.3%) 2.005s (~) 0.563s 15 1.11x
💻 Local Nitro 1.452s (+1.4%) 2.005s (~) 0.553s 15 1.12x
🌐 MongoDB Next.js (Turbopack) 2.154s 3.009s 0.856s 10 1.66x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.232s (-9.4% 🟢) 3.260s (-16.1% 🟢) 1.028s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.282s (-6.1% 🟢) 3.288s (-6.3% 🟢) 1.006s 10 1.02x
▲ Vercel Express 2.386s (+2.1%) 3.463s (-2.5%) 1.077s 9 1.07x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.973s (-0.5%) 2.398s (-4.5%) 0.425s 13 1.00x
🐘 Postgres Nitro 2.076s (+7.2% 🔺) 2.514s (~) 0.438s 12 1.05x
🌐 Redis Next.js (Turbopack) 2.525s 3.008s 0.482s 10 1.28x
💻 Local Next.js (Turbopack) 2.646s 3.008s 0.362s 10 1.34x
💻 Local Nitro 2.683s (-3.4%) 3.008s (~) 0.324s 10 1.36x
💻 Local Express 2.784s (-0.9%) 3.008s (~) 0.224s 10 1.41x
🌐 MongoDB Next.js (Turbopack) 4.706s 5.176s 0.470s 6 2.38x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.969s (+15.7% 🔺) 4.068s (+14.0% 🔺) 1.100s 8 1.00x
▲ Vercel Express 3.081s (-25.3% 🟢) 3.952s (-28.1% 🟢) 0.871s 8 1.04x
▲ Vercel Next.js (Turbopack) 3.368s (+32.8% 🔺) 4.404s (+11.5% 🔺) 1.036s 7 1.13x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.746s (+13.4% 🔺) 4.450s (+14.2% 🔺) 0.704s 7 1.00x
🐘 Postgres Express 3.805s (+11.3% 🔺) 4.451s (+7.1% 🔺) 0.645s 7 1.02x
🌐 Redis Next.js (Turbopack) 4.105s 5.010s 0.905s 6 1.10x
💻 Local Nitro 7.793s (-2.4%) 8.521s (~) 0.728s 4 2.08x
💻 Local Next.js (Turbopack) 7.902s 8.267s 0.365s 4 2.11x
💻 Local Express 8.172s (-3.7%) 8.772s (-2.8%) 0.600s 4 2.18x
🌐 MongoDB Next.js (Turbopack) 9.973s 10.687s 0.714s 3 2.66x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.973s (-11.3% 🟢) 3.936s (-9.8% 🟢) 0.962s 8 1.00x
▲ Vercel Nitro 3.328s (+4.5%) 4.155s (-1.6%) 0.827s 8 1.12x
▲ Vercel Next.js (Turbopack) 3.462s (+5.4% 🔺) 4.491s (+6.6% 🔺) 1.029s 7 1.16x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.144s 1.002s 0.012s 1.017s 0.873s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.150s 1.000s 0.001s 1.007s 0.857s 10 1.04x
💻 Local Nitro 0.172s (+1.8%) 1.003s (~) 0.011s (+1.8%) 1.016s (~) 0.844s 10 1.20x
💻 Local Express 0.177s (+0.7%) 1.002s (~) 0.011s (-1.7%) 1.017s (~) 0.840s 10 1.23x
🐘 Postgres Express 0.191s (+4.8%) 0.997s (~) 0.002s (~) 1.011s (~) 0.821s 10 1.32x
🐘 Postgres Nitro 0.198s (+2.2%) 0.995s (~) 0.001s (-13.3% 🟢) 1.012s (~) 0.813s 10 1.38x
🌐 MongoDB Next.js (Turbopack) 0.494s 0.956s 0.002s 1.009s 0.515s 10 3.43x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.439s (-7.5% 🟢) 1.832s (-12.5% 🟢) 0.145s (-25.7% 🟢) 2.367s (-12.6% 🟢) 0.929s 10 1.00x
▲ Vercel Nitro 1.443s (~) 1.694s (+3.6%) 0.125s (-60.3% 🟢) 2.277s (-5.3% 🟢) 0.834s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.490s (-2.7%) 1.953s (-14.7% 🟢) 0.137s (+17.4% 🔺) 2.562s (-9.1% 🟢) 1.072s 10 1.04x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 1, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 536 0 58 594
✅ 💻 Local Development 572 0 76 648
✅ 📦 Local Production 572 0 76 648
✅ 🐘 Local Postgres 572 0 76 648
✅ 🪟 Windows 51 0 3 54
❌ 🌍 Community Worlds 117 48 15 180
✅ 📋 Other 138 0 24 162
Total 2558 48 328 2934

❌ Failed Tests

🌍 Community Worlds (48 failed)

turso (48 failed):

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

Details by Category

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

📋 View full workflow run

@rovo89
Copy link
Copy Markdown
Contributor

rovo89 commented Mar 2, 2026

@ijjk Thanks! Indeed I can run my workflow now with lazyDiscovery: true. Hard to say anything about performance, but it seems clear that avoiding a separate build step with lots of files should bring down the compile times.

That said, the flag is still unusable for me during development. The dev server doesn't detect changes to an existing step, like adding a console.log() (I started a new workflow run). Even before, I had to restart the dev server when I added new workflows (not sure about steps) - a bit annoying, yet acceptable because I don't add new ones very often. But iterating on existing steps is daily business and requires fast feedback. With lazyDiscovery: false, it works fine.

@ijjk
Copy link
Copy Markdown
Member Author

ijjk commented Mar 2, 2026

Ah that's definitely not ideal, let me see why our HMR tests with lazy aren't catching that and get fix in here for that too

@ijjk
Copy link
Copy Markdown
Member Author

ijjk commented Mar 2, 2026

@rovo89 this PR is updated and HMR should be properly handled was missing some cache invalidation in the loader it seems. If you have a local cache you will need to wipe .next if trying the latest fix via pnpm i workflow@https://workflow-docs-3eep3rlvy.vercel.sh/workflow.tgz

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

LGTM but I'm probably not the best person to approve this

Copy link
Copy Markdown
Contributor

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

this PR is doing more than just e2e changes. let's update PR description for posterity and pls also changeset :)

Comment thread packages/builders/src/module-specifier.ts
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate left a comment

Choose a reason for hiding this comment

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

Overall this is solid work — the core fix (deferred discovery/rebuild outside monorepo) and the tarball-staged test infrastructure are both well-validated by the full green CI suite. A few observations inline, nothing blocking.

Comment thread packages/next/src/builder-deferred.ts
Comment thread packages/next/src/builder-deferred.ts
Comment thread packages/next/src/loader.ts Outdated
Comment thread packages/core/e2e/dev.test.ts Outdated
Comment thread .github/workflows/tests.yml
Comment thread packages/core/e2e/e2e.test.ts
Comment thread packages/next/src/builder-deferred.ts
Comment thread packages/cli/src/base.ts
Comment thread packages/core/e2e/dev.test.ts
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate left a comment

Choose a reason for hiding this comment

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

All previous feedback has been addressed in the two follow-up commits:

  • CI duplication → Extracted into .github/actions/prepare-workbench-path/action.yml composite action. Clean.
  • while (true) polling loops → Replaced with a pollUntil helper that has an explicit deadline and surfaces the last error message on timeout. Much better debuggability.
  • readFileSync in loader → Switched to async readFile from node:fs/promises, with getSocketCredentials and getSocketCredentialsFromFile now properly async.
  • collectTransitiveStepFiles / collectTransitiveSerdeFiles re-validation semantics → Added clear comments explaining the intentional re-validation behavior.
  • getFallbackWorkflowId coupling → Added comment noting the intentional coupling to the SWC transform ID format.
  • flushStream in CLI base → Hardened with additional guards (destroyed, closed, writableEnded, writableFinished) and error handling via stream.once('error', ...) + try/catch. Good defensive improvement.

100/100 CI checks green. LGTM.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants