fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals#1307
Conversation
…-enqueue signals The local queue used HTTP 503 (Service Unavailable) as an internal signal for re-enqueueing after a timeout delay. This is misleading since 503 is an error status, causing confusion when inspecting logs or network traffic. Changed to return 200 with timeoutSeconds in the body, and updated the consumer to detect the re-enqueue signal from the response body instead of the status code.
🦋 Changeset detectedLatest commit: 6cf7b19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 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 |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (56 failed)mongodb (3 failed):
redis (2 failed):
turso (51 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
There was a problem hiding this comment.
Pull request overview
This PR updates the world-local queue retry/re-enqueue signaling to use an HTTP 200 response (with a timeoutSeconds field in the body) instead of HTTP 503, aligning local behavior with the “successful response” handling used elsewhere and reducing confusion in logs/traffic inspection.
Changes:
- Switch local queue timeout re-enqueue responses from HTTP
503to HTTP200. - Update the local queue client logic to detect
timeoutSecondson2xxresponses. - Add a changeset bumping
@workflow/world-localwith a patch release note.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/world-local/src/queue.ts | Adjusts timeout re-enqueue signaling to use 200 responses and updates consumer parsing logic accordingly. |
| .changeset/fix-local-queue-timeout-status.md | Adds a patch changeset documenting the behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…ests Address review feedback: timeoutSeconds === 0 should trigger an immediate re-enqueue without delay, not be treated as a normal success. Also adds test coverage for the handler response codes and re-enqueue behavior.
…ignal * origin/main: (26 commits) Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330) Version Packages (beta) (#1325) [web-shared] Improve workflow observability event list UX (#1337) feat: add `exists` getter to `Run` class (#1336) Support client-side tools in DurableAgent (#1329) [world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334) Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326) [web] Polish loading indicators (#1327) Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328) feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317) Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation [web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322) Version Packages (beta) (#1306) Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319) fix(web): move react-router deps to devDependencies (#1265) fix(ai): use workspace:* for workflow peer dependency (#1320) fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318) fix: surface 429 rate-limit errors in e2e tests and CLI (#1309) fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307) [web-shared] [cli] Refactor observability data fetching (#1261) ... # Conflicts: # packages/core/e2e/e2e.test.ts # packages/web-shared/src/components/sidebar/attribute-panel.tsx # workbench/example/workflows/99_e2e.ts
Summary
503(Service Unavailable) to HTTP200, matching how the VQS client handles successful responsestimeoutSecondsfrom the response body on2xxresponses instead of checking for status503503status was misleading — it's not an error but normal workflow operation signaling the queue to re-enqueue after a delay. This caused confusion when inspecting logs/network traffic (especially for LLMs analyzing output).