Skip to content

[world-local] Cross-process streaming for local dev via polling, enable e2e tests#1739

Merged
VaguelySerious merged 6 commits intomainfrom
peter/enable-tests
Apr 16, 2026
Merged

[world-local] Cross-process streaming for local dev via polling, enable e2e tests#1739
VaguelySerious merged 6 commits intomainfrom
peter/enable-tests

Conversation

@VaguelySerious
Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 15, 2026

🦋 Changeset detected

Latest commit: 65e58e4

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

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

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

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 16, 2026 2:27am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 16, 2026 2:27am
example-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-astro-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-express-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-fastify-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-hono-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-nitro-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workbench-vite-workflow Ready Ready Preview, Comment Apr 16, 2026 2:27am
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 16, 2026 2:27am
workflow-swc-playground Ready Ready Preview, Comment Apr 16, 2026 2:27am
workflow-web Ready Ready Preview, Comment Apr 16, 2026 2:27am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 923 0 67 990
✅ 💻 Local Development 994 0 86 1080
✅ 📦 Local Production 994 0 86 1080
✅ 🐘 Local Postgres 994 0 86 1080
✅ 🪟 Windows 90 0 0 90
❌ 🌍 Community Worlds 133 98 0 231
✅ 📋 Other 252 0 18 270
Total 4380 98 343 4821

❌ Failed Tests

🌍 Community Worlds (98 failed)

mongodb (15 failed):

  • readableStreamWorkflow | wrun_01KPA1PNTKGPKJ3FF0WBW28K70
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KPA1QA17FM4SEZY0SKW9FC96
  • webhookWorkflow | wrun_01KPA1QJGRYEBCPD3X2PZ6MFB2
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getChunks getChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KPA1TGQ31G4E6EX9CKY6YGT1
  • fetchWorkflow | wrun_01KPA1TXR4BXD81K0HPNJWF1VP
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KPA1YQTZZEBEDCBE6M41BCAQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KPA24T523H4ZARVKKN1YX8V0

redis (15 failed):

  • readableStreamWorkflow | wrun_01KPA1PNTKGPKJ3FF0WBW28K70
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KPA1QA17FM4SEZY0SKW9FC96
  • webhookWorkflow | wrun_01KPA1QJGRYEBCPD3X2PZ6MFB2
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getChunks getChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KPA1TGQ31G4E6EX9CKY6YGT1
  • fetchWorkflow | wrun_01KPA1TXR4BXD81K0HPNJWF1VP
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KPA1YQTZZEBEDCBE6M41BCAQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KPA24T523H4ZARVKKN1YX8V0

