Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe runtime refresh scheduler now uses bounded queues with FIFO admission, foreground prioritization, request coalescing, desired-environment filtering, failure recovery, and shutdown cleanup. Worktree and environment refreshes use separate concurrency defaults. The scheduler exposes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f5a290d to
6fbd59b
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Rebased onto current The bug: I first tried making the reservation dynamic (hold a lane only while the prioritized host has work pending). That was wrong and the existing The fix is the cap, not the reservation: default concurrency 2 → 3. One reserved foreground lane plus two real background lanes, matching the documented intent. Peak fanout is still bounded (3 hosts), versus the unbounded N×~7 on Two new tests, both verified non-vacuous (they fail at cap=2, pass at cap=3):
The five existing tests that assert reservation semantics now pin Also carried across #14728's test split: the reprioritize test moved to Verified: 739 tests pass across |
Bound cross-host runtime project refreshes behind a scheduler with a reserved lane for the foreground workspace, so N remote hosts no longer fan out N x ~7 concurrent RPCs on startup and reconnect. Sets the cap to 3 rather than 2: the reserved foreground slot is never lent out, so a cap of 2 left exactly one background lane and serialized host discovery. Tests that assert reservation semantics pin the cap explicitly. Lease tests moved to a focused file after #14728 split useIpcEvents.test.ts.
6fbd59b to
ce9b6a4
Compare
|
Closing: conflicts with main, which deliberately raised connect concurrency to 15. The cap delays background hosts' data with no measured win. |
Summary
ELI5
Before, every remote Orca server could open five project-scanning lanes at the same time. Adding more saved hosts added more lanes, so ten hosts could produce up to fifty concurrent worktree scans from this path. That matches the observation that deleting remote hosts made the slowdown disappear.
Now all remote servers share one traffic controller. At most two hosts refresh at once, so this path tops out at ten worktree scans, and one host slot stays available for the workspace currently on screen. Repeated notifications from the same host collapse into one refresh instead of cutting the line repeatedly.
Scope
This caps the runtime client event, reconnect, and reachability project-refresh path. It does not claim to cap every all-host loader in the app. There are no RPC or remote wire changes.
Correctness notes
Validation
Triage review (2026-08-15)
Status: MERGEABLE / clean, all checks green. Held pending owner decision.
Lane math correction
An earlier revision made the foreground reservation dynamic (hold a lane only while the prioritized host has pending work). The existing
reclassifies the old foreground before admitting more background worktest correctly rejected it: if the foreground switches before the new host requests, background fills both lanes and the foreground then queues behind an un-preemptable refresh — exactly what the reservation exists to prevent.The shipped fix instead raises the cap from 2 to 3. A cap of 2 left exactly one background lane once the reserved slot was subtracted, which serialized host discovery entirely.
Residual risk
Workspaces with a large number of saved remote hosts will see background worktree lists settle more slowly than today. No correctness impact; foreground latency improves.