[rush] rush-cli-client: routing and feedback gaps (non-build commands auto-start the daemon, 0-column TTY hard-fails, no queue or startup feedback for non-TTY clients)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cli, nodejs, typescript
調査の方向性
Start in apps/rush-cli-client/src/routing.ts to see the command routing logic and the neverDaemonize list. Check launchClient.ts for TTY column handling and queue feedback. The daemon rejection logic is in ProductionDaemonRequestResolver.ts. Run the repro steps to verify the issues, focusing on one at a time. A fix should ensure non-build commands skip the daemon, handle 0 columns gracefully, provide queue feedback to non-TTY, and give startup status.
索引モデルが issue の本文から書いたものです。
説明
Summary
Four related problems in apps/rush-cli-client (the opt-in rush-client), each reproduced independently on Linux with rush-client from main @ 60007c9a8c and RUSH_DAEMON=1:
- Non-build commands connect to, and auto-start, the daemon, are rejected, and print a misleading warning.
rush-client listwith no daemon running takes 2.98 s, compared with 0.98 s for native, because it auto-starts a daemon. Warm, it takes 1.06 s.tab-complete, and repo-defined custom phased or global commands, do the same. Every call printsrush-client: The production daemon requires an explicitly identified native build/rebuild request. Ambiguous custom/rushx requests require --no-daemon.; using in-process Rush.(note the.;). Root cause:routing.ts:9-28neverDaemonizeis a partial deny-list (missinglist,tab-complete,init-subspace,install-autoinstaller,update-cloud-credentials,upgrade-interactive,alert,bridge-package,link-package), and repo-defined commands are routed to the daemon (routing.ts:71-80). The daemon then rejects everything except build/rebuild (ProductionDaemonRequestResolver.ts:137-143). Fix: route by an allowlist (build/rebuild, plus install/update when the peer supports them); send everything else in-process without connecting, and show a rejection only in verbose/debug mode. - A TTY with 0 columns hard-fails the build. Under
script,docker exec -tbefore a resize, or agent PTYs created 0x0,process.stdout.columns === 0, and the client exits 1 withRequest terminal columns must be a positive safe integer.and no fallback. Native Rush builds fine in the same terminal. Root cause:launchClient.ts:91, :108passprocess.stdout.columnsverbatim, and:131uses?? 80, which does not catch 0. Fix: treat 0 or undefined as unknown (omit it, or fall back to 80). - Queue-position feedback is suppressed when stderr is not a TTY. AI agents and CI waiting behind another build see 0 bytes for up to 30 s, and then only the wait-timeout failure. TTY clients get
waiting for daemon admission (position 1).after about 1 s, repeated even when the position has not changed. Root cause:launchClient.ts:162-168(onQueuePositionAsync: process.stderr.isTTY ? ... : undefined). The duplicates come fromRequestScheduler.ts:304-311. Fix: always write a queue line to stderr (non-TTY: once when queued and on each change), include what the request is waiting for, and de-duplicate unchanged positions. - No immediate feedback while the daemon starts or initializes the graph. The client writes nothing until the daemon streams activity: 3.4-3.9 s of silence on a cold auto-start, 3.6-7.6 s on first graph initialization, and 2.5-4 s for
daemon start/restart. Native Rush prints its banner within 0.6-0.8 s. A first line within about 40 ms is achievable (for examplerush-client: starting daemon for <workspace>...orconnected; preparing graph...).
Repro steps
rush-client daemon stop; time rush-client list # 2.98 s + daemon auto-started + warning
script -qefc 'rush-client build --to p01; echo EXIT=$?' /dev/null # 0x0 PTY -> exit 1
rush-client build & sleep 5; rush-client build --only p03 2>err.txt # long holder; err.txt is empty for 30 s
rush-client daemon stop; rush-client build 2>&1 | head -1 # first byte only after ~3.7 s
Expected result: Native parity for non-daemon commands. Immediate, TTY-independent feedback for waiting and startup. No hard failure on a 0-column TTY.
Actual result: As described above.
Details
Found during an automated performance/behavior analysis of rush-client/rushd on Linux (the goals were immediate feedback for every terminal action and agent-friendly output). Each item was reproduced by at least two independent runs.
Standard questions
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
built from main @ 60007c9a8c (5.179.0) |
rushVersion from rush.json? |
5.179.0 |
pnpmVersion, npmVersion, or yarnVersion from rush.json? |
[email protected] |
(if pnpm) useWorkspaces from pnpm-config.json? |
true |
| Operating system? | Linux (WSL2 Ubuntu 24.04) |
| Would you consider contributing a PR? | Yes |
Node.js version (node -v)? |
22.23.2 |
- 主要言語
- 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
-
module-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
appandflow/stim#1604 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
lingdojo/kana-dojo#31060 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
paperclipai/paperclip#14173 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信