turso (68 failed):

  • addTenWorkflow | wrun_01KPA1P5KAYE5V8Q7Q1P7SGS4E
  • addTenWorkflow | wrun_01KPA1P5KAYE5V8Q7Q1P7SGS4E
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KPA1QZHPM2FMX4WK248J9VQF
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KPA1PBCWZNJAXS3HC3R0YJ9A
  • promiseRaceWorkflow | wrun_01KPA1PGNCVGK470J4TV10S1BT
  • promiseAnyWorkflow | wrun_01KPA1PJS2YCFHR976JA7GE753
  • importedStepOnlyWorkflow | wrun_01KPA1RA9A9M76BAXVCX85XS16
  • readableStreamWorkflow | wrun_01KPA1PNTKGPKJ3FF0WBW28K70
  • hookWorkflow | wrun_01KPA1PZJ7TDD2T4XBP2FRQ2GK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KPA1QA17FM4SEZY0SKW9FC96
  • webhookWorkflow | wrun_01KPA1QJGRYEBCPD3X2PZ6MFB2
  • sleepingWorkflow | wrun_01KPA1QTX86RSNHS1WT6SF3DAC
  • parallelSleepWorkflow | wrun_01KPA1R71W1N9RARDPVVX76A0N
  • nullByteWorkflow | wrun_01KPA1RA25SF104HREJ8BJ5T3V
  • workflowAndStepMetadataWorkflow | wrun_01KPA1RBZ4R2BHQ1PCHDNG9GQP
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getChunks getChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KPA1TGQ31G4E6EX9CKY6YGT1
  • fetchWorkflow | wrun_01KPA1TXR4BXD81K0HPNJWF1VP
  • promiseRaceStressTestWorkflow | wrun_01KPA1V11K5MDYN2G4EMETF7PT
  • 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 catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KPA1Y4Z4S6SA6ABK1HW4M1KA
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KPA1YQTZZEBEDCBE6M41BCAQ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KPA1ZB0QWFCJX0CAVTBZCW2H
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KPA1ZX549HC0HZ9N5X2D5TMF
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KPA204XZW5JS2V8JG7VCYTST
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KPA209PPG16PR379TBMH9448
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KPA20BKKM4T3FQWVW6J60HWE
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KPA20NF2H2ZBF070C5A6HJ9Y
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KPA212Z6QY9YFJC5MWH4SVYC
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KPA217KPT74R8BBXCT1DW8V2
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KPA21DNTCABVRSCC5Y25E0Q3
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KPA21KM6XR4TM3N20MA6349H
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KPA21SHF100FT0DHZXP04D1Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KPA21ZQ6YQCHWPBAMG8ZPR7N
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KPA225RNQ3DWWKF5DY9HAHM0
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KPA22GQXQ2212VQ5MJ1N2DA6
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KPA22RS52H3V3PAKH2F659BS
  • cancelRun - cancelling a running workflow | wrun_01KPA22YKV5QJ50VGXQNEXJAGV
  • cancelRun via CLI - cancelling a running workflow | wrun_01KPA237F5H8FRBF8BB28AANW2
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KPA23J951BMA0SDYZBGGYYDJ
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KPA245J5JE0XTKE4QNFXJK3Q
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KPA24GECVNPV5088ZCN33E6X
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KPA24PC5Z5TSFHHN913ZPKNB
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KPA24R82MHCHM8NS4V98VJT0
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KPA24T523H4ZARVKKN1YX8V0
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KPA24X3D0MB9S7BS3VSFX45Y

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 83 0 7
✅ example 83 0 7
✅ express 83 0 7
✅ fastify 83 0 7
✅ hono 83 0 7
✅ nextjs-turbopack 88 0 2
✅ nextjs-webpack 88 0 2
✅ nitro 83 0 7
✅ nuxt 83 0 7
✅ sveltekit 83 0 7
✅ vite 83 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 84 0 6
✅ express-stable 84 0 6
✅ fastify-stable 84 0 6
✅ hono-stable 84 0 6
✅ nextjs-turbopack-canary 71 0 19
✅ nextjs-turbopack-stable 90 0 0
✅ nextjs-webpack-canary 71 0 19
✅ nextjs-webpack-stable 90 0 0
✅ nitro-stable 84 0 6
✅ nuxt-stable 84 0 6
✅ sveltekit-stable 84 0 6
✅ vite-stable 84 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 84 0 6
✅ express-stable 84 0 6
✅ fastify-stable 84 0 6
✅ hono-stable 84 0 6
✅ nextjs-turbopack-canary 71 0 19
✅ nextjs-turbopack-stable 90 0 0
✅ nextjs-webpack-canary 71 0 19
✅ nextjs-webpack-stable 90 0 0
✅ nitro-stable 84 0 6
✅ nuxt-stable 84 0 6
✅ sveltekit-stable 84 0 6
✅ vite-stable 84 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 84 0 6
✅ express-stable 84 0 6
✅ fastify-stable 84 0 6
✅ hono-stable 84 0 6
✅ nextjs-turbopack-canary 71 0 19
✅ nextjs-turbopack-stable 90 0 0
✅ nextjs-webpack-canary 71 0 19
✅ nextjs-webpack-stable 90 0 0
✅ nitro-stable 84 0 6
✅ nuxt-stable 84 0 6
✅ sveltekit-stable 84 0 6
✅ vite-stable 84 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 90 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 6 0 0
❌ mongodb 56 15 0
✅ redis-dev 6 0 0
❌ redis 56 15 0
✅ turso-dev 6 0 0
❌ turso 3 68 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 84 0 6
✅ e2e-local-postgres-nest-stable 84 0 6
✅ e2e-local-prod-nest-stable 84 0 6

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 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 🥇 Express 0.041s (+16.6% 🔺) 1.005s (~) 0.964s 10 1.00x
💻 Local Nitro 0.043s (+18.1% 🔺) 1.006s (~) 0.963s 10 1.04x
🐘 Postgres Nitro 0.059s (-2.3%) 1.010s (~) 0.951s 10 1.45x
🐘 Postgres Express 0.133s (+83.3% 🔺) 1.047s (+2.6%) 0.915s 10 3.25x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.204s (-17.7% 🟢) 1.769s (-17.9% 🟢) 1.565s 10 1.00x
▲ Vercel Express 0.214s (-38.7% 🟢) 2.056s (-4.8%) 1.842s 10 1.05x
▲ Vercel Nitro 0.252s (+4.3%) 2.217s (+8.4% 🔺) 1.964s 10 1.23x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.129s (+2.7%) 2.005s (~) 0.877s 10 1.00x
💻 Local Nitro 1.132s (+2.9%) 2.006s (~) 0.874s 10 1.00x
🐘 Postgres Nitro 1.143s (~) 2.009s (~) 0.866s 10 1.01x
🐘 Postgres Express 1.339s (+16.4% 🔺) 2.058s (+2.3%) 0.719s 10 1.19x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.859s (-2.4%) 3.962s (+9.9% 🔺) 2.103s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.896s (+1.1%) 3.662s (+2.0%) 1.766s 10 1.02x
▲ Vercel Nitro 2.028s (-11.2% 🟢) 3.287s (-17.4% 🟢) 1.259s 10 1.09x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 10.868s (~) 11.018s (~) 0.150s 3 1.00x
💻 Local Express 10.913s (+2.4%) 11.022s (~) 0.110s 3 1.00x
💻 Local Nitro 10.955s (+2.9%) 11.024s (~) 0.069s 3 1.01x
🐘 Postgres Express 11.318s (+3.1%) 12.016s (+5.8% 🔺) 0.698s 3 1.04x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.325s (-3.9%) 18.559s (-3.4%) 2.234s 2 1.00x
▲ Vercel Nitro 16.499s (-9.7% 🟢) 18.405s (-10.7% 🟢) 1.906s 2 1.01x
▲ Vercel Next.js (Turbopack) 16.790s (-5.1% 🟢) 18.920s (-3.0%) 2.131s 2 1.03x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 14.539s (~) 15.021s (~) 0.482s 4 1.00x
💻 Local Express 14.976s (+5.2% 🔺) 15.030s (~) 0.054s 4 1.03x
💻 Local Nitro 15.067s (+5.8% 🔺) 16.033s (+6.7% 🔺) 0.966s 4 1.04x
🐘 Postgres Express 15.675s (+7.3% 🔺) 16.023s (+6.6% 🔺) 0.347s 4 1.08x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 29.502s (-7.3% 🟢) 31.032s (-7.9% 🟢) 1.530s 2 1.00x
▲ Vercel Next.js (Turbopack) 30.144s (-8.1% 🟢) 32.338s (-6.6% 🟢) 2.194s 2 1.02x
▲ Vercel Express 30.259s (-8.7% 🟢) 31.779s (-9.7% 🟢) 1.520s 2 1.03x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.981s (~) 14.305s (+2.0%) 0.323s 7 1.00x
🐘 Postgres Express 16.235s (+13.3% 🔺) 16.742s (+11.4% 🔺) 0.506s 6 1.16x
💻 Local Express 16.663s (+11.8% 🔺) 17.030s (+13.3% 🔺) 0.367s 6 1.19x
💻 Local Nitro 16.824s (+12.5% 🔺) 17.032s (+10.9% 🔺) 0.208s 6 1.20x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 47.526s (-12.3% 🟢) 48.863s (-13.4% 🟢) 1.337s 2 1.00x
▲ Vercel Express 50.444s (-4.0%) 51.804s (-4.3%) 1.360s 2 1.06x
▲ Vercel Next.js (Turbopack) 53.499s (-4.6%) 55.385s (-4.0%) 1.886s 2 1.13x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.241s (-4.0%) 2.009s (~) 0.768s 15 1.00x
🐘 Postgres Nitro 1.279s (+1.1%) 2.009s (~) 0.730s 15 1.03x
💻 Local Express 1.537s (+5.3% 🔺) 2.005s (~) 0.469s 15 1.24x
💻 Local Nitro 1.547s (+4.8%) 2.006s (~) 0.458s 15 1.25x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.260s (+4.5%) 3.937s (+6.0% 🔺) 1.677s 8 1.00x
▲ Vercel Nitro 2.502s (-9.9% 🟢) 3.861s (-11.5% 🟢) 1.358s 8 1.11x
▲ Vercel Express 2.591s (~) 4.203s (~) 1.611s 8 1.15x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.334s (~) 3.008s (~) 0.674s 10 1.00x
🐘 Postgres Express 2.564s (+8.9% 🔺) 3.218s (+6.9% 🔺) 0.654s 10 1.10x
💻 Local Nitro 2.942s (+14.9% 🔺) 3.676s (+22.2% 🔺) 0.735s 9 1.26x
💻 Local Express 2.963s (+4.3%) 3.208s (+3.2%) 0.244s 10 1.27x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.497s (~) 3.843s (+0.8%) 1.346s 8 1.00x
▲ Vercel Nitro 2.822s (-1.2%) 4.044s (-11.3% 🟢) 1.221s 8 1.13x
▲ Vercel Next.js (Turbopack) 2.959s (-4.4%) 4.945s (+7.1% 🔺) 1.986s 7 1.19x

