[rush-daemon] Add request scheduler foundation - #5921
Open
Mo Jazayeri (mojaza) wants to merge 2 commits into
Open
[rush-daemon] Add request scheduler foundation#5921Mo Jazayeri (mojaza) wants to merge 2 commits into
Mo Jazayeri (mojaza) wants to merge 2 commits into
Conversation
Introduce the rush-daemon package with fair shared and exclusive request admission, cancellation, timeouts, and queue position reporting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sean Larkin (TheLarkInn)
approved these changes
Aug 14, 2026
Sean Larkin (TheLarkInn)
left a comment
Member
There was a problem hiding this comment.
🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢 🚢
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #5897 requires daemon requests to queue instead of failing when another Rush command is active. This PR introduces the initial
@rushstack/rush-daemonpackage and its request admission scheduler as an independently reviewable foundation for that workstream.Details
The scheduler defines
SHARED-BUILD,SHARED-READ, andEXCLUSIVEcompatibility classes. Requests in the same shared class can run concurrently, incompatible classes serialize, and a queued exclusive request gates later admissions to preserve FIFO fairness.Admission supports queue position notifications, clean cancellation through
AbortSignal, bounded waits, and fail-fast--no-waitsemantics. Leases are idempotently released so a completed request cannot corrupt scheduler state.This is intentionally a partial implementation of #5897: transport, workspace session routing, command classification, graph integration, and shared-build selection merging depend on the WS0/WS1 prerequisites and are not included here. The package is registered but not connected to the Rush CLI, so existing behavior is unchanged.
How it was tested
@rushstack/rush-daemonwith Rush/Heft, including TypeScript, ESLint, and API Extractor.Impacted documentation
N/A. The package is not yet exposed through the Rush CLI.