Skip to content

[rush-daemon][WS2] Add daemon host bootstrap - #5928

Merged
Mo Jazayeri (mojaza) merged 4 commits into
microsoft:mainfrom
mojaza:mojazayeri-microsoft-rush-daemon-host-bootstrap
Aug 18, 2026
Merged

[rush-daemon][WS2] Add daemon host bootstrap#5928
Mo Jazayeri (mojaza) merged 4 commits into
microsoft:mainfrom
mojaza:mojazayeri-microsoft-rush-daemon-host-bootstrap

Conversation

@mojaza

@mojaza Mo Jazayeri (mojaza) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the next scoped WS2 increment for #5897: a workspace-keyed daemon host that can bind, announce readiness, negotiate the wire protocol, answer liveness probes, and shut down cleanly. This intentionally does not implement WorkspaceSession or operation routing.

Details

  • Adds RushDaemonHost and serveRushDaemonAsync lifecycle APIs around the WS1 transport listener and lockfile.
  • Handles hello/helloAck and ping/pong; pong now reports uptime, protocol version, and daemon version while accepting legacy pong payloads.
  • Adds an opt-in rushd executable directly to @rushstack/rush-daemon; it discovers the nearest rush.json without adding integration to rush-lib or changing default Rush behavior.
  • Keeps warm sessions, graph routing, global command context, interactive forwarding, and shared-build merging out of scope for the follow-up tracked by [rushd][WS0] Upstream engine prerequisites (in rush-lib) #5895.

How it was tested

  • rush install
  • rush test --only @rushstack/rush-daemon-protocol --only @rushstack/rush-daemon-transport --only @rushstack/rush-daemon
  • Verified the emitted rushd entrypoint, workspace discovery, Windows named-pipe startup, lockfile/readiness ordering, handshake, ping/pong metadata, active connection shutdown, and artifact cleanup.

Impacted documentation

N/A

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the opt-in, workspace-keyed rushd host bootstrap without implementing workspace sessions or operation routing.

Changes:

  • Adds daemon startup, readiness, handshake, ping/pong, and shutdown lifecycles.
  • Routes the new rushd binary through version-selected rush-lib.
  • Extends pong metadata and updates tests, dependencies, API reports, and release records.

Reviewed changes

Copilot reviewed 25 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libraries/rush-lib/src/cli/RushDaemonCommandLine.ts Starts the daemon for the selected workspace.
libraries/rush-lib/src/api/Rush.ts Exposes the internal daemon launcher.
libraries/rush-lib/package.json Adds the daemon dependency.
libraries/rush-daemon/src/test/RushDaemonHost.test.ts Tests lifecycle and control messages.
libraries/rush-daemon/src/serveRushDaemon.ts Implements serve and signal handling.
libraries/rush-daemon/src/RushDaemonHost.ts Implements the workspace daemon host.
libraries/rush-daemon/src/index.ts Exports new lifecycle APIs.
libraries/rush-daemon/src/DaemonControlSession.ts Handles handshake and liveness frames.
libraries/rush-daemon/README.md Documents opt-in host availability.
libraries/rush-daemon/package.json Adds protocol and transport dependencies.
libraries/rush-daemon-protocol/src/test/ControlFrame.test.ts Updates pong codec coverage.
libraries/rush-daemon-protocol/src/index.ts Exports the pong interface.
libraries/rush-daemon-protocol/src/DaemonProtocolVersion.ts Advances the protocol version.
libraries/rush-daemon-protocol/src/DaemonPongMessage.ts Defines expanded pong metadata.
libraries/rush-daemon-protocol/src/DaemonControlMessage.ts Integrates the pong type.
libraries/rush-daemon-protocol/src/ControlMessageValidation.ts Validates expanded pong payloads.
common/reviews/api/rush-lib.api.md Records the launcher API.
common/reviews/api/rush-daemon.api.md Records host lifecycle APIs.
common/reviews/api/rush-daemon-protocol.api.md Records protocol API changes.
common/config/subspaces/default/pnpm-lock.yaml Locks new workspace dependencies.
common/config/rush/browser-approved-packages.json Approves new library dependency edges.
common/changes/@rushstack/rush-daemon/mojazayeri-rush-daemon-host-bootstrap_2026-08-17-23-30.json Records the daemon change.
common/changes/@rushstack/rush-daemon-protocol/mojazayeri-rush-daemon-host-bootstrap_2026-08-17-23-30.json Records the protocol change.
common/changes/@microsoft/rush/mojazayeri-rush-daemon-host-bootstrap_2026-08-17-23-30.json Records the Rush launcher change.
apps/rush/src/RushCommandSelector.ts Selects the rushd entrypoint.
apps/rush/package.json Registers the rushd binary.
apps/rush/bin/rushd Adds the executable shim.
Files not reviewed (1)
  • common/config/subspaces/default/pnpm-lock.yaml: Generated file
Suppressed comments (1)

libraries/rush-daemon-protocol/src/DaemonControlMessage.ts:87

  • This public beta type is now emitted as undocumented in the API report. Retain the description of how the discriminant union is derived.
/** @beta */

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libraries/rush-daemon-protocol/src/DaemonControlMessage.ts Outdated
Comment thread libraries/rush-daemon-protocol/src/ControlMessageValidation.ts Outdated
Comment thread libraries/rush-daemon-protocol/src/DaemonPongMessage.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Files not reviewed (2)
  • common/config/subspaces/build-tests-subspace/pnpm-lock.yaml: Generated file
  • common/config/subspaces/default/pnpm-lock.yaml: Generated file
  • Files reviewed: 26/29 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Comment thread apps/rush/src/RushCommandSelector.ts Outdated
Comment thread libraries/rush-daemon/package.json
Comment thread libraries/rush-lib/src/cli/RushDaemonCommandLine.ts Outdated
mojazayeri and others added 4 commits August 18, 2026 10:40
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>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mojaza
Mo Jazayeri (mojaza) force-pushed the mojazayeri-microsoft-rush-daemon-host-bootstrap branch from 3bd2f7b to 387a196 Compare August 18, 2026 17:41
@mojaza
Mo Jazayeri (mojaza) enabled auto-merge (squash) August 18, 2026 18:33
@mojaza
Mo Jazayeri (mojaza) merged commit ea3b319 into microsoft:main Aug 18, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

4 participants