Repository navigation
[Spec] Define MSBuild server child-process ownership - #14508
Merged
JanProvaznik merged 6 commits intoAug 5, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ecd77e2-5945-45e3-b885-befa4a23d37a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ecd77e2-5945-45e3-b885-befa4a23d37a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ecd77e2-5945-45e3-b885-befa4a23d37a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ecd77e2-5945-45e3-b885-befa4a23d37a
Contributor
There was a problem hiding this comment.
Pull request overview
Defines V1 ownership and lifetime rules for MSBuild Server–owned child processes (workers and TaskHosts), clarifying how MT vs non-MT requests route, reuse processes, and shut down cleanly without cross-owner adoption.
Changes:
- Adds a spec for MT request routing and TaskHost ownership, including resident vs transient server behavior and shutdown semantics.
- Adds a spec for resident ownership of non-MT worker nodes, including in-process fallback behavior and reuse/shutdown requirements.
- Links the existing multithreaded MSBuild spec to the new MT ownership/routing spec.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| documentation/specs/server-worker-node-ownership.md | New spec describing resident-owned worker lifetime for non-MT requests, fallback behavior, and required tests. |
| documentation/specs/multithreading/server-taskhost-ownership.md | New spec defining resident/transient routing for MT requests and TaskHost ownership/shutdown rules. |
| documentation/specs/multithreading/multithreaded-msbuild.md | Adds a cross-reference to the new MT routing/TaskHost ownership spec. |
Ownership is not specific to the server. A sidecar TaskHost is always owned by whatever process created it, so when the server is disabled the sidecar dies with the ordinary MSBuild process rather than joining a machine-wide pool. Because a sidecar is always owned, no extra ownership marker is needed on the wire: the existing sidecar/short-lived distinction is the ownership signal, provided handshake leniency intended for architecture differences is scoped to architecture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ecd77e2-5945-45e3-b885-befa4a23d37a
AR-May
approved these changes
Aug 5, 2026
JanProvaznik
commented
Aug 5, 2026
Co-authored-by: Jan Provazník <janpro@janpro.dev>
JanProvaznik
enabled auto-merge (squash)
August 5, 2026 09:48
AR-May
approved these changes
Aug 5, 2026
This was referenced Oct 16, 2026
Closed
This was referenced Oct 18, 2026
Closed
Merged
Merged
Closed
Merged
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
This draft captures the V1 process-lifetime decisions for one shared MSBuild Server resident. MT and non-MT describe request modes, not different server types.
-mt -nodeReuse:falseuse one-build transient servers.dotnet build-server shutdowncascade through direct sidecars, owned workers, and worker-owned TaskHosts.Documents
documentation/specs/multithreading/server-taskhost-ownership.mddocumentation/specs/server-worker-node-ownership.mdEach spec is self-contained and defines the shared-resident and request-mode terminology it uses. The specs are intentionally limited to normative V1 ownership, reuse, shutdown, compatibility, and test requirements.
V1 decisions
Deferred discussion kept out of the specs
RAR / service-node lifetime
The meeting identified service nodes as a separate node category but did not make a RAR ownership decision. RAR is therefore deliberately excluded from both specs.
Current implementation context:
NodeMode 3, a global service process rather than a normal project worker.RarNodeLauncherdiscovers it through a stable lifecycle pipe and launches it only when absent.Follow-up design questions:
No answer to those questions is implied by this PR.
Coordinator, multiple servers, and retained-node sizing
The ownership fix is intentionally not blocked on coordinator work. The meeting established a conservative V1 with one resident server because unconstrained resident servers can create severe process and memory growth in multi-agent scenarios.
Coordinator observations and future directions discussed:
Current coordinator protocol context:
GrantedNodesvalue, sends heartbeats, and releases the grant at build completion.Possible follow-up protocol, not proposed here:
Core leases and process ownership should remain separate concepts: the server owns process lifetime, while the coordinator governs how many logical execution slots may be active.
Related open follow-ups
Expected outcomes
Scope
Documentation and design discussion only; this PR contains no implementation changes.
Related to #14313.