🔍 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.467s (~) 4.009s (~) 0.542s 8 1.00x
🐘 Postgres Express 4.462s (+28.2% 🔺) 5.073s (+26.4% 🔺) 0.611s 7 1.29x
💻 Local Nitro 8.254s (+18.8% 🔺) 9.021s (+20.0% 🔺) 0.768s 4 2.38x
💻 Local Express 8.322s (+17.4% 🔺) 9.024s (+12.6% 🔺) 0.701s 4 2.40x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.075s (-11.3% 🟢) 4.610s (-10.5% 🟢) 1.535s 7 1.00x
▲ Vercel Next.js (Turbopack) 3.464s (-12.5% 🟢) 5.441s (-3.6%) 1.977s 6 1.13x
▲ Vercel Express 3.689s (+28.7% 🔺) 5.588s (+27.0% 🔺) 1.898s 6 1.20x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.268s (+0.7%) 2.008s (~) 0.740s 15 1.00x
💻 Local Nitro 1.542s (+1.7%) 2.006s (~) 0.464s 15 1.22x
💻 Local Express 1.544s (+4.9%) 2.006s (~) 0.462s 15 1.22x
🐘 Postgres Express 1.635s (+30.2% 🔺) 2.095s (+4.3%) 0.459s 15 1.29x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.105s (~) 3.961s (+9.3% 🔺) 1.855s 8 1.00x
▲ Vercel Nitro 2.132s (-13.1% 🟢) 3.699s (-8.9% 🟢) 1.567s 9 1.01x
▲ Vercel Next.js (Turbopack) 2.208s (-0.6%) 3.765s (-1.4%) 1.557s 9 1.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.301s (-1.3%) 3.008s (~) 0.707s 10 1.00x
🐘 Postgres Express 2.471s (+5.8% 🔺) 3.027s (+0.6%) 0.556s 10 1.07x
💻 Local Express 2.967s (+10.0% 🔺) 3.676s (+22.2% 🔺) 0.709s 9 1.29x
💻 Local Nitro 3.131s (+13.2% 🔺) 4.010s (+29.0% 🔺) 0.879s 8 1.36x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.623s (-8.2% 🟢) 4.164s (-4.0%) 1.540s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.848s (-12.2% 🟢) 4.742s (-3.1%) 1.894s 8 1.09x
▲ Vercel Nitro 2.858s (-19.6% 🟢) 4.213s (-21.3% 🟢) 1.355s 8 1.09x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.478s (~) 4.010s (~) 0.532s 8 1.00x
🐘 Postgres Express 3.696s (+6.2% 🔺) 4.070s (+1.4%) 0.374s 8 1.06x
💻 Local Nitro 8.947s (+20.1% 🔺) 9.774s (+21.9% 🔺) 0.827s 4 2.57x
💻 Local Express 8.969s (+17.3% 🔺) 9.524s (+18.8% 🔺) 0.555s 4 2.58x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.578s (-36.2% 🟢) 3.989s (-34.2% 🟢) 1.411s 8 1.00x
▲ Vercel Express 3.387s (-24.8% 🟢) 5.260s (-12.6% 🟢) 1.873s 6 1.31x
▲ Vercel Next.js (Turbopack) 3.418s (-19.2% 🟢) 5.125s (-10.8% 🟢) 1.707s 7 1.33x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.793s (-2.8%) 1.006s (-1.6%) 0.213s 60 1.00x
💻 Local Express 1.001s (+40.6% 🔺) 1.338s (+31.1% 🔺) 0.338s 45 1.26x
💻 Local Nitro 1.001s (+43.9% 🔺) 1.434s (+42.7% 🔺) 0.433s 42 1.26x
🐘 Postgres Express 1.051s (+24.3% 🔺) 1.430s (+39.8% 🔺) 0.379s 42 1.33x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 8.644s (-4.2%) 10.207s (-7.7% 🟢) 1.563s 6 1.00x
▲ Vercel Next.js (Turbopack) 8.816s (-27.7% 🟢) 10.510s (-26.0% 🟢) 1.695s 6 1.02x
▲ Vercel Express 9.321s (-3.7%) 11.432s (~) 2.110s 6 1.08x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.867s (-3.3%) 2.053s (-2.3%) 0.186s 44 1.00x
🐘 Postgres Express 2.444s (+17.3% 🔺) 2.832s (-3.8%) 0.388s 32 1.31x
💻 Local Nitro 3.040s (+34.5% 🔺) 3.843s (+27.8% 🔺) 0.804s 24 1.63x
💻 Local Express 3.070s (+35.9% 🔺) 3.923s (+30.4% 🔺) 0.853s 23 1.64x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 28.262s (-7.3% 🟢) 30.127s (-6.8% 🟢) 1.865s 3 1.00x
▲ Vercel Express 29.211s (-3.8%) 31.264s (-3.5%) 2.052s 3 1.03x
▲ Vercel Nitro 29.957s (-0.6%) 31.075s (-4.2%) 1.118s 3 1.06x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.862s (~) 4.075s (-0.8%) 0.214s 30 1.00x
🐘 Postgres Express 5.987s (+45.3% 🔺) 6.458s (+32.0% 🔺) 0.471s 19 1.55x
💻 Local Express 9.184s (+25.4% 🔺) 9.864s (+23.1% 🔺) 0.680s 13 2.38x
💻 Local Nitro 9.378s (+27.5% 🔺) 9.941s (+24.0% 🔺) 0.564s 13 2.43x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 73.701s (-37.8% 🟢) 75.280s (-37.5% 🟢) 1.580s 2 1.00x
▲ Vercel Next.js (Turbopack) 76.649s (-7.2% 🟢) 78.535s (-6.9% 🟢) 1.886s 2 1.04x
▲ Vercel Express 79.293s (-39.5% 🟢) 81.837s (-38.6% 🟢) 2.544s 2 1.08x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.283s (-1.4%) 1.007s (~) 0.723s 60 1.00x
🐘 Postgres Express 0.508s (+78.4% 🔺) 1.124s (+11.6% 🔺) 0.616s 54 1.79x
💻 Local Express 0.588s (-1.6%) 1.004s (-1.6%) 0.416s 60 2.08x
💻 Local Nitro 0.591s (+4.3%) 1.005s (~) 0.414s 60 2.09x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.371s (-21.8% 🟢) 2.771s (-20.8% 🟢) 1.400s 22 1.00x
▲ Vercel Express 1.534s (-4.4%) 3.059s (-6.9% 🟢) 1.525s 20 1.12x
▲ Vercel Next.js (Turbopack) 1.723s (+2.3%) 3.220s (-1.7%) 1.497s 19 1.26x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.487s (-3.5%) 1.006s (~) 0.519s 90 1.00x
🐘 Postgres Express 0.648s (+31.0% 🔺) 1.177s (+16.9% 🔺) 0.530s 77 1.33x
💻 Local Nitro 2.527s (+3.9%) 3.009s (~) 0.482s 30 5.19x
💻 Local Express 2.564s (+4.1%) 3.009s (~) 0.445s 30 5.26x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.550s (-6.6% 🟢) 3.921s (-11.8% 🟢) 1.371s 23 1.00x
▲ Vercel Express 2.763s (+2.2%) 4.450s (+5.3% 🔺) 1.687s 21 1.08x
▲ Vercel Next.js (Turbopack) 3.693s (+12.8% 🔺) 5.248s (+8.2% 🔺) 1.554s 18 1.45x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.777s (-3.1%) 1.016s (+0.7%) 0.239s 119 1.00x
🐘 Postgres Express 1.181s (+45.5% 🔺) 1.631s (+60.4% 🔺) 0.450s 74 1.52x
💻 Local Express 11.114s (+5.0%) 11.849s (+7.5% 🔺) 0.735s 11 14.30x
💻 Local Nitro 11.372s (+10.2% 🔺) 12.028s (+10.0% 🔺) 0.656s 10 14.63x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 7.100s (+4.7%) 8.518s (-1.1%) 1.418s 15 1.00x
▲ Vercel Express 7.800s (+12.7% 🔺) 9.600s (+8.9% 🔺) 1.800s 13 1.10x
▲ Vercel Next.js (Turbopack) 43.251s (+565.6% 🔺) 44.690s (+433.2% 🔺) 1.439s 6 6.09x

