Skip to content

Backport #4049: [world-vercel] Bound the queue client's requests - #4061

Merged
VaguelySerious merged 1 commit into
stablefrom
backport/pr-4049-to-stable
Sep 9, 2026
Merged

VaguelySerious merged 1 commit into
stablefrom
backport/pr-4049-to-stable

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Automated backport of #4049 to stable (backport job run).

AI recommendation: This is a hang/resource-exhaustion fix on a code path that exists on stable (packages/world-vercel/src/http-client.ts has getQueueDispatcher there): the queue client shares the 8-connection control-plane pool, and because undici only arms headersTimeout once a request reaches a socket, the k-th queued acknowledgement settles at ceil(k/8) x timeout, holding invocations until the platform kills them and feeding a redelivery loop. stable already sets an explicit 30s headersTimeout, so it avoids the 300s floor but not the unbounded pool-queue wait, which is the substantive defect this fixes (patch changeset). The two new env vars are tuning knobs for the fix rather than standalone feature work, and the docs hunk targets docs/content/, which is maintained on stable (though the v5 configuration/ page is absent there and may need adjusting).

Merge conflicts were resolved by AI (opencode with anthropic/claude-opus-5). Please review the conflict resolution carefully before merging.

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

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b5a6ba3

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

This PR includes changesets to release 17 packages
Name Type
@workflow/world-vercel Patch
@workflow/cli Patch
@workflow/core Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared 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

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Your Vercel team Vercel Labs is not permitted to deploy from this git repository. Contact an administrator to add github organization vercel as a Protected Git Scope in Vercel Labs on Vercel. Once added, commit again to see your changes.

Learn more: https://vercel.com/docs/security/protected-git-scopes

@vercel

vercel Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
workflow-docs Ready Ready Preview, v0 Sep 9, 2026 7:18pm UTC

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🧪 E2E Test Results

❌ Some tests failed

Summary

Passed Failed Skipped Total
✅ 💻 Local Development 1198 0 86 1284
✅ 📦 Local Production 1198 0 86 1284
✅ 🐘 Local Postgres 1198 0 86 1284
✅ 🪟 Windows 107 0 0 107
❌ 🌍 Community Worlds 82 106 9 197
✅ 📋 Other 606 0 36 642
Total 4389 106 303 4798

❌ Failed Tests

🌍 Community Worlds (106 failed)

redis (21 failed):

  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race
  • sleepingWorkflow
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • error handling serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500

turso (85 failed):

  • addTenWorkflow
  • addTenWorkflow
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race
  • sleepingWorkflow
  • parallelSleepWorkflow
  • sleepWinsRaceWorkflow
  • stepWinsRaceWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • writableForwardedFromWorkflowWorkflow
  • writableForwardedFromStepWorkflow
  • 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 catchability FatalError can be caught and detected with FatalError.is()
  • error handling serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • 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
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run
  • 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
  • health check (CLI) - workflow health command reports healthy endpoints
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • hookWithSleepFinalStepWorkflow - step only on final payload
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)
  • importMetaUrlWorkflow - import.meta.url is available in step bundles
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577)
  • resilient start: addTenWorkflow completes when run_created returns 500

Details by Category

✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 107 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 4 0 3
✅ redis-dev 4 0 3
❌ redis 67 21 0
✅ turso-dev 4 0 3
❌ turso 3 85 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 101 0 6
✅ e2e-local-dev-tanstack-start-stable 101 0 6
✅ e2e-local-postgres-nest-stable 101 0 6
✅ e2e-local-postgres-tanstack-start-stable 101 0 6
✅ e2e-local-prod-nest-stable 101 0 6
✅ e2e-local-prod-tanstack-start-stable 101 0 6

📋 View full workflow run


❌ Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@VaguelySerious
VaguelySerious merged commit 5f2fb36 into stable Sep 9, 2026
69 of 101 checks passed
@VaguelySerious
VaguelySerious deleted the backport/pr-4049-to-stable branch September 9, 2026 19:46

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — b5a6ba33 Deployed Sep 9, 2026 by vercel[bot]
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.

1 participant