[world-vercel] Fix stream read hang from hold-back buffer#1781
[world-vercel] Fix stream read hang from hold-back buffer#1781VaguelySerious wants to merge 1 commit into
Conversation
The hold-back buffer inside the ReadableStream pull loop hangs in production — the for(;;) loop reads multiple chunks without yielding, and something about the proxy/byte-stream wrapper environment causes the consumer to never receive data. Replace with full-response read via arrayBuffer(), strip the control frame, reconnect if needed, then return a ReadableStream with the collected data. This is simpler and avoids the nested-stream issue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 77c6d7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
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 |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (9 failed)example (1 failed):
express (1 failed):
hono (1 failed):
nextjs-webpack (1 failed):
nitro (2 failed):
nuxt (1 failed):
sveltekit (1 failed):
vite (1 failed):
🌍 Community Worlds (98 failed)mongodb (15 failed):
redis (15 failed):
turso (68 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
📊 Benchmark Results
workflow with no steps💻 Local Development
workflow with 1 step💻 Local Development
workflow with 10 sequential steps💻 Local Development
workflow with 25 sequential steps💻 Local Development
workflow with 50 sequential steps💻 Local Development
Promise.all with 10 concurrent steps💻 Local Development
Promise.all with 25 concurrent steps💻 Local Development
Promise.all with 50 concurrent steps💻 Local Development
Promise.race with 10 concurrent steps💻 Local Development
Promise.race with 25 concurrent steps💻 Local Development
Promise.race with 50 concurrent steps💻 Local Development
workflow with 10 sequential data payload steps (10KB)💻 Local Development
workflow with 25 sequential data payload steps (10KB)💻 Local Development
workflow with 50 sequential data payload steps (10KB)💻 Local Development
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
stream pipeline with 5 transform steps (1MB)💻 Local Development
10 parallel streams (1MB each)💻 Local Development
fan-out fan-in 10 streams (1MB each)💻 Local Development
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
Check the workflow run for details. |
Summary
Fixes the production hang introduced by #1742. The hold-back buffer inside the ReadableStream
pullloop caused all Vercel Prod e2e tests to fail with timeouts — thereadableStreamWorkflowtest hung for 30s getting empty content, which cascaded into random subsequent test timeouts.for(;;)hold-back buffer insidepullwith a full-response read viaarrayBuffer()concatUint8Arrayshelperget()callsarrayBuffer())Test plan
🤖 Generated with Claude Code