Sync latest vendored TestFx protocol changes - #55338
Merged
Merged
Conversation
Consume explicit retry attempt metadata, preserve legacy inference, and synchronize artifact kind support and tracked TestFx baselines. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4a5b9a27-166c-42ad-8c0a-d2f7bef9be5a
|
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. |
Evangelink
enabled auto-merge
July 17, 2026 13:24
YuliiaKovalova
approved these changes
Jul 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Synchronizes the dotnet test <-> Microsoft.Testing.Platform (TestFx) vendored protocol surface in dotnet/sdk to match upstream changes, including an optional retry attempt number handshake property, an added file-artifact Kind field, and thread-safe retry/progress state updates for concurrent/sharded hosts.
Changes:
- Consume optional
AttemptNumberhandshake metadata to correctly attribute multiple host instances (shards) to the same retry attempt, while preserving legacy instance-based inference when absent. - Extend the file-artifact IPC model/field IDs/serializer to support the optional
Kindfield and log it. - Make retry/progress state updates thread-safe (assembly run map + per-assembly progress state) and add focused regression tests.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs | Adds regression tests for explicit attempt-number semantics and concurrency across shards. |
| test/dotnet.Tests/CommandTests/Test/TestApplicationHandlerTests.cs | Adds a test ensuring an explicit attempt number is surfaced in terminal output; updates test handshake builder to optionally include it. |
| test/dotnet.Tests/CommandTests/Test/FileArtifactMessagesSerializerTests.cs | New test validating FileArtifactMessage.Kind round-trips through the serializer. |
| src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs | Parses optional AttemptNumber from handshake and forwards it into terminal reporting; logs artifact kind. |
| src/Cli/dotnet/Commands/Test/MTP/Terminal/TestProgressState.cs | Introduces locking and attempt-number mapping to make retry/result accounting thread-safe and shard-aware. |
| src/Cli/dotnet/Commands/Test/MTP/Terminal/TerminalTestReporter.cs | Threads attempt number through AssemblyRunStarted, ensures safe assembly-run creation under concurrency, and uses per-instance attempt numbers for output. |
| src/Cli/dotnet/Commands/Test/MTP/Terminal/SimpleTerminalBase.cs | Minor comment update while syncing vendored content. |
| src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/FileArtifactMessagesSerializer.cs | Adds read/write support for optional Kind field and updates field counting. |
| src/Cli/dotnet/Commands/Test/MTP/IPC/ObjectFieldIds.cs | Adds the FileArtifactMessageFieldsId.Kind field id (wire contract alignment). |
| src/Cli/dotnet/Commands/Test/MTP/IPC/Models/FileArtifactMessages.cs | Extends FileArtifactMessage model with optional Kind. |
| src/Cli/dotnet/Commands/Test/CliConstants.cs | Adds optional handshake property id AttemptNumber (vendored constants alignment). |
| eng/vendored-files.json | Updates baseline SHAs to the referenced upstream microsoft/testfx commit. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 0
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
microsoft/testfx@dba319b212caae2a325800de8a5570ebe787b06dAttemptNumberhandshake metadata so multiple test-host instances can share one attempt, while retaining instance-based inference for older hostsKindfield ID, model, and serializer supportFixes #55255
Compatibility
Both protocol additions are optional and additive. Older peers continue to omit them, and unknown fields remain skippable.
Validation
src\Cli\dotnet\dotnet.csprojtest\dotnet.Tests\dotnet.Tests.csproj