Skip to content

Ship Microsoft.Testing.Platform.Internal.DotnetTest as a preview package - #9400

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
evangelink-ship-internal-dotnettest-package
Jun 24, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
evangelink-ship-internal-dotnettest-package

Conversation

@Evangelink

Copy link
Copy Markdown
Member

What

Promote the internal, source-only Microsoft.Testing.Platform.Internal.DotnetTest package from IsShipping=false to IsShipping=true, and add SuppressFinalPackageVersion=true.

Why

This package shares — as compiled source — the dotnet test ↔ Microsoft.Testing.Platform wire contract and terminal reporter so dotnet/sdk can stop hand-copying them (single source of truth). For dotnet/sdk to consume it, the package has to actually publish and flow via the normal dependency flow.

  • IsShipping=true publishes it (signed) on the same 2.3.0-preview.* train as the rest of Microsoft.Testing.Platform (it already inherits VersionPrefix = $(TestingPlatformVersionPrefix) from src/Platform/Directory.Build.props).
  • SuppressFinalPackageVersion=true keeps it preview even in stabilized/official builds (DotNetFinalVersionKind=release), so a stabilized MTP release never accidentally publishes a stable package named Internal. This mirrors how MSTest.SourceGeneration pins itself to preview. The shared-source surface is still partial (models/serializers not shared yet), so always-preview is intentional.

The Internal name + the -preview suffix keep it clearly an implementation detail, not a public API.

Validation

build.cmd -pack on this project succeeds with 0 warnings and lands the package in artifacts/packages/<config>/Shipping/ (Microsoft.Testing.Platform.Internal.DotnetTest.2.3.0-dev.nupkg locally; 2.3.0-preview.* in CI/official). PACKAGE.md is auto-wired as the package readme by Directory.Build.targets.

Follow-up

The consuming side is drafted in dotnet/sdk#54959 (replaces the hand-copied IPC/ObjectFieldIds.cs + Terminal/ reporter with a PackageReference). It needs this package to publish + flow into dotnet/sdk before the namespace/reporter reconciliation can be completed.

Promote the internal source-only 'dotnet test' integration package from
IsShipping=false to IsShipping=true so it publishes (signed) on the same
Microsoft.Testing.Platform preview train and can flow to dotnet/sdk. Add
SuppressFinalPackageVersion=true so it stays preview even in stabilized
official builds (mirrors MSTest.SourceGeneration), since the shared-source
surface is still partial and the 'Internal' name signals it is not a public API.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 24, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR promotes Microsoft.Testing.Platform.Internal.DotnetTest (a source-only package that shares the dotnet test ↔ Microsoft.Testing.Platform contract/reporter code) to a shipping NuGet package while ensuring it remains preview-only even in stabilized builds.

Changes:

  • Set IsShipping=true so the package is published and can flow to dotnet/sdk through normal dependency channels.
  • Add SuppressFinalPackageVersion=true to keep the package preview-suffixed even when the repo is producing “final/release” versions.
  • Update PACKAGE.md to reflect the new shipping/preview behavior and intent.
Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform.Internal.DotnetTest/Microsoft.Testing.Platform.Internal.DotnetTest.csproj Switches the package to shipping and pins it to always-preview via versioning properties.
src/Platform/Microsoft.Testing.Platform.Internal.DotnetTest/PACKAGE.md Updates package documentation to match the new publishing/versioning behavior.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings June 24, 2026 18:17
@Evangelink
Amaury Levé (Evangelink) marked this pull request as ready for review June 24, 2026 18:17
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) June 24, 2026 18:18
@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

@Evangelink Amaury Levé (Evangelink) left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Posted via a maintainer's GitHub token, so it appears under their account — the account owner did not write or approve this content personally. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Expert Code Review — PR #9400

Ship Microsoft.Testing.Platform.Internal.DotnetTest as a preview package

Reviewed 2 files changed (+16 / −6). Evaluated across all 22 dimensions.


Verdict Table

