Repository navigation
fix(tasks): bound GitLab all-projects fan-out to avoid runtime queue overflow - #30157
Conversation
…overflow The GitLab Tasks list started one listIssues/listMRs runtime RPC per selected repo at once. With 150+ projects this, combined with other callers on the same selector, overflowed the runtime RPC call queue and surfaced "Remote runtime call queue is full". Fetch per-repo lists through mapSettledWithConcurrency with a limit of 6 (below the queue's foreground concurrency of 8), and stop starting new calls once the selection goes stale. Fixes stablyai#30133
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
ELI5
When "All projects" is selected on the GitLab Tasks page, Orca used to ask the runtime for every project's issues/MRs at the same instant. With ~150+ projects that flood (plus other UI asking at the same time) overflowed the runtime's call queue and the page showed "Remote runtime call queue is full". Now it asks a few projects at a time.
What Changed
useTaskPageGitLabLoadingstarted onegitlab.listIssues/gitlab.listMRsruntime RPC per selected repo simultaneously (Promise.allSettled(eligibleRepos.map(fetchItems))). The runtime RPC queue runs 8 foreground calls and holds at most 256 queued calls per selector, then rejects. A large selection on its own stays under 256 (166 repos in the report), but combined with other callers on the same selector (e.g. the sidebar) it overflows and surfaces "Remote runtime call queue is full".mapSettledWithConcurrencyhelper withGITLAB_TASK_FETCH_CONCURRENCY = 6(below the queue's foreground concurrency of 8, leaving headroom for other callers). Results are still merged, sorted and error-handled exactly as before.runtime-rpc-call-queue.tssemantics are unchanged.Why
The overflow comes from the renderer fanning out unboundedly, not from the queue limits themselves; raising the queue limits would only move the cliff. Bounding the fan-out with the helper the codebase already uses for large RPC collections is the smallest fix and keeps the queue's back-pressure meaningful.
Linked Issue
Fixes #30133
Visual Proof
N/A — no visual or interaction change beyond the error no longer appearing. I could not reproduce 150+ GitLab projects end-to-end locally, so the behavior is proven with unit tests that assert the in-flight RPC bound and the stale-selection short-circuit.
Testing
Added two regression tests to
use-task-page-gitlab-loading.test.tsx:callRuntimeRpcequals the limit (was 20 before the fix), and all 20 repos' items are merged.Both tests fail on
mainand pass with this change.pnpm lintandpnpm typecheckpass locally (macOS). Related vitest subset (task-page / gitlab / map-with-concurrency: 106 files, 1049 tests) passes. The fullpnpm testfailures on my machine (zsh shell-startup / cross-version e2e / packaged CLI / sqlite) reproduce onmainand are unrelated to this change.pnpm buildnot run.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Written with Claude Code (model:
claude-opus-5-5). I reviewed the root cause, the diff, and the test output myself.Review
AI review summary: cross-platform — renderer-only change, no path/shell/OS code; SSH/remote/local — reduces load on remote runtime selectors, local behavior unchanged; agents/integrations — GitLab Tasks list only; performance — caps concurrent per-repo calls at 6, so very large selections take slightly longer overall but no longer fail; UI — no visual change; security — no new inputs or permissions.
Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (lint/typecheck pass; full test has pre-existing env failures that reproduce onmain; build not run)