[rush] Dogfood the Rush daemon in rushstack: allow command-scoped plugins, add snapshot workflow and guide - #6046
Open
Sean Larkin (TheLarkInn) wants to merge 9 commits into
Open
Sean Larkin (TheLarkInn) wants to merge 9 commits into
Sean Larkin (TheLarkInn) wants to merge 9 commits into
Conversation
…add daemon dogfooding workflow Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…g guide Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n starts Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…me fingerprint The client only needs to locate rush.json, read daemon settings, parse rushx arguments and build its daemon start command. Move those into small rush-lib and rush-daemon modules so the client no longer loads the whole engine for every invocation, and load version selection and rushx discovery only when needed. The runtime fingerprint now also covers the bundle chunks under dist, which contain the implementation, and recomputes a resolved path only when a file stat changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sean Larkin (TheLarkInn)
enabled auto-merge (squash)
September 23, 2026 21:59
The detached helper waited for readiness only until the requesting client deadline (15 seconds). A slower first start, such as the first start from a freshly deployed snapshot on Windows, left its startup reservation behind. Every later client then refused to use the ready daemon and fell back to native Rush after 15 seconds. The helper now waits for a live launcher for at least 120 seconds; the reservation is still retained if the launcher exits or never becomes ready. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…oader The heft-config-file rig fallback resolves the rig profile synchronously, which serializes the daemon's concurrent uncached project-configuration loads (two per request). Resolve it asynchronously first; RigConfig caches the same result, and a resolution failure still surfaces through a fresh instance exactly as before. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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
After this change, contributors can build rushstack with the opt-in Rush daemon today, from source, on Linux and Windows. A warm no-op
rush-client buildis now faster than native Rush on both platforms.rush-client buildin this repo fell back to in-process Rush. The engine rejected any configured plugin, including ourrush-published-versions-json-plugin, which is only associated withrecord-published-versions.Changes
PhasedCommandEngine.parseAsyncnow uses Rush's own plugin loaders (PluginManager.getPluginsParticipatingInCommand). Configured plugins are allowed only if they are inert for the requestedbuild/rebuild. A plugin is still rejected if it is unassociated (initialized for every command), is associated with the command, or its command-line.json defines the command or one of its phases, or associates a parameter with either. The check fails closed: if a manifest or command-line file can't be read, the request is rejected.captureWorkspaceInputFingerprintAsyncnow also hashes each configured plugin's autoinstallerpackage.jsonand its cached manifest andcommand-line.json. Changing any of them reloads the generation.cmd.exeshell running each operation) its own visible window. Before serving, the launched daemon now makeswindowsHide: truethe default for anynode:child_processcall that doesn't set it. Each hidden child gets a windowless console, and its descendants inherit it. This applies only to the standalone Windows launch path..startingreservation. Every later client then refused the ready daemon, waited 15 s and fell back to native Rush. The helper now waits for a live launcher for at least 120 s. The fail-closed behavior is unchanged: the reservation is still kept if the launcher exits or never becomes ready.rush-clientno longer loads the Rush engine to findrush.json, read daemon settings or parserushxarguments. Those now live in small modules:RushJsonLocation,RushXCommandLineArgumentsandDaemonLaunchCommand. Version selection andrushxdiscovery are loaded only when needed.dist(which contain the implementation and weren't covered before), and it no longer runs a JavaScriptrealpathon every file for every request.PhasedCommandEngine.test.ts: plugin gate casesWindowsSubprocessConsoles.test.tsrush deployscenariocommon/config/rush/deploy-rush-daemon-dogfood.json. It extracts a self-contained copy of the built client closure into gitignoredcommon/temp/rush-daemon-dogfood.docs/rush/dogfooding-rush-daemon.md, linked from the root README, therush-cli-clientREADME andenvironment-variables.md. The client, daemon and client-core READMEs are updated.No CI workflow changes, and no
daemonblock inrush.json: opt-in isRUSH_DAEMON=1, set only forrush-clientinvocations.Performance
@rushstack/tree-pattern, one terminal, file caches warm, two identical rounds:rush-client daemon statusrebuildA rebuild is dominated by Heft compile time, which the daemon doesn't change. On Windows, one cold
rebuildpreviously opened 22 visible windows and took 85 s; it now opens 0.Validation
rush build --to @rushstack/rush-cli-clientpasses, including lint, with no API report changes.rush change --verifypasses.C:\workspaces\rdfclone, Node 26.7.0, Git 2.53 for Windows):graphInitialized: true, with the same PID and generation token across cold, warm, edit-and-rebuild and after-native buildsrush rebuild --only--no-daemonruns nativedaemon stopleaves no processestypescript-v4-testalso builds under the daemonRemaining bottlenecks and open risks
git hash-objectfailure. The failure (exit 0xC0000142, seen earlier under Jest) did not occur here, but its cause is unresolved. It may be related to each spawned tool allocating its own console, which this PR removes, but that is not established.