Repository navigation
Ship Microsoft.Testing.Platform.Internal.DotnetTest as a preview package - #9400
Conversation
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]>
There was a problem hiding this comment.
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=trueso the package is published and can flow todotnet/sdkthrough normal dependency channels. - Add
SuppressFinalPackageVersion=trueto keep the package preview-suffixed even when the repo is producing “final/release” versions. - Update
PACKAGE.mdto 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]>
Amaury Levé (Evangelink)
left a comment
There was a problem hiding this comment.
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.
What
Promote the internal, source-only
Microsoft.Testing.Platform.Internal.DotnetTestpackage fromIsShipping=falsetoIsShipping=true, and addSuppressFinalPackageVersion=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=truepublishes it (signed) on the same2.3.0-preview.*train as the rest of Microsoft.Testing.Platform (it already inheritsVersionPrefix = $(TestingPlatformVersionPrefix)fromsrc/Platform/Directory.Build.props).SuppressFinalPackageVersion=truekeeps it preview even in stabilized/official builds (DotNetFinalVersionKind=release), so a stabilized MTP release never accidentally publishes a stable package namedInternal. This mirrors howMSTest.SourceGenerationpins itself to preview. The shared-source surface is still partial (models/serializers not shared yet), so always-preview is intentional.The
Internalname + the-previewsuffix keep it clearly an implementation detail, not a public API.Validation
build.cmd -packon this project succeeds with 0 warnings and lands the package inartifacts/packages/<config>/Shipping/(Microsoft.Testing.Platform.Internal.DotnetTest.2.3.0-dev.nupkglocally;2.3.0-preview.*in CI/official).PACKAGE.mdis auto-wired as the package readme byDirectory.Build.targets.Follow-up
The consuming side is drafted in dotnet/sdk#54959 (replaces the hand-copied
IPC/ObjectFieldIds.cs+Terminal/reporter with aPackageReference). It needs this package to publish + flow into dotnet/sdk before the namespace/reporter reconciliation can be completed.