You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add negotiated showMessage user output with legacy fallback - #11712
Add one optional capabilities.testing.showMessage request/acknowledgment pair to select client/showMessage instead of client/log. Missing/false support retains the legacy method; both methods keep the existing {level,message} payload.
The PR is deliberately limited to capability-gated method selection and the necessary DTO, serializer, client, and documentation changes. Only requested and acknowledged true selects the new method, after the initialization response. Clients retain both handlers and the existing LogReceived event; passive attachment-only nodes decline.
All clients retain the existing discovery/run activation point and startup buffer. Local rendering, diagnostic mirrors, connection chatter, progress behavior, and stdout/stderr handling remain unchanged. Acknowledgment is method-only, not exclusive rendering: clients displaying both console and RPC output may see duplicates.
Console suppression, transport hardening, output-owner lifecycle changes, and other adjacent fixes are deferred. The aggregate diff was reduced from 48 to 24 files. No new buffering, client-specific activation path, or client read-loop architecture is introduced.
Validation
Reduced implementation: 1,244 targeted executions passed, with TF_BUILD unset/true. Platform selectors ran on net462/net8/net9; source-client selectors ran on their supported net462/net8 targets. Both focused Release builds had zero warnings/errors. Coverage includes true/false/absent negotiation, acknowledgment ordering, single-method routing, unchanged payload/Unicode, and preserved activation/rendering.
Test-only review follow-up: 18 focused executions passed on net462/net8/net9 with TF_BUILD unset/true. The pipelined discovery fixture now requires exactly one matching buffered-output marker with Information severity before the discovery response, while allowing unrelated output. No production changes.
Restored transport, output-owner, and client-connection files were checked against baseline bytes. Broader fixes and evidence are preserved separately, not included in this PR.
Earlier IDE runs exercised a broader suppression-enabled snapshot, not this reduced implementation. No fresh IDE campaign, integration suite, or broad downstream compatibility result is claimed.
Reduced-head build 1625438 succeeded on source e3b7f7bfc, including all Windows and Linux legs. Historical build 1625152 failed Linux with unmatched process-completion hangs; its root cause remains unestablished.
Updated with current main (e5fc31915) in d60af6c58. The sole merge conflict was API inventory promotion: retain the six new showMessage entries in the cleared unshipped baseline. No feature behavior changes. Fresh net8 CI-environment selectors passed (144 platform cases, 96 client cases plus the process connection case); full client reruns passed on net8/net462 (301/218 passed, 8/2 platform-conditioned skips). The initial full-client invocation had a 15-second connection timeout in the unchanged stdout-draining fixture; its focused and full reruns passed, without a product fix or established root cause.
Build 1627949 and upstream main build 1627931 failed the identical 21 newly enabled native packaged-app cases after five-minute child SDK command timeouts. Investigation of the incomplete child binlogs found deterministic cross-SDK contamination: the isolated .NET 10.0.401 muxer inherited MSBuildSDKsPath and MSBuildExtensionsPath from the repository's outer .NET 12 test host, evaluated the wrong SDK installation, fell back to out-of-process build tasks, and stalled before normal build execution.
Fixed in 29522be46 by removing only those two inherited MSBuild installation variables before launching the isolated SDK. No timeout increase, retry, skip, serialization, or product behavior change was added. Local Release pack/build validation passed, and the full 21-case PackagedAppNativeDotnetTestTests suite passed under its normal method-level parallelism in 1m 07s (21/21), with no fallback warning; the focused showMessage matrix also passed 579/579 across net462/net8/net9. Latest main was merged in b01726aae; refreshed CI is pending.
Add an opt-in request and applied acknowledgement, retain legacy routing by default, and keep built-in connection messages diagnostic in the negotiated mode. Cover startup buffering, role callbacks, serializers, and client compatibility.
Related to microsoft#11422.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Register one callback and route its message through the negotiated output policy. Remove the extra role-message interface and duplicate sink callbacks while preserving terminal role initialization and dotnet-test pipe behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the full routing explanation to the notification it affects and leave an initialization cross-reference.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shorten the client/log note to explain opt-in routing, acknowledgement and raw-output boundaries without implementation details.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds opt-in JSON-RPC output routing to address duplicate server-mode output reported in #11422, while preserving legacy routing for clients that do not opt in.
Changes:
Adds capability negotiation, acknowledgement, serialization, client support, and documentation.
Centralizes maximum-failed-tests output through the shared proxy.
Moves connection chatter to diagnostic logging and expands routing tests.
Attach and flush output after initialize succeeds for all JSON-RPC clients, independently of discovery/run and rpcOnlyOutput. Synchronize queue handover and preserve acknowledgement semantics on failures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
Note
🤖 Automated review by GitHub Copilot. To request a follow-up action, reply by tagging @copilot directly.
Changes requested: keep user-facing output distinct from diagnostic logging, and avoid changing notification timing for clients that did not negotiate the new behavior.
The central architecture concern is real: this PR makes client/log the authoritative path for IOutputDevice data, but the wire shape and source client still describe it only as a log (level + message, LogReceived). A connection-level acknowledgement could serve as a discriminator, but the contract never says that acknowledged messages are user output that must bypass diagnostic verbosity filters. Without that normative rule and a real downstream client validation, the original #11422 failure can persist after stdout is removed.
The inline findings cover three concrete consequences: bypassing OriginalOutputDevice also removes diagnostic-file and Azure Pipelines behavior; immediate post-response flushing can drop startup output in the source client; and the capability is placed outside the documented capabilities.testing namespace. The two existing open threads on parallel-test warning interleaving also remain actionable and are not duplicated here.
Before shipping this wire contract, validate the composed producer/client path: old client + new server, new client + old server, acknowledged output visible exactly once at default presentation settings, subscription immediately after InitializeAsync, --diagnostic retention, Azure DevOps command output, direct stdout/stderr, initialization failure, cancellation, and handshake-only exit. The PR currently notes that the acceptance suite was not run.
Confidence at a glance
🟠 Protocol semantics — High confidence
The server/output-device mapping, schema, protocol documentation, source-only client API, and motivating issue were traced end to end. The current contract does not preserve the output/log distinction explicitly.
🟠 Compatibility and lifecycle — High confidence
The initialize response, asynchronous client request completion, notification read loop, and null-handler drop behavior establish the post-initialize loss race for existing client usage.
🟡 Test coverage — Medium-high confidence
The changed unit tests cover negotiation and server-side routing well, but do not exercise the real downstream presentation contract, diagnostic-file preservation, or subscribe-after-initialize behavior. Existing open test-isolation findings remain unresolved.
Correct the TryPushLogAsync API parameter namespace and assert applied negotiation before notification routing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarification of the automated triage for build 1624928: the pipelined ordering test did not recover on retry. The native net462 reports contain different parameter rows, False/passed and True/failed, with distinct execution IDs; the timeline is attempt 1 and the build has one final failed result. Duplicate report formats do not represent retries.
The failure is a test-fixture isolation defect: the opted-in row expected client/showMessage without clearing TF_BUILD or acquiring the shared environment resource lock. Azure correctly declines support and selects client/log. Neighboring tests temporarily clear that process-wide variable, masking the omission in some parallel runs. The correction keeps Azure eligibility unchanged and isolates this ordering fixture like the adjacent negotiation tests.
Fixed in 6e3157f125cf2f9e98fdcd3e42da2e39b40aa612. The unchanged isolated Release/net462 test reproduced with TF_BUILD=true (True failed, False passed); afterward 816 targeted Release executions passed across net462/net8/net9 and both environment settings, including each isolated parameter pair. This is local correction evidence, not a claim that the original CI recovered or the new head has completed CI.
If EOF arrives while a suppressed progress message is awaiting a transport write, HandleMessagesAsync returns without draining pending work. This teardown can then dispose ProxyOutputDevice and its progress semaphore before forwarding resumes. ForwardAsync calls Release() on the disposed semaphore, throwing ObjectDisposedException before the proxy can render the failed message locally. Close the transport first, then keep the output devices alive until in-flight DisplayAsync calls, including fallback rendering, settle. Add a blocked-progress-write regression through the full InternalRunAsync lifecycle; the existing disconnect test exercises only the message loop, not service disposal.
Progress removal fails to clear terminal deduplication state
A progress value rendered before opt-in remains in the terminal's deduplication cache when this return skips a later Message: null removal. If the connection then fails and the same producer/key/value is emitted again before session cleanup, the terminal discards it as unchanged (TestProgressStateAwareTerminal.cs:304–329) and RPC forwarding rejects the closed connection. The new output is lost. Let progress removals update local bookkeeping while rendering is suppressed, and add coverage for startup → opt-in → removal → connection failure → same-value output.
This PR has been reduced to capability-gated client/showMessage routing and the necessary DTO/serializer/client support. Existing discovery/run activation and local rendering are preserved. Console suppression, transport hardening, output-owner lifecycle changes, and other adjacent fixes are deferred rather than bundled here. Acknowledgment is method-only; clients displaying both RPC and console output may see duplicates.
Resolve the API promotion conflict by retaining only the six unshipped showMessage entries. Preserve capability-only routing and upstream baseline changes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI investigation: the Windows application-model leg in build 1627949 failed with 21 failures / 13 passes, all failures in PackagedAppNativeDotnetTestTests. SDK 10.0.401 child build/test/run commands hit their five-minute deadlines; logs also contain the Microsoft.NET.Build.Tasks out-of-process task-host fallback warning. That warning is evidence, not an established root cause.
I independently compared upstream main build 1627931: its application-model leg has the exact same 21 failing parameterized cases, the same timeout signature, and 13 passes. Its source is cac4b5ca, the merge of #11804. #11815 enabled those cases in this pipeline. Our tested merge 3ae64e14 has a main parent that descends from that runtime change, even though the earlier local main update did not yet contain the class.
This establishes an upstream CI blocker, not a feature-specific regression; it does not establish an infrastructure cause or make the failed leg green. Final status (13:02:08 UTC): the aggregate build failed. Windows Debug, Windows Release and Linux Release all succeeded; application-model acceptance is the sole failed job, with no additional failed tasks. No retry, test exclusion, timeout increase or unrelated product correction was applied. The upstream native packaged-app failure needs its own correction before a clean composed build can be claimed.
Final test-triage resolution — Azure Pipelines build 1627949
This is the final resolution for the completed microsoft.testfx build on PR #11712 (head d60af6c5, merge 3ae64e1), superseding the earlier preliminary comment on this same build.
Status: No action needed on this PR; the signal is a durable, environment-level issue unrelated to this PR's diff, already tracked by existing open issues.
Affected leg:microsoft.testfx (Build Windows application-model acceptance) — job "Windows application-model acceptance" → task "Test real Modern and classic UWP applications" (worker NetCore-Public 45).
Signature: All 40 failing records (21 CTRF + 19 JUnit entries over the same underlying test methods/attempts) in MSTest.Acceptance.IntegrationTests_net11.0 are System.TimeoutException: Command did not exit within 00:05:00, thrown uniformly from the shared harness helper AcceptanceTestBase.RunWindowsApplicationModelCommandAsync (test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceTestBase.cs:307) — not a product assertion failure. Affected tests are all PackagedAppNativeDotnetTestTests.NativeDotnetTest_* / DotnetRun_* cases, which shell out to a separately installed .NET 10 SDK (dotnet10\dotnet.exe build|test against a generated NativeSidecar.csproj). Durations cluster tightly at ~300.5–301.7s, i.e. every case is hitting the fixed WindowsApplicationModelExecutionTimeout ceiling rather than failing independently — consistent with one underlying hang (stuck child dotnet.exe process or blocked native-sidecar build/activation) rather than ~21 distinct test bugs.
History: The most recent completed main build (1627931, commit cac4b5c) that ran this same test path shows the identical set of 42 failing/retried test-name signatures as this PR build, with the same timeout message pattern. Three other recent main builds in the 30‐day window also failed, but their collected results contained no test records for this path (build-level failures before tests ran), so they don't add further duration evidence. This is consistent with a pre-existing, recurring environment/runner issue on the new native-sidecar matrix rather than something introduced or affected by this PR.
Scope vs. this PR: This PR's diff is limited to Microsoft.Testing.Platform server-mode JSON-RPC (ServerTestHost.*, MtpServerClient, serializers, docs). It does not touch the packaged-app/native-sidecar/UWP harness, so the failures are not caused by this PR's changes.
Existing issues: This matches ongoing, already-tracked work in the native-sidecar/packaged-app area rather than a new defect: #11805 ("Forward MSTest filters through the packaged-app sidecar") and the open #11828 ("Fix packaged MSTest filtering and make extension coverage observable") both describe known gaps/fixes in this same PackagedAppNativeDotnetTestTests native-sidecar path, and #11815 (merged) wired these tests into CI very recently (its merge commit e5fc319 landed just before build 1627931). No open issue specifically tracks this 5‐minute timeout/hang signature yet, but the recurrence (same exact failure set on both this PR's build and the latest main build) plus clear ownership under #11828's active area means this is better tracked under that ongoing work rather than as a new standalone bug, to avoid fragmenting triage on a feature still being stabilized.
Next step: Owners of #11828/#11805 should investigate whether dotnet10\dotnet.exe build/test invocations are hanging (e.g., first-run SDK telemetry/certificate prompts, antivirus/AppLocker scanning the isolated SDK install, or a blocked native-sidecar handshake) on the NetCore-Public Windows pool, and consider whether the fixed 5-minute WindowsApplicationModelExecutionTimeout is too tight for a cold .NET 10 SDK invocation in this environment.
🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto · 132.6 AIC · ⌖ 7.7 AIC · ⊞ 9.7K
The reason will be displayed to describe this comment to others. Learn more.
Note
🤖 Automated review by GitHub Copilot. To request a follow-up action, reply by tagging @copilot directly.
Fresh re-review result: no new code to review. Current HEAD remains ab1ffbb7a1ad4fd32fb3284f9a4f3897733e6379, with an empty diff from the previously reviewed head. I re-traced the protocol, server routing, source client, fallback paths, tests, PR description, and current discussion; there are no additional actionable code findings to add without duplicating live threads.
The existing Changes Requested blockers remain unresolved:
The earlier local evidence remains applicable because the commit is unchanged: shipping packages built and 621 focused results produced 620 passes and one skip, including a packed source-client consumer launching a real server. That evidence still does not negotiate rpcOnlyOutput in a composed Visual Studio/vstest path, so exactly-once default rendering, old/new binary fallback, transport-loss recovery, and downstream rollout remain unproven. Azure CI remains red on the same build failures.
Confidence at a glance
🟠 Existing blockers — High confidence
All three findings point to unchanged current code and unresolved live threads; the environment-dependent failure is reproduced in the Azure pipeline and locally.
🟢 New-code coverage — High confidence
There is no code delta from the previous review, so no new inline findings are warranted.
This re-review is attached to historical commit ab1ffbb7a1ad4fd32fb3284f9a4f3897733e6379, not the current PR head d60af6c5847249049541f869da3021901d5c1df2. Its rpcOnlyOutput/stdout-suppression findings describe the superseded implementation. The current change negotiates capabilities.testing.showMessage and selects the distinct client/showMessage notification only when requested and acknowledged; otherwise it retains client/log. It preserves baseline console rendering and does not promise exclusive rendering or transport-loss recovery. The current-scope replies are already in the linked review threads; they remain open for reviewer confirmation, not automatically resolved. Current build 1627949 failed only in the native packaged-app acceptance leg, matching the same 21 timeout cases on upstream main build 1627931; the final evidence is in #11712 (comment). Please evaluate the current diff rather than carrying forward the historical implementation assumptions. This clarification does not claim approval or completed reduced-head VS interoperability evidence.
The reason will be displayed to describe this comment to others. Learn more.
Note
🤖 Automated review by GitHub Copilot. To request a follow-up action, reply by tagging @copilot directly.
Current-head review (d60af6c58): no blocking code findings. This review was restarted from the actual GitHub head and current merge base (e5fc31915); conclusions from the historical suppression design were not reused.
The reduced contract is coherent: capabilities.testing.showMessage is optional and tri-state, only requested/acknowledged true selects the distinct client/showMessage method, absent/false retains client/log, the response precedes the first new-method notification, passive nodes decline, and the server never dual-sends. Local rendering and discovery/run buffering remain baseline behavior. Old-client/new-server and new-client/old-server fallback follow from omission/unknown-field handling.
I verified the three historical findings against the current code and resolved their threads: the TF_BUILD failure is gone in the reduced design, console suppression is no longer part of the diff, and output now has a distinct wire method. The source client intentionally exposes both methods through the existing LogReceived event; the negotiated capability identifies the connection-wide route. Richer payload fidelity (producer/progress/formatting) is not provided, but that is outside the stated method-selection scope rather than a correctness defect.
Validation performed: both affected test projects built with zero warnings/errors and binlogs. I ran 579 focused current-head executions across net8.0, net9.0, and net462, including TF_BUILD=true; all passed (387 platform, 192 source-client). Current Windows Debug/Release and Linux Release CI legs pass. The remaining application-model acceptance failure is also documented as reproducing on upstream main.
Remaining evidence gap: no repository acceptance test or locally available composed Visual Studio/vstest run negotiates showMessage through the packed shipping client and real server. The PR links the coordinated VS client change, but the server/client exactly-one-method behavior and default UI presentation still need to be demonstrated with aligned shipping components before downstream enablement. This is a rollout/validation gate, not a code defect found in this diff.
Confidence at a glance
🟢 Protocol correctness and compatibility — High confidence
Traced request/acknowledgment, both serializer stacks, response ordering, server method selection, passive-node behavior, source-client decoding, and old/new fallback on the current 24-file diff.
🟢 Focused implementation validation — High confidence
Current-head builds and 579 focused cross-TFM executions passed, including Azure-environment runs.
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
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
Add one optional
capabilities.testing.showMessagerequest/acknowledgment pair to selectclient/showMessageinstead ofclient/log. Missing/false support retains the legacy method; both methods keep the existing{level,message}payload.Related to #11422. Coordinated VS client support: https://dev.azure.com/devdiv/DevDiv/_git/VSUnitTesting/pullrequest/790279.
Impact
The PR is deliberately limited to capability-gated method selection and the necessary DTO, serializer, client, and documentation changes. Only requested and acknowledged true selects the new method, after the initialization response. Clients retain both handlers and the existing
LogReceivedevent; passive attachment-only nodes decline.All clients retain the existing discovery/run activation point and startup buffer. Local rendering, diagnostic mirrors, connection chatter, progress behavior, and stdout/stderr handling remain unchanged. Acknowledgment is method-only, not exclusive rendering: clients displaying both console and RPC output may see duplicates.
Console suppression, transport hardening, output-owner lifecycle changes, and other adjacent fixes are deferred. The aggregate diff was reduced from 48 to 24 files. No new buffering, client-specific activation path, or client read-loop architecture is introduced.
Validation
Reduced implementation: 1,244 targeted executions passed, with
TF_BUILDunset/true. Platform selectors ran on net462/net8/net9; source-client selectors ran on their supported net462/net8 targets. Both focused Release builds had zero warnings/errors. Coverage includes true/false/absent negotiation, acknowledgment ordering, single-method routing, unchanged payload/Unicode, and preserved activation/rendering.Test-only review follow-up: 18 focused executions passed on net462/net8/net9 with
TF_BUILDunset/true. The pipelined discovery fixture now requires exactly one matching buffered-output marker withInformationseverity before the discovery response, while allowing unrelated output. No production changes.Restored transport, output-owner, and client-connection files were checked against baseline bytes. Broader fixes and evidence are preserved separately, not included in this PR.
Earlier IDE runs exercised a broader suppression-enabled snapshot, not this reduced implementation. No fresh IDE campaign, integration suite, or broad downstream compatibility result is claimed.
Reduced-head build 1625438 succeeded on source
e3b7f7bfc, including all Windows and Linux legs. Historical build 1625152 failed Linux with unmatched process-completion hangs; its root cause remains unestablished.Updated with current
main(e5fc31915) ind60af6c58. The sole merge conflict was API inventory promotion: retain the six newshowMessageentries in the cleared unshipped baseline. No feature behavior changes. Fresh net8 CI-environment selectors passed (144 platform cases, 96 client cases plus the process connection case); full client reruns passed on net8/net462 (301/218 passed, 8/2 platform-conditioned skips). The initial full-client invocation had a 15-second connection timeout in the unchanged stdout-draining fixture; its focused and full reruns passed, without a product fix or established root cause.Build 1627949 and upstream
mainbuild 1627931 failed the identical 21 newly enabled native packaged-app cases after five-minute child SDK command timeouts. Investigation of the incomplete child binlogs found deterministic cross-SDK contamination: the isolated .NET 10.0.401 muxer inheritedMSBuildSDKsPathandMSBuildExtensionsPathfrom the repository's outer .NET 12 test host, evaluated the wrong SDK installation, fell back to out-of-process build tasks, and stalled before normal build execution.Fixed in
29522be46by removing only those two inherited MSBuild installation variables before launching the isolated SDK. No timeout increase, retry, skip, serialization, or product behavior change was added. Local Release pack/build validation passed, and the full 21-casePackagedAppNativeDotnetTestTestssuite passed under its normal method-level parallelism in 1m 07s (21/21), with no fallback warning; the focusedshowMessagematrix also passed 579/579 across net462/net8/net9. Latestmainwas merged inb01726aae; refreshed CI is pending.