Skip to content

[rush-daemon][WS2.4][3/9] Route phased requests - #5962

Merged
Sean Larkin (TheLarkInn) merged 4 commits into
mainfrom
mojazayeri-microsoft-rushd-ws2-route-phased-upstream
Aug 26, 2026
Merged

[rush-daemon][WS2.4][3/9] Route phased requests#5962
Sean Larkin (TheLarkInn) merged 4 commits into
mainfrom
mojazayeri-microsoft-rushd-ws2-route-phased-upstream

Conversation

@mojaza

Copy link
Copy Markdown
Contributor

Summary

Routes caller-resolved phased requests through the warm Rush daemon workspace graph, including request-scoped event and output forwarding, cancellation, result collection, and safe enabled-state selection.

This PR supersedes mojaza#2 and follows the merged #5949. It references #5897 and PBI https://onedrive.visualstudio.com/EFun/_workitems/edit/3216020.

Details

  • Adds phased request and result contracts to @rushstack/rush-daemon-protocol.
  • Adds the phased request router, client boundary, graph event multiplexer, and request-scoped event sink to @rushstack/rush-daemon.
  • Preserves explicit enabled states after dependency closure, keeps retained warm results distinct from current observed results, and makes stream-close delivery authoritative for every verbosity.
  • Keeps structured event sequences connection-owned and allocates them when queued writes are invoked, avoiding warm-graph session retention and out-of-order interleaving.
  • Includes API reports, README updates, change files, focused routing tests, and the current-main lockfile importer update.

Limitations

#5895 remains open and limits this layer: the upstream engine prerequisites are not yet complete, notably host-controlled per-iteration persistent versus one-shot runner lifetime. Shared-build merging, broader admission scheduling, and final daemon cutover remain follow-up work under #5897.

This draft awaits human review and is not ready to merge.

How it was tested

  • node common/scripts/install-run-rush.js install --from @rushstack/rush-daemon
  • node common/scripts/install-run-rush.js test --to @rushstack/rush-daemon
  • node common/scripts/install-run-rush.js test --only @rushstack/rush-daemon
  • API Extractor generated-file validation for @rushstack/rush-daemon completed cleanly on the final run.

mojazayeri and others added 3 commits August 24, 2026 14:50
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds opt-in routing of caller-resolved phased requests through a reusable Rush daemon operation graph.

Changes:

  • Adds phased request protocol contracts and public router APIs.
  • Implements serialized execution, cancellation, event/output forwarding, and result collection.
  • Adds focused tests, documentation, API reports, dependency metadata, and change files.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libraries/rush-daemon/src/PhasedRequestRouter.ts Routes requests through the warm graph.
libraries/rush-daemon/src/PhasedRequestEventSink.ts Forwards scoped events and output.
libraries/rush-daemon/src/PhasedRequestEventMultiplexer.ts Multiplexes workspace and request sinks.
libraries/rush-daemon/src/PhasedRequestClient.ts Defines the client boundary.
libraries/rush-daemon/src/index.ts Exports routing APIs.
libraries/rush-daemon/src/test/PhasedRequestRouterTestUtilities.ts Provides routing test fixtures.
libraries/rush-daemon/src/test/PhasedRequestRouter.test.ts Tests routing and failure scenarios.
libraries/rush-daemon/README.md Documents phased routing.
libraries/rush-daemon/package.json Adds the terminal dependency.
libraries/rush-daemon-protocol/src/DaemonPhasedRequest.ts Defines phased request contracts.
libraries/rush-daemon-protocol/src/index.ts Exports protocol contracts.
libraries/rush-daemon-protocol/README.md Documents protocol support.
common/reviews/api/rush-daemon.api.md Updates daemon API reports.
common/reviews/api/rush-daemon-protocol.api.md Updates protocol API reports.
common/config/subspaces/default/pnpm-lock.yaml Updates the workspace importer.
common/changes/@rushstack/rush-daemon/mojazayeri-route-phased-requests_2026-08-21-17-24.json Records the daemon change.
common/changes/@rushstack/rush-daemon-protocol/mojazayeri-phased-request-contracts_2026-08-21-17-24.json Records the protocol change.
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.

Comment thread libraries/rush-daemon/src/PhasedRequestEventSink.ts Outdated
Comment thread libraries/rush-daemon/src/PhasedRequestEventSink.ts
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TheLarkInn
Sean Larkin (TheLarkInn) enabled auto-merge (squash) August 26, 2026 05:10
@TheLarkInn
Sean Larkin (TheLarkInn) merged commit 209ef7f into main Aug 26, 2026
10 checks passed
@TheLarkInn
Sean Larkin (TheLarkInn) deleted the mojazayeri-microsoft-rushd-ws2-route-phased-upstream branch August 26, 2026 05:15
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Aug 26, 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