# Dimension Severity Verdict Finding
1 Threading & Concurrency BLOCKING N/A Packaging-only change; no runtime code
2 Security BLOCKING ✅ PASS No sensitive data published; the wire-protocol source (ObjectFieldIds.cs, Constants.cs) is intentionally a cross-repo contract — making it visible is the whole point
3 IPC/Wire Contract Stability BLOCKING ✅ PASS Only packaging metadata changed; no contract source files modified. DevelopmentDependency=true + SuppressDependenciesWhenPacking=true ensure this doesn't silently become a transitive runtime dependency
4 Performance & Allocations BLOCKING N/A Packaging-only change
5 Algorithmic Correctness MAJOR ✅ PASS IsShipping=true + SuppressFinalPackageVersion=true correctly achieves the stated goal: the package publishes to NuGet.org, always carries the pre-release suffix, and never accidentally ships as a stable artifact when DotNetFinalVersionKind=release. Logic is sound
6 API Design MAJOR N/A No public API surface changed
7 MSBuild / Project Health MAJOR ✅ PASS SuppressFinalPackageVersion is a valid Arcade property, confirmed by 6+ usages already in this repo (MSTest.SourceGeneration, Microsoft.Testing.Extensions.OpenTelemetry, JUnitReport, CtrfReport, Logging, AzureFoundry). No anti-patterns introduced
8 Cross-TFM Correctness MAJOR ✅ PASS TargetFramework=netstandard2.0 is deliberate (source-only placeholder). contentFiles/cs/any compiles under the consumer's own TFM. This is documented and correct
9 Backward Compatibility MAJOR ✅ PASS First-time NuGet.org publication; no prior stable version to break. DevelopmentDependency=true prevents transitive propagation to consumers of consumers
10 Dependency Management MAJOR ✅ PASS DevelopmentDependency=true and SuppressDependenciesWhenPacking=true are both retained, ensuring the package is a build-time-only source contribution
11 Code Quality & Style MINOR ✅ PASS New comments are clear, well-structured, and consistent with repo conventions. The rationale is thorough
12 Test Coverage MINOR N/A Packaging metadata change; no logic to test
13 Localization MINOR N/A No resource files changed
14 Documentation MINOR ✅ PASS PACKAGE.md accurately reflects the new shipping state; the always-preview rationale is clearly explained. The SuppressFinalPackageVersion property name is appropriate to expose since the intended audience (dotnet/sdk team) will understand it
15 Scope Discipline META ✅ PASS Minimal and focused: exactly 2 files, only the properties that need to change plus a corresponding doc update
16 Error Handling MINOR N/A No runtime code
17 Resource Management MINOR N/A No runtime code
18 Observability / Telemetry MINOR N/A No runtime code
19 Configuration MINOR ✅ PASS New properties placed in the correct <PropertyGroup> block, with well-commented rationale
20 Race Conditions BLOCKING N/A No runtime code
21 License / Legal META ✅ PASS License inherited from repo root, consistent with all other shipping MTP packages
22 Intent vs. Implementation Consistency META ✅ PASS PR description, .csproj comments, and PACKAGE.md are all mutually consistent

Observations (non-blocking)

SuppressFinalPackageVersion analogy with MSTest.SourceGeneration (informational): The "Mirrors MSTest.SourceGeneration" note in the comment holds for the mechanism (SuppressFinalPackageVersion=true), though the analogy isn't exact — MSTest.SourceGeneration declares its own MSTestSourceGenerationVersionPrefix and MSTestSourceGenerationPreReleaseVersionLabel, while DotnetTest inherits both from src/Platform/Directory.Build.props and eng/Versions.props. This is fine (the intent is the same), but worth knowing if eng/Versions.props' global PreReleaseVersionLabel ever changes: the DotnetTest package label moves with it, whereas MSTest.SourceGeneration is independently pinned.

Pre-existing duplicate comment block (not introduced by this PR): The .csproj's large PackageDescription comment block repeats the paragraph starting with "Internal, source-only package for the 'dotnet test'..." verbatim. This pre-dates the PR; a follow-up cleanup would reduce noise.


Summary

All applicable dimensions pass. The change is clean, surgical, and correctly uses an established repo pattern (IsShipping=true + SuppressFinalPackageVersion=true) that is already in production for six other packages. The documentation update accurately reflects the new state. No blocking or major issues found.

@Evangelink
Amaury Levé (Evangelink) merged commit 5a81c1e into main Jun 24, 2026
49 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the evangelink-ship-internal-dotnettest-package branch June 24, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants