[rushd][WS2] Daemon host, routing & scheduling
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- node.js, typescript
調査の方向性
Start by reading the prerequisite issues #5895 and #5896, then trace the version-selected rush-lib entrypoint and the proposed @rushstack/rush-daemon serve command. The payload names no files or test paths; done means satisfying the listener, warm-session, routing, scheduling, I/O, parity, merging, opt-in, and CI acceptance criteria.
索引モデルが issue の本文から書いたものです。
説明
Build the long-lived per-workspace daemon: a warm WorkspaceSession (config + all-projects graph + watcher + plugins) that routes phased and global commands with per-request cwd/env/terminal context, matches in-process exit-code / warnings-as-errors semantics, and forwards stdin/raw-mode for interactive commands. It also serializes and merges concurrent client requests via exclusivity classes, queue-and-wait admission, and shared-build merging instead of failing on 'another rush is running'.
Depends on: #5895; #5896
Scope
- Scaffold
@rushstack/rush-daemon+serve. Launched by the version-selectedrush-lib; boots a transport listener and signals readiness. - Warm
WorkspaceSession. A warmRushConfiguration+ all-projectsOperationGraph+ plugins + inputs snapshot + a long-livedProjectWatcherthat keeps invalidating operations even with no client attached. - Phased request routing. Map the selection via
setEnabledStates, reconcile pending watcher invalidations, subscribe the client to its operations' raw streams + events, schedule/execute one iteration, and translate final status → exit code. - Per-request global-command context. Run global CLI actions with the client's
cwd/env/terminal injected per request (never via globalprocess.chdiror sharedprocess.envmutation). - Exit-code parity. Match in-process exactly, including the
SuccessWithWarningpath (stderr-with-exit-0 → warnings, honoringallowWarningsInSuccessfulBuild/RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD). - Interactive I/O. Forward stdin bytes + raw-mode/resize control frames; classify PTY-only commands never-daemonize (run in-process on the client).
RequestScheduler. Exclusivity classesSHARED-BUILD/SHARED-READ/EXCLUSIVE+ a static command-classification table; queue-and-wait admission (FIFO, anEXCLUSIVE"gate", queued-position progress events, clean Ctrl+C,--wait-timeout/--no-wait).- Shared-build merging. Union concurrent clients' enabled sets into one iteration, while each client's exit code reflects only its own subset.
Acceptance criteria
-
servestarts a listener at the workspace transport path and signals readiness; apingcontrol frame returns apong(carrying protocol + daemon version); the entrypoint is launched via the version-selectedrush-lib. - On start the session loads config once and builds the all-projects graph + plugins + inputs snapshot; a file change with no client connected marks the correct operations dirty (headless watcher); config/graph are reused across requests (no rebuild).
- A
rush build --to Xrequest enables X's subtree, runs one iteration, and returns the same result set as in-process; a no-op follow-up collapses to a warm skip; the client receives only its selected operations' streams/events and the correct exit code. - A global command observes the client's
cwd/envwhile the daemon's ownprocess.cwd()/process.envstay unchanged; two concurrent global commands from different cwds/envs do not cross-contaminate. - Success,
SuccessWithWarning, and failure cases each return the same exit code as in-process, including under the warnings-as-errors settings/env (table-driven parity test). - stdin bytes and raw-mode toggles forward correctly (an interactive prompt behaves identically to in-process); PTY-only commands are on the never-daemonize list and transparently run in-process.
- Every built-in command has an exclusivity class (unclassified/global default
EXCLUSIVE); the scheduler admits compatible classes concurrently and serializes incompatible ones; anEXCLUSIVErequest gates later admissions until it finishes;--wait-timeoutexpires with the documented exit code and--no-waitfails fast. - Two overlapping
SHARED-BUILDselections run as one merged iteration (shared operations execute once), a failure in one client's subset does not fail another's succeeding subset, and each client gets only its subset's streams/events and a correct exit code. - All new daemon behavior ships opt-in until cutover; unit/integration tests green in CI.
Part of #5894.
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 708
- 平均マージ
- 4日 7時間
- マージ済み PR(30日)
- 61
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/rushstack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/rushstack#5971 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/rushstack#5902 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/rushstack#5839 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/rushstack#5683 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
microsoft/rushstack の issue をすべて見る
似ている issue
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Fission-AI/OpenSpec#1986 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
nestjs/docs.nestjs.com#3554 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
publicodes/publicodes#868 ·
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
EclipseFdn/open-vsx.org#13488 ·
メンテナーはふだん 2 日以内に返信