Skip to content

Fix stream serialization to resolve when user releases lock instead of waiting for stream to close#678

Merged
TooTallNate merged 2 commits intomainfrom
12-20-fix_stream_serialization_to_resolve_when_user_releases_lock_instead_of_waiting_for_stream_to_close
Jan 12, 2026
Merged

Fix stream serialization to resolve when user releases lock instead of waiting for stream to close#678
TooTallNate merged 2 commits intomainfrom
12-20-fix_stream_serialization_to_resolve_when_user_releases_lock_instead_of_waiting_for_stream_to_close

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate commented Dec 22, 2025

Fix stream serialization to resolve when users release locks instead of waiting for streams to close, preventing Vercel functions from hanging.

What changed?

  • Implemented a polling mechanism to detect when stream locks are released
  • Added flushablePipe function that resolves in two scenarios:
    1. When the stream completes normally (close/error)
    2. When the user releases their lock AND all pending writes are flushed
  • Created a state tracking system to monitor pending operations and lock status

How to test?

  1. Create a workflow step that incrementally writes to a stream:

    const writer = stream.getWriter();
    await writer.write(data1);
    writer.releaseLock(); // Step should complete here without waiting
  2. Verify the step completes immediately after lock release rather than hanging

  3. Run the new test cases that verify both lock release and normal stream closure behaviors

Why make this change?

This fixes an issue where Vercel functions would hang when users incrementally write to streams within steps. Previously, the system would wait for the stream to fully close before resolving, but many users follow a pattern where they write data and release the lock without explicitly closing the stream. This change allows steps to complete as soon as the user releases the lock and all pending writes are flushed, which is the expected behavior in most streaming scenarios.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 22, 2025

🦋 Changeset detected

Latest commit: 5cdb799

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

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

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 22, 2025

🧪 E2E Test Results

Some tests failed

Summary

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

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

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

📋 View full workflow run

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Dec 22, 2025

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

Project Deployment Review Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jan 12, 2026 10:45pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jan 12, 2026 10:45pm
example-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-astro-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-express-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-fastify-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-hono-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-nitro-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workbench-vite-workflow Ready Ready Preview, Comment Jan 12, 2026 10:45pm
workflow-docs Ready Ready Preview, Comment Jan 12, 2026 10:45pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 22, 2025

📊 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.032s (-34.1% 🟢) 1.007s (~) 0.976s 10 1.00x
🌐 Starter Next.js (Turbopack) 0.040s (+24.0% 🔺) 1.014s (~) 0.974s 10 1.26x
💻 Local Next.js (Turbopack) 0.040s (-0.5%) 1.020s (~) 0.980s 10 1.26x
🌐 Redis Next.js (Turbopack) 0.040s (+14.8% 🔺) 1.017s (~) 0.977s 10 1.28x
💻 Local Nitro 0.041s (-1.2%) 1.006s (~) 0.965s 10 1.31x
🌐 Turso Next.js (Turbopack) 0.098s (-9.0% 🟢) 1.013s (~) 0.916s 10 3.10x
🌐 MongoDB Next.js (Turbopack) 0.116s (-9.7% 🟢) 1.020s (+0.6%) 0.904s 10 3.68x
🐘 Postgres Next.js (Turbopack) 0.191s (+56.9% 🔺) 1.020s (~) 0.829s 10 6.07x
🐘 Postgres Nitro 0.298s (+16.0% 🔺) 1.012s (-0.7%) 0.714s 10 9.47x
🐘 Postgres Express 0.327s (-12.0% 🟢) 1.013s (~) 0.686s 10 10.39x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.592s (-22.8% 🟢) 1.521s (-14.0% 🟢) 0.929s 10 1.00x
▲ Vercel Nitro 0.606s (-21.1% 🟢) 1.580s (-8.3% 🟢) 0.974s 10 1.02x
▲ Vercel Express 0.643s (-17.0% 🟢) 1.557s (-2.9%) 0.914s 10 1.09x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.074s (-3.5%) 2.008s (~) 0.934s 10 1.00x
🌐 Starter Next.js (Turbopack) 1.090s (+1.7%) 2.010s (~) 0.920s 10 1.01x
💻 Local Next.js (Turbopack) 1.093s (~) 2.014s (~) 0.920s 10 1.02x
🌐 Redis Next.js (Turbopack) 1.100s (+1.3%) 2.013s (~) 0.913s 10 1.02x
💻 Local Nitro 1.111s (~) 2.006s (~) 0.894s 10 1.04x
🌐 Turso Next.js (Turbopack) 1.292s (-1.4%) 2.012s (~) 0.720s 10 1.20x
🌐 MongoDB Next.js (Turbopack) 1.300s (+0.5%) 2.022s (~) 0.721s 10 1.21x
🐘 Postgres Next.js (Turbopack) 1.909s (~) 2.014s (~) 0.104s 10 1.78x
🐘 Postgres Nitro 2.164s (-2.1%) 3.014s (~) 0.850s 10 2.02x
🐘 Postgres Express 2.194s (-0.5%) 3.014s (~) 0.820s 10 2.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.662s (-1.8%) 3.667s (+1.4%) 1.004s 10 1.00x
▲ Vercel Nitro 2.712s (-2.3%) 3.722s (+1.7%) 1.010s 10 1.02x
▲ Vercel Next.js (Turbopack) 2.761s (~) 3.728s (-2.0%) 0.967s 10 1.04x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 10.506s (-2.5%) 11.013s (~) 0.507s 5 1.00x
🌐 Starter Next.js (Turbopack) 10.585s (+1.1%) 11.012s (~) 0.427s 5 1.01x
💻 Local Next.js (Turbopack) 10.606s (~) 11.025s (~) 0.419s 5 1.01x
🌐 Redis Next.js (Turbopack) 10.674s (+1.2%) 11.016s (~) 0.342s 5 1.02x
💻 Local Nitro 10.780s (~) 11.011s (~) 0.230s 5 1.03x
🌐 MongoDB Next.js (Turbopack) 12.048s (-1.5%) 12.638s (-3.0%) 0.590s 5 1.15x
🌐 Turso Next.js (Turbopack) 12.165s (~) 13.026s (~) 0.860s 5 1.16x
🐘 Postgres Next.js (Turbopack) 15.240s (+3.1%) 16.036s (+2.6%) 0.796s 5 1.45x
🐘 Postgres Express 20.311s (~) 21.042s (~) 0.731s 5 1.93x
🐘 Postgres Nitro 20.421s (~) 21.033s (~) 0.612s 5 1.94x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 22.014s (~) 23.014s (+0.6%) 1.001s 5 1.00x
▲ Vercel Next.js (Turbopack) 22.284s (-0.9%) 23.295s (+0.6%) 1.011s 5 1.01x
▲ Vercel Express 22.326s (-3.0%) 23.090s (-2.3%) 0.764s 5 1.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.325s (-5.5% 🟢) 2.006s (~) 0.680s 15 1.00x
🌐 Redis Next.js (Turbopack) 1.344s (+1.8%) 2.009s (~) 0.665s 15 1.01x
🌐 Starter Next.js (Turbopack) 1.350s (+3.5%) 2.008s (~) 0.658s 15 1.02x
💻 Local Next.js (Turbopack) 1.391s (+1.0%) 2.015s (~) 0.624s 15 1.05x
💻 Local Nitro 1.408s (~) 2.006s (~) 0.598s 15 1.06x
🐘 Postgres Next.js (Turbopack) 1.818s (+8.5% 🔺) 2.087s (+3.7%) 0.270s 15 1.37x
🌐 MongoDB Next.js (Turbopack) 2.169s (+1.5%) 3.020s (~) 0.851s 10 1.64x
🐘 Postgres Express 2.208s (-9.3% 🟢) 2.923s (-3.0%) 0.715s 11 1.67x
🌐 Turso Next.js (Turbopack) 2.224s (~) 3.014s (~) 0.791s 10 1.68x
🐘 Postgres Nitro 2.444s (+0.5%) 3.013s (~) 0.569s 10 1.84x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.789s (-6.8% 🟢) 3.804s (+0.6%) 1.014s 8 1.00x
▲ Vercel Express 2.922s (+0.6%) 3.854s (+4.6%) 0.933s 8 1.05x
▲ Vercel Next.js (Turbopack) 2.988s (-0.7%) 3.767s (-2.8%) 0.779s 8 1.07x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.978s (-11.0% 🟢) 2.093s (-33.8% 🟢) 0.115s 15 1.00x
💻 Local Next.js (Turbopack) 2.136s (+0.7%) 3.032s (+2.4%) 0.896s 10 1.08x
💻 Local Nitro 2.210s (-0.7%) 3.166s (~) 0.956s 10 1.12x
🌐 Starter Next.js (Turbopack) 2.469s (+3.9%) 3.011s (~) 0.542s 10 1.25x
🌐 Redis Next.js (Turbopack) 2.473s (+5.6% 🔺) 3.010s (~) 0.537s 10 1.25x
🐘 Postgres Next.js (Turbopack) 2.482s (-3.3%) 3.019s (~) 0.537s 10 1.25x
🐘 Postgres Nitro 2.822s (-7.3% 🟢) 3.017s (-20.2% 🟢) 0.195s 10 1.43x
🐘 Postgres Express 2.885s (+2.2%) 3.238s (+7.2% 🔺) 0.353s 10 1.46x
🌐 Turso Next.js (Turbopack) 4.783s (+1.9%) 5.182s (~) 0.400s 6 2.42x
🌐 MongoDB Next.js (Turbopack) 4.833s (+4.7%) 5.359s (+3.4%) 0.525s 6 2.44x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.099s (-8.6% 🟢) 3.643s (-9.3% 🟢) 0.545s 9 1.00x
▲ Vercel Express 3.980s (+24.7% 🔺) 4.694s (+30.4% 🔺) 0.714s 7 1.28x
▲ Vercel Nitro 4.374s (+18.1% 🔺) 5.201s (+19.9% 🔺) 0.827s 6 1.41x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.334s (-6.1% 🟢) 2.006s (~) 0.672s 15 1.00x
🌐 Redis Next.js (Turbopack) 1.359s (+3.0%) 2.009s (~) 0.651s 15 1.02x
🌐 Starter Next.js (Turbopack) 1.368s (+3.9%) 2.007s (~) 0.640s 15 1.03x
💻 Local Next.js (Turbopack) 1.383s (-1.8%) 2.018s (~) 0.635s 15 1.04x
💻 Local Nitro 1.421s (~) 2.005s (~) 0.585s 15 1.06x
🐘 Postgres Next.js (Turbopack) 1.795s (+2.4%) 2.011s (~) 0.216s 15 1.35x
🐘 Postgres Express 1.796s (-8.4% 🟢) 2.013s (-9.8% 🟢) 0.217s 15 1.35x
🐘 Postgres Nitro 2.094s (+18.2% 🔺) 2.742s (+36.3% 🔺) 0.648s 11 1.57x
🌐 MongoDB Next.js (Turbopack) 2.137s (-0.6%) 3.018s (~) 0.881s 10 1.60x
🌐 Turso Next.js (Turbopack) 2.207s (-0.6%) 3.011s (~) 0.804s 10 1.65x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.775s (~) 3.734s (~) 0.959s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.793s (-0.7%) 3.767s (-1.5%) 0.974s 9 1.01x
▲ Vercel Express 2.904s (-7.6% 🟢) 3.780s (-2.7%) 0.876s 8 1.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 2.057s (-9.0% 🟢) 2.869s (-11.1% 🟢) 0.812s 11 1.00x
💻 Local Next.js (Turbopack) 2.193s (+1.9%) 3.157s (+3.5%) 0.963s 10 1.07x
💻 Local Nitro 2.359s (+7.0% 🔺) 3.222s (+2.0%) 0.863s 10 1.15x
🌐 Starter Next.js (Turbopack) 2.485s (+4.8%) 3.008s (~) 0.524s 10 1.21x
🐘 Postgres Next.js (Turbopack) 2.494s (-2.9%) 3.013s (~) 0.519s 10 1.21x
🐘 Postgres Express 2.499s (-8.5% 🟢) 3.024s (~) 0.525s 10 1.21x
🌐 Redis Next.js (Turbopack) 2.502s (+5.9% 🔺) 3.010s (~) 0.508s 10 1.22x
🐘 Postgres Nitro 2.769s (-3.0%) 3.021s (-3.4%) 0.252s 10 1.35x
🌐 Turso Next.js (Turbopack) 4.748s (+2.7%) 5.185s (~) 0.437s 6 2.31x
🌐 MongoDB Next.js (Turbopack) 4.840s (+4.3%) 5.359s (+3.4%) 0.519s 6 2.35x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.065s (-2.8%) 3.606s (-8.0% 🟢) 0.541s 9 1.00x
▲ Vercel Express 3.209s (-5.5% 🟢) 3.794s (-8.0% 🟢) 0.585s 8 1.05x
▲ Vercel Nitro 3.300s (+4.0%) 4.033s (+5.2% 🔺) 0.733s 8 1.08x

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

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.107s (-38.6% 🟢) 0.998s (+0.6%) 0.013s (-20.3% 🟢) 1.018s (~) 0.911s 10 1.00x
🌐 Starter Next.js (Turbopack) 0.125s (+33.7% 🔺) 1.006s (~) 0.000s (~) 1.012s (~) 0.887s 10 1.17x
💻 Local Next.js (Turbopack) 0.129s (-6.8% 🟢) 1.004s (~) 0.015s (-8.1% 🟢) 1.028s (~) 0.899s 10 1.21x
🌐 Redis Next.js (Turbopack) 0.147s (+26.6% 🔺) 1.005s (~) 0.000s (NaN%) 1.013s (~) 0.866s 10 1.38x
💻 Local Nitro 0.177s (~) 0.992s (~) 0.014s (-4.7%) 1.020s (~) 0.842s 10 1.66x
🌐 MongoDB Next.js (Turbopack) 0.486s (-6.8% 🟢) 0.971s (+4.9%) 0.000s (NaN%) 1.019s (+0.6%) 0.533s 10 4.55x
🌐 Turso Next.js (Turbopack) 0.521s (+5.0% 🔺) 0.934s (-1.7%) 0.000s (NaN%) 1.013s (~) 0.492s 10 4.89x
🐘 Postgres Next.js (Turbopack) 1.077s (+24.3% 🔺) 1.967s (+74.6% 🔺) 0.000s (-100.0% 🟢) 2.015s (+52.6% 🔺) 0.939s 10 10.09x
🐘 Postgres Express 2.296s (-2.9%) 2.741s (+2.3%) 0.000s (NaN%) 3.015s (~) 0.719s 10 21.52x
🐘 Postgres Nitro 2.352s (+7.0% 🔺) 2.689s (-5.5% 🟢) 0.000s (~) 3.014s (~) 0.662s 10 22.04x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.817s (-6.4% 🟢) 3.249s (-3.0%) 0.311s (-34.5% 🟢) 4.049s (-5.7% 🟢) 1.232s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.850s (-5.6% 🟢) 3.238s (-4.7%) 0.613s (+1.4%) 4.311s (-4.4%) 1.461s 10 1.01x
▲ Vercel Express 2.865s (-8.0% 🟢) 3.207s (-5.6% 🟢) 0.429s (-14.3% 🟢) 4.137s (-7.8% 🟢) 1.273s 10 1.02x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

Copy link
Copy Markdown
Member Author

Comment thread packages/core/src/serialization.ts Outdated
state.resolve();
clearInterval(intervalId);
}
}, LOCK_POLL_INTERVAL_MS);
Copy link
Copy Markdown
Contributor

@vercel vercel Bot Jan 9, 2026

Choose a reason for hiding this comment

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

Multiple concurrent polling intervals could be created if pollWritableLock or pollReadableLock are called multiple times with the same state object, leading to race conditions and resource waste.

Fix on Vercel

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.

@TooTallNate wdyt?


/**
* Polls a WritableStream to check if the user has released their lock.
* Resolves the done promise when lock is released and no pending ops remain.
Copy link
Copy Markdown
Contributor

@vercel vercel Bot Jan 9, 2026

Choose a reason for hiding this comment

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

Race condition in flushablePipe: State can be marked as ended between read() and write(), causing a write attempt to a terminated stream

Fix on Vercel

@TooTallNate
Copy link
Copy Markdown
Member Author

@copilot please review the comments on this PR and implement any suggested changes that seem correct / relevant to you

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 9, 2026

@TooTallNate I've opened a new pull request, #761, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

4 participants