🔍 Observability: Nitro | Express | 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 🥇 Express 0.201s (+42.7% 🔺) 1.004s (~) 0.012s (+28.7% 🔺) 1.018s (~) 0.817s 10 1.00x
🐘 Postgres Nitro 0.210s (-1.8%) 0.993s (~) 0.001s (-15.4% 🟢) 1.009s (~) 0.799s 10 1.05x
💻 Local Nitro 0.214s (+50.7% 🔺) 1.004s (~) 0.013s (+31.0% 🔺) 1.019s (~) 0.805s 10 1.06x
🐘 Postgres Express 0.239s (+11.0% 🔺) 0.999s (~) 0.078s (+4781.3% 🔺) 1.089s (+7.8% 🔺) 0.850s 10 1.19x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.368s (-12.2% 🟢) 2.257s (-21.0% 🟢) 1.306s (+33.6% 🔺) 3.942s (-7.8% 🟢) 2.574s 10 1.00x
▲ Vercel Express 1.426s (+1.3%) 2.595s (~) 1.055s (+8.5% 🔺) 4.096s (+3.0%) 2.670s 10 1.04x
▲ Vercel Next.js (Turbopack) 1.457s (-2.2%) 3.053s (+0.7%) 0.932s (+17.0% 🔺) 4.430s (+4.3%) 2.973s 10 1.07x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.589s (-4.8%) 1.004s (~) 0.004s (-4.3%) 1.021s (~) 0.432s 59 1.00x
💻 Local Express 0.838s (+25.6% 🔺) 1.011s (~) 0.010s (+6.7% 🔺) 1.115s (~) 0.277s 54 1.42x
💻 Local Nitro 0.846s (+46.4% 🔺) 1.012s (~) 0.010s (+1.4%) 1.116s (+9.2% 🔺) 0.271s 54 1.44x
🐘 Postgres Express 0.965s (+50.5% 🔺) 1.401s (+39.3% 🔺) 0.118s (+2732.6% 🔺) 1.543s (+50.6% 🔺) 0.578s 40 1.64x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.873s (-9.5% 🟢) 5.220s (-10.5% 🟢) 0.271s (-22.5% 🟢) 5.959s (-9.9% 🟢) 2.086s 11 1.00x
▲ Vercel Next.js (Turbopack) 3.968s (-5.8% 🟢) 5.712s (-5.9% 🟢) 0.213s (-39.4% 🟢) 6.372s (-6.8% 🟢) 2.404s 10 1.02x
▲ Vercel Express 4.394s (+5.3% 🔺) 6.508s (+5.1% 🔺) 0.251s (-41.9% 🟢) 7.270s (+3.3%) 2.876s 9 1.13x

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

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.945s (-3.5%) 1.124s (-11.9% 🟢) 0.000s (-100.0% 🟢) 1.146s (-12.3% 🟢) 0.201s 53 1.00x
💻 Local Express 1.222s (+3.6%) 2.020s (~) 0.000s (-22.2% 🟢) 2.022s (~) 0.799s 30 1.29x
💻 Local Nitro 1.245s (+5.5% 🔺) 2.021s (~) 0.000s (+10.0% 🔺) 2.023s (~) 0.777s 30 1.32x
🐘 Postgres Express 2.217s (+126.3% 🔺) 2.865s (+139.2% 🔺) 0.000s (+138.1% 🔺) 2.953s (+142.7% 🔺) 0.736s 21 2.35x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.748s (-18.4% 🟢) 3.975s (-11.5% 🟢) 0.000s (-100.0% 🟢) 4.676s (-4.0%) 1.928s 13 1.00x
▲ Vercel Next.js (Turbopack) 3.087s (-6.0% 🟢) 4.430s (-2.2%) 0.000s (-93.8% 🟢) 4.942s (-1.5%) 1.855s 13 1.12x
▲ Vercel Nitro 3.424s (+21.6% 🔺) 4.431s (+5.1% 🔺) 0.000s (+Infinity% 🔺) 4.912s (+5.9% 🔺) 1.488s 13 1.25x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.760s (+1.2%) 2.097s (-2.0%) 0.000s (-100.0% 🟢) 2.113s (-1.9%) 0.352s 29 1.00x
🐘 Postgres Express 3.379s (+91.3% 🔺) 3.799s (+77.6% 🔺) 0.000s (-100.0% 🟢) 3.846s (+79.0% 🔺) 0.467s 16 1.92x
💻 Local Express 3.590s (+2.3%) 4.101s (+1.7%) 0.000s (+33.3% 🔺) 4.103s (+1.7%) 0.513s 15 2.04x
💻 Local Nitro 3.605s (-4.1%) 4.164s (~) 0.000s (-60.0% 🟢) 4.167s (~) 0.563s 15 2.05x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.638s (-8.5% 🟢) 4.955s (-4.2%) 0.001s (+144.4% 🔺) 5.376s (-4.7%) 1.737s 12 1.00x
▲ Vercel Nitro 3.803s (-10.4% 🟢) 5.005s (-11.0% 🟢) 0.000s (+233.3% 🔺) 5.423s (-10.2% 🟢) 1.620s 12 1.05x
▲ Vercel Next.js (Turbopack) 4.503s (+4.5%) 5.938s (+4.8%) 0.000s (+200.0% 🔺) 6.398s (+5.2% 🔺) 1.895s 10 1.24x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 15/21
🐘 Postgres Nitro 20/21
▲ Vercel Nitro 11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 9/21
Next.js (Turbopack) ▲ Vercel 21/21
Nitro 🐘 Postgres 17/21
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

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
… handling, add test

