⏳ fix: Honor Workspace Queue Budgets Per Request - #265
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84a6d07b0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
LibreChat advertises how long one workspace-tool HTTP request can safely wait for admission. The Code API router previously derived its queue deadline from the execution timeout, which could outlive the caller's HTTP attempt and leave an ambiguous command result. A very short queue allowance could also expire before the store entered its admission queue, returning an ambiguous assignment error even though execution never started.
X-LibreChat-Workspace-Queue-Wait-Msas the per-request admission allowance, bounded by five minutes and any configured server queue ceiling.WORKSPACE_QUEUE_TIMEOUTonly before assignment enqueue is attempted. Preserve ambiguous errors after enqueue may have begun.POST /workspace-tools/execute→ validate request and allowance → read worker registration → enter admission queue → acquire workspace slot → enqueue assignment → settle and deliver result. Only the pre-enqueue segment can be reported as definitely not started.This is the Code API counterpart to LibreChat #16421. Longer LibreChat request budgets should remain disabled until this change is deployed and the complete ingress path passes a timed canary.
Change Type
Testing
cd service && bun test src/workspace-tools/router.test.ts src/bridge/worker-admission.test.ts src/bridge/concurrent-worker.test.ts— 81 passed.cd service && bunx eslint src/bridge/worker-admission.test.ts src/workspace-tools/router.ts src/workspace-tools/router.test.ts— passed.store.tshas unrelated baseline lint diagnostics; no lint errors were reported on the added lines.cd service && bunx tsc --noEmit— reports errors outside the changed files inroot-access.ts,egress-gateway.ts,egress-grant.ts,sandbox-backend/index.test.ts, andservice/replay-state.ts; no router/store diagnostics.git diff --check— passed.Test Configuration
Checklist