[rush-daemon][WS2.3][2/9] Add warm engine component factory - #5949
Merged
Mo Jazayeri (mojaza) merged 5 commits intoAug 22, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in factory for adapting real Rush engine state into warm daemon workspace sessions.
Changes:
- Adds validated all-project engine construction and invalidation mapping.
- Serializes reconciliation and coordinates deterministic disposal.
- Exposes the new beta API with tests and documentation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
libraries/rush-daemon/src/WorkspaceSession.ts |
Integrates engine shape and reconciliation. |
libraries/rush-daemon/src/WorkspaceEngineComponentFactory.ts |
Implements the engine factory and lifecycle. |
libraries/rush-daemon/src/test/WorkspaceSession.test.ts |
Tests disposal-time reconciliation rejection. |
libraries/rush-daemon/src/test/WorkspaceEngineComponentFactory.test.ts |
Tests validation, reconciliation, and cleanup. |
libraries/rush-daemon/src/test/TestWorkspaceSession.ts |
Updates the test session implementation. |
libraries/rush-daemon/src/index.ts |
Exports the new beta API. |
libraries/rush-daemon/README.md |
Documents warm-engine integration. |
common/reviews/api/rush-daemon.api.md |
Records the public API surface. |
common/changes/@rushstack/rush-daemon/mojazayeri-warm-graph-components_2026-08-19-22-30.json |
Adds the minor-version change record. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Build session integration operations from the freshly loaded Rush configuration and cover serialized concurrent reconciliation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mo Jazayeri (mojaza)
enabled auto-merge (squash)
August 21, 2026 18:03
Bharat Middha (bmiddha)
approved these changes
Aug 21, 2026
Sean Larkin (TheLarkInn)
requested changes
Aug 21, 2026
Sean Larkin (TheLarkInn)
left a comment
Member
There was a problem hiding this comment.
Please address the stale engine configuration issue in the inline comment.
Sean Larkin (TheLarkInn)
approved these changes
Aug 21, 2026
Classify graph-defining invalidations before reconciliation and require whole-session recreation without acknowledging stale state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 22, 2026
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
WorkspaceEngineComponentFactorythat adapts real, explicitly shaped Rush engine state into a warm daemon workspace session.Details
The factory requires the integration to provide an explicit all-project phase/plugin shape, a real nonempty
IOperationGraph, itsRushSession, an initialIInputsSnapshot, and a refreshable input snapshot provider. It validates that the graph is owned by the loaded Rush configuration, represents every configured project, and contains only declared phases; empty optional plugin shapes remain valid.Retained watcher invalidations are reconciled serially. Known paths are mapped to operations through the integration, while unknown changes, unhealthy watcher state, and invalidations racing snapshot refresh conservatively invalidate the full graph. Invalidations are acknowledged only after snapshot capture, mapping validation, and graph invalidation succeed. Async disposal rejects new reconciliation, waits for queued reconciliation, and delegates deterministic graph lifetime abort, current-iteration abort, runner closure, plugin cleanup, and snapshot cleanup to the real engine owner.
Limitations: Open #5895 still blocks command-independent plugin/phase shape and per-iteration runner lifetime. This PR therefore remains opt-in and requires an integration-owned real graph; it does not construct an empty or fake graph, duplicate
PhasedScriptAction, or add phased request parsing/routing. The standalone executable remains owned by@rushstack/rush-daemonwith noapps/rushorrush-liblauncher integration.How it was tested
node common/scripts/install-run-rush.js test --only @rushstack/rush-daemonnode common/scripts/install-run-rush.js build --only @rushstack/rush-daemon