- Add deliveredChunkIds.has() guard in chunkListener to prevent duplicate
  delivery when both EventEmitter and polling are active
- Narrow empty catch {} to only ignore filesystem errors, surface unexpected
  errors via console.error
- Add unit test for cross-process polling path (bypasses EventEmitter)

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Review: Cross-process streaming via filesystem polling

Clean implementation. The approach is correct — the EventEmitter only works in-process, so polling the shared filesystem at 100ms is the right fallback for the cross-process case (test runner ↔ workbench app).

What looks good

  • Deduplication is correct: deliveredChunkIds guards both the EventEmitter path and the polling path. The has() + add() are synchronous operations in the same tick, so there's no race between the two delivery mechanisms.

  • Ordering is correct: Chunk files use ULID names which are lexicographically sorted (monotonic). listChunkFilesForStream sorts them, so polling delivers in chronological order.

  • Cleanup is thorough: pollInterval is cleared in all exit paths — closeListener (EventEmitter close), cancel() (reader cancels), and inside the poll callback itself (EOF detected). isComplete and pendingClose both return before polling is set up, so no leaked intervals.

  • isPolling guard: Prevents overlapping polls if a poll callback takes longer than 100ms (slow filesystem).

  • Pre-startIndex tracking: Chunks before startIndex are added to deliveredChunkIds so polling doesn't re-deliver them.

  • Error handling: Filesystem errors (ENOENT, EACCES) are silently ignored (transient), non-filesystem errors are surfaced via console.error.

  • Test coverage: Unit test directly exercises the cross-process path by writing chunk files to disk (bypassing the EventEmitter), and all previously-skipped e2e stream tests are now enabled.

One nit (non-blocking)

See inline comment about controller.enqueue() on a potentially-closed controller inside the polling callback.

}
return;
}

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.

Nit: If the closeListener fires and closes the controller while a poll iteration is in-flight (between the deliveredChunkIds.add() and this controller.enqueue()), this will throw a TypeError ("enqueue on a closed controller"). The outer catch would log it via console.error since TypeError doesn't have a code property — slightly noisy but not harmful.

Could be silenced by adding a let streamClosed = false flag set in the close paths, checked here. But for a local dev tool this is fine as-is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(AI) Good catch — added a streamClosed flag that's set in all close paths (closeListener, EOF in polling, isComplete, pendingClose) and checked before controller.enqueue() in the polling callback. This prevents the noisy console.error when closeListener races with an in-flight poll iteration.

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants