[rush-daemon][WS2] Add warm workspace session foundation - #5936
Merged
Mo Jazayeri (mojaza) merged 10 commits intoAug 20, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a lifecycle-owned warm workspace session to the Rush daemon.
Changes:
- Loads and reuses workspace metadata and injectable engine components.
- Tracks headless filesystem invalidations with deterministic cleanup.
- Adds lifecycle tests, documentation, API updates, and dependencies.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
libraries/rush-daemon/src/WorkspaceSessionProvider.ts |
Coordinates session initialization and disposal. |
libraries/rush-daemon/src/WorkspaceSessionFileWatcher.ts |
Watches workspace paths for invalidations. |
libraries/rush-daemon/src/WorkspaceSession.ts |
Defines and implements warm sessions. |
libraries/rush-daemon/src/WorkspaceInvalidationTracker.ts |
Retains sequence-based invalidations. |
libraries/rush-daemon/src/test/WorkspaceSessionProvider.test.ts |
Tests initialization concurrency and retries. |
libraries/rush-daemon/src/test/WorkspaceSession.test.ts |
Tests metadata, invalidations, and cleanup. |
libraries/rush-daemon/src/test/TestWorkspaceSession.ts |
Provides a session test double. |
libraries/rush-daemon/src/test/RushDaemonHost.test.ts |
Tests host/session lifecycle integration. |
libraries/rush-daemon/src/RushDaemonHost.ts |
Owns the session for the host lifecycle. |
libraries/rush-daemon/src/index.ts |
Exports session APIs. |
libraries/rush-daemon/README.md |
Documents warm-session behavior. |
libraries/rush-daemon/package.json |
Adds the Rush library dependency. |
common/reviews/api/rush-daemon.api.md |
Records the new public API surface. |
common/config/subspaces/default/pnpm-lock.yaml |
Locks the new workspace dependency. |
common/changes/@rushstack/rush-daemon/mojazayeri-warm-workspace-session_2026-08-18-22-30.json |
Adds the release change entry. |
Files not reviewed (1)
- common/config/subspaces/default/pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Review details
Files not reviewed (1)
- common/config/subspaces/default/pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
libraries/rush-daemon/src/WorkspaceSessionProvider.ts:53
- A cleanup failure is suppressed here during concurrent initialization and shutdown. If the factory resolves after
_disposedis set andsession.disposeAsync()rejects in_initializeAsync(), that rejection is converted toundefined, so thisdisposeAsync()resolves even though the session was not cleaned up. Preserve and propagate initialization-time disposal errors (while still handling ordinary factory rejection), and cover the rejecting-disposer case.
(await this._initializationPromise?.then(
(initializedSession: IWorkspaceSession) => initializedSession,
() => undefined
));
- Files reviewed: 15/16 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Mo Jazayeri (mojaza)
enabled auto-merge (squash)
August 19, 2026 21:02
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 20, 2026
Sean Larkin (TheLarkInn)
approved these changes
Aug 20, 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
Adds the next reviewable WS2 increment for #5897: a single warm
WorkspaceSessionowned by eachRushDaemonHostlifecycle. The daemon now loads stable Rush workspace identity once, retains headless file invalidations while no client is attached, and disposes session resources deterministically without changing normal Rush CLI behavior.Details
WorkspaceSessionbefore publishing daemon readiness and reuses it for the host lifetime.RushConfigurationonce and exposes stable repository, Rush version, project count, and project-name metadata for future routing.@rushstack/rush-daemon; noapps/rushorrush-liblauncher integration is added.A real all-projects operation graph is intentionally not constructed here. Its graph shape and runner lifetime remain command-dependent, and the reusable per-iteration runner lifetime tracked by open WS0 issue #5895 is incomplete. The component factory is the integration seam for that follow-up rather than duplicating
PhasedScriptActioninternals or landing placeholder routing behavior.How it was tested
rush build --to @rushstack/rush-daemonrush test --only @rushstack/rush-daemonrush update --subspace default --recheckrush change --verifyThe focused tests cover one-time initialization and reuse, concurrent initialization, synchronous/asynchronous retry semantics, retained headless invalidations, watcher-error dirty state, component cleanup after failed startup, listener-bind cleanup, protocol preservation, and deterministic shutdown ordering.