Repository navigation
[release/11.0.1xx] Complete affected-test orchestration fixes - #56452
Merged
Evangelink merged 4 commits intoNov 5, 2026
Merged
Evangelink merged 4 commits into
Evangelink merged 4 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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.
Copilot review overview
🟢 Approval recommended
The narrowly scoped backport preserves existing failure paths and includes direct regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Backports the .NET 11 affected-test collection handshake fix, allowing successful collection applications to exit without the ordinary reporting handshake.
Changes:
- Accepts exit code 0 without a handshake during test-map collection.
- Preserves failures for nonzero exits and partial handshakes.
- Adds focused regression tests.
| File | Description |
|---|---|
src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs |
Refines collection-mode exit classification. |
test/dotnet.Tests/CommandTests/Test/TestApplicationHandlerTests.cs |
Covers successful, failed, and partial-handshake collection exits. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Backport #56538 (26a1ef9) on top of the existing #56450 servicing fix. Preserve release retry/reporting APIs while recognizing successful mapping and zero-selection orchestrators and retaining rejected/partial-handshake failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Evangelink
enabled auto-merge (squash)
November 3, 2026 21:12
0101
approved these changes
Nov 5, 2026
Evangelink
deleted the
dev/amauryleve/backport-affected-test-handshake
branch
November 5, 2026 09:11
Evangelink
had a problem deploying
to
copilot-pat-pool
November 5, 2026 09:11 — with
GitHub Actions
Failure
Evangelink
temporarily deployed
to
copilot-pat-pool
November 5, 2026 09:11 — with
GitHub Actions
Inactive
Evangelink
temporarily deployed
to
copilot-pat-pool
November 5, 2026 09:12 — with
GitHub Actions
Inactive
This branch was previously 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.
Summary
Completes the affected-tests servicing changes for
release/11.0.1xxby combining the existing #56450 backport with #56538. The release branch already contains the gated affected-test options from #55574; this PR fixes their process-completion boundary rather than adding another feature implementation.--collect-test-mapchildren that suppress all reporting handshakes.RefreshMappingsOrchestratorcompletion only in collection mode, and exit-0RunAffectedTestsOrchestratorcompletion only in affected-run mode, without requiring a TestHost that legitimately never starts.Source fixes:
15a545cb978bb0be6cad2f5d121d4452fba35dbd(#56450) and26a1ef981ff3039c74c9345adbfb95d4834a0099(#56538). The two release-specific conflict resolutions omit main-only retry state and a main-only test-helper parameter; unrelated MTP changes were not pulled in.Customer Impact
Successful map collection and valid empty affected selections can currently change from child exit 0 to parent exit 1 because the SDK treats their orchestrator-only lifecycle as a failed TestHost handshake. The original incident affected all 45 collection modules in TestFx build 1617452 and led to disabling the feature in microsoft/testfx#11651.
The original version of this servicing PR handled only the no-handshake collection path. It still rejected actual collection and zero-selection orchestrators. Both failures were reproduced against the release SDK before this update: two modules wrote valid maps and exited 0, but the SDK reported two handshake failures and returned 1. Ordinary execution succeeded.
Regression?
Yes. The orchestration introduced in #55574 assumes successful execution always reaches an ordinary TestHost. Collection and zero-selection orchestrators can legitimately complete without one. Main contains both corrections; this PR services the same boundary in .NET 11.
Testing
Windows x64 validation used the built
11.0.100-devrelease redist, with the changed CLI rebuilt and deployed through the existing incremental fast path. Validated head:f793c749291cf40318c036f41bd2e828026adcdc, including release basee5668b160fc888433229053cd615fc5e300fd847.298 focused SDK regressions passed, with no failures or skips: 169 lifecycle/transport/launch/reporting/policy tests and 129 parser/definition tests. This includes all 76
TestApplicationHandlerTestscases.42 composed contract scenarios passed: ten real-extension scenarios and 32 supplemental live named-pipe peer scenarios. Fixture rebuilds are not counted as behavior scenarios.
The exact selected names were
SharedCase,TestCase001,TestCase007,TestCase011,TestCase012andTestCase013. The expected set was derived from collected map UIDs and ordinary TRX IDs before editingCore\Case001.cs, then compared exactly with affected-run TRX results. The fixture spans multiple collection batches, avoiding misleading assumptions about conservative batch-scoped associations.The 32 live transport cases cover legacy no-handshake collection, rejection of no-handshake affected runs, matching and older no-execution-mode orchestrators, missing/unknown/mismatched capabilities, partial handshakes in both orders, protocol/property/mode rejections before and after accepted handshakes, nonzero exits and mixed-module aggregation. Valid completions return 0; invalid/partial/rejected completions remain 1; nonzero and mixed-module failures remain 13.
Aligned producer packages
933377f07ac4bded77e820b0beef7d27e805cd89933377f07ac4bded77e820b0beef7d27e805cd89b2131b75a68113223845cc69efb91918c980cb11All ten producer runtime DLLs were verified against original nupkg ZIP entries and both deployed test modules. No producer-source substitutions, package version overlays or SDK dependency updates were used. The affected-tests extension is private and experimental; this is composed release-branch validation, not a claim of public availability or downstream enablement.
Reproduction commands and retained evidence
The release branch lacks the current diagnostic test runner. The canonical
scripts/RunTests.cswas extracted from main commit2f0da079350a63d165b990e0cbfb3ead6bd09a58outside the checkout, with its standalone System.CommandLine directive pinned to the evaluated release version3.0.0. Its execution and diagnostic behavior was otherwise unchanged. With$runnerpointing to that retained file, the SDK test invocations were:On this release branch the parser file contains
TestCommandDefinitionTests, which is why its 129 cases were run separately. The two retained TRX/build-binlog directories are:artifacts\log\test-runs\dotnet.Tests\20261103-100025-215872artifacts\log\test-runs\dotnet.Tests\20261103-100630-303524The composed fixture pins the built SDK with
rollForward: disableand an absolute SDK path. Representative commands, run from its clean Git-backed fixture, were:The retained driver additionally records each exact results-directory/binlog argument, per-scenario environment, expected exit, actual exit and TRX-name assertions. The child-mode environment marker was never injected manually.
The local
affected-tests-release-validation.zipevidence bundle contains reproducible source fixtures, the driver, both SDK TRX reports, per-scenario stdout/stderr and result records, complete maps, the exact selection contract, package provenance, binary hashes and a file manifest. No packages, product binaries, credentials or binlogs are included; binlog locations are recorded for local inspection.Evidence archive SHA-256:
BBAFB45939F8452AFFA9AA86AC4B4D2112CE13F16AA5AB788826577C3C9DD165.Final built/deployed SDK
dotnet.dllSHA-256:2615723DEC0173F0D00B486D96F6AE312FC0547862518DC2B1105A06D542083F.Original-package/restored/deployed MTP DLL SHA-256:
3B924A66FE318D1EC1D48F4E253C42ECC355FD412114B628D803DEF002F6D6A3.The full baseline build succeeded with pre-existing NuGet audit warnings. The changed CLI built with zero warnings/errors; focused test builds retained the existing MessagePack 3.1.8 audit warning. Audit configuration was not weakened.
Risk and rollout
Low and bounded to the existing experimental affected-test modes. The source change is limited to handshake/completion classification, regression coverage and area guidance; there are no parser, localization, dependency, transport-version or concurrency-policy changes.
The SDK owns child activation, lifecycle classification and final aggregate exit codes. Mapping storage, repository analysis and test filtering remain owned by the separately shipped extension. This PR does not change conservative selection/fallback behavior.
No downstream enablement, feature-gate removal or SDK-denylist change is included. A release build containing this fix must flow downstream and be validated with its aligned package pins before those rollout gates are removed.