Repository navigation
Send process id from the agent to the client in initial response. - #56245
Merged
Merged
Conversation
Allows a Hot Reload implementation that does entirely control the process launch to associate Hot Reload session with a process id.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The handshake version change breaks compatibility with older clients and agents and needs a backward-compatible negotiation path.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds process-ID metadata to Hot Reload agent initialization, allowing sessions to associate with launched processes.
Changes:
- Adds agent metadata and process-ID propagation.
- Updates clients, app models, hosts, listeners, and tests.
- Extends the named-pipe initialization protocol.
File summaries
| File | Summary |
|---|---|
test/Microsoft.Extensions.DotNetDeltaApplier.Tests/Mocks/TestHotReloadClient.cs |
Updates the test client contract. |
test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadClientTests.cs |
Tests process-ID handling. |
src/Dotnet.Watch/Watch/HotReload/RunningProjectsManager.cs |
Consumes agent metadata. |
src/Dotnet.Watch/Watch/AppModels/WebServerAppModel.cs |
Configures web server agent behavior. |
src/Dotnet.Watch/Watch/AppModels/MobileAppModel.cs |
Configures mobile agent behavior. |
src/Dotnet.Watch/Watch/AppModels/DefaultAppModel.cs |
Configures default agent behavior. |
src/Dotnet.Watch/Watch/AppModels/BlazorWebAssemblyHostedAppModel.cs |
Configures hosted WebAssembly agent behavior. |
src/Dotnet.Watch/HotReloadClient/Web/WebAssemblyHotReloadClient.cs |
Reports WebAssembly agent information. |
src/Dotnet.Watch/HotReloadClient/HotReloadClients.cs |
Aggregates agent information and capabilities. |
src/Dotnet.Watch/HotReloadClient/HotReloadClient.cs |
Updates the client abstraction. |
src/Dotnet.Watch/HotReloadClient/HotReloadAgentInfo.cs |
Defines agent metadata. |
src/Dotnet.Watch/HotReloadClient/DefaultHotReloadClient.cs |
Reads and exposes process IDs. |
src/Dotnet.Watch/HotReloadAgent.PipeRpc/NamedPipeContract.cs |
Extends initialization response serialization. |
src/Dotnet.Watch/HotReloadAgent.Host/StartupHook.cs |
Captures the running process ID. |
src/Dotnet.Watch/HotReloadAgent.Host/Listener.cs |
Sends the process ID to clients. |
Review details
- Files reviewed: 15/15 changed files
- Comments generated: 1
- Review effort level: Lite
Member
Author
|
@DustinCampbell @genlu ptal |
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. |
genlu
reviewed
Sep 14, 2026
genlu
approved these changes
Sep 14, 2026
tmat
enabled auto-merge (squash)
September 14, 2026 21:55
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. |
tmat
had a problem deploying
to
copilot-pat-pool
September 15, 2026 15:32 — with
GitHub Actions
Failure
This branch had an error being 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.
Allows a Hot Reload implementation that does entirely control the process launch to associate Hot Reload session with a process id.
For example, in CDK the Hot Reload session for a project is created when the launch configuration is resolved. Then VS Code launches the process and vsdbg-ui receives DAP protocol event. There is no connection back to the code that created the session that would start it.
This change allows to implement "auto-start" -- when the agent in the launched process connects to the named pipe/web socket created for the launch (when the Hot Reload session is created) we can start the session and associate it to the process via proces id.