Skip to content

Update affected-test packages for faster collection - #12193

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/test-package-update
Nov 4, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/test-package-update

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Pull request

Summary

Affected-test collection repeatedly pays for child initialization, so the legacy 32-UID batch ceiling wastes setup time. Update the shared affected-tests/Azure DevOps storage pin from 18.13.0-preview.26530.1 to 18.13.0-preview.26553.4, which contains the merged setup-aware batching fix, and synchronize dependency provenance.

The existing test-only CodeCoverage override follows this pin. Shipping CodeCoverage, the SDK, collection budgets, two-child concurrency limit, and rollout gates remain unchanged.

Design and decision record

Maintained rollout and validation record. This adopts the published upstream fix rather than introducing a new collector implementation or tuning concurrency. Package nuspecs and upstream history confirm source commit eca1718b78e9adb640b700ede7b51ec97ed077fa.

Validated timing permits batches up to 256 UIDs; unavailable/incompatible timing retains the legacy 4-32 policy. Larger batches can conservatively associate extra tests with a source. Initial/minimum sizes, cancellation, authoritative exits, and atomic map publication are preserved.

Demonstration

Readable results from the real packaged 512-case startup fixture are clearer than screenshots for this dependency-only update. No UI/layout change is authored here.

Package / consumer Observed batches Exact mapped UIDs / sources Timing feedback
Previous package, modern .NET 16-32 512 / 1 Legacy policy
New package, modern .NET 16-128 512 / 1 9 measured, 0 fallback
New package, .NET Framework 4.8.1 16-128 512 / 1 9 measured, 0 fallback

Each collection exited 0 and retained every discovered UID/source association. Per-case execution markers independently verified all work; the SDK's ordinary result count of zero during collection is expected suppressed child reporting, not proof of zero execution. This is not a statistical or full-CI speedup claim.

Validation and regression proof

Tested patch SHA-256: 8948579DBC89446B3244F48B3879BFC55116F7A34BC8F0DB37CE628D92D876B7, now committed unchanged as 28c7eb7b8694fd4f020d89f37943cbe3542da290 on base d3ce600610baaebac245acdbd4162615f5dfcaae. Windows x64, Debug, pinned SDK 12.0.100-alpha.1.26509.101.

$project below is test\UnitTests\Microsoft.Testing.Platform.TerminalReporterContract.UnitTests\Microsoft.Testing.Platform.TerminalReporterContract.UnitTests.csproj; $filter is FullyQualifiedName~TerminalReporterContractTests. $evidence denotes the retained session artifact directory. MSBuild invocations used unique binlogs.

Exact command Result
pwsh -NoProfile -File .\eng\validate-affected-tests.ps1 -SelfTest -EnableAffectedTests true -EnableNonWindowsAffectedTests false Exit 0; staging guard, 19 Windows isolation and 39 non-Windows rollout checks passed.
pwsh -NoProfile -File .\eng\validate-affected-tests.ps1 -SelfTest -EnableAffectedTests false -EnableNonWindowsAffectedTests true Exit 0; same checks passed.
.\.dotnet\dotnet.exe restore $project -p:TargetFramework=net11.0 -nr:false "-bl:$evidence\repo-package-restore-{}.binlog" --verbosity minimal Exit 0; actual TestFx graph resolves the updated packages without downgrades.
.\.dotnet\dotnet.exe build $project -c Debug --no-restore --disable-build-servers -p:TargetFramework=net11.0 "-bl:$evidence\repo-package-build-{}.binlog" --verbosity minimal Exit 0; two existing NU1510 pruning warnings, no errors.
.\.dotnet\dotnet.exe test --project $project -f net11.0 -c Debug --no-build -p:TargetFramework=net11.0 -p:TestingPlatformCommandLineArguments= -p:TestRunnerAdditionalArguments= "-bl:$evidence\repo-clean-tests-{}.binlog" --filter $filter --report-trx --results-directory "$evidence\repo-test-results" --no-ansi Exit 0; TerminalResources_AreCompiledIntoThisAssembly and SharedTerminalTypes_AreUsable both executed and passed. Fresh TRX verified by the existing execution gate.

Both package variants were restored/built in separate clean fixture checkouts and caches. Actual restored/copied DLLs and nupkg hashes were verified. They use published MTP/MSBuild 2.6.0-preview.26552.13 and repository-pinned MSTest 4.6.0-preview.26531.5; fixture TFMs are net11.0 (running on the SDK's bundled .NET 12 runtime) and net481. The upstream published packages, rather than local repacks of those independently shipped components, are the payloads under test.

Additional real SDK checks: unchanged two-module affected selection exited 0 without test work; missing-map fallback executed/passed all 512 cases; a filtered intentional CollectableCase_0000 failure reported exactly one failure and preserved SDK exit 2.

Logs, binlogs, maps, package hashes, the exact fixture/verifier source archive, and result reports are retained locally, not uploaded. The build-wrapper pack attempt was blocked by Windows PowerShell lookup during runtime bootstrap; direct pinned-SDK build and consumer checks passed. Full CI collection performance, non-Windows native execution, live Azure artifact publication, cancellation, and partial-feedback paths were not exercised here.

Test-value evidence

Retained identical CollectableCase_0000 through CollectableCase_0511 fixture source and assertions, changing only the affected-tests/storage/matching-CodeCoverage package version.

Contract / assertion Previous package Updated package
Exact inventory, UID/source association, and execution-marker checks Executed: 512/512 retained Executed: 512/512 retained on both TFMs
TimingFeedbackGrowsBeyondLegacyBatchCeiling Executed: detected; assertion failed at maximum 32, verifier exit 1 Executed: passed at maximum 128; verifier exit 0 on both TFMs

The comparison command shape was dotnet build CollectionSmoke.csproj -c Debug --disable-build-servers -p:AffectedTestsVersion=<variant> -p:TreatWarningsAsErrors=true with unique binlogs, followed by native dotnet test --project CollectionSmoke.csproj -f <TFM> -c Debug --no-build -p:AffectedTestsVersion=<variant> --list-tests json --no-ansi and the same command replacing --list-tests json with --collect-test-map. The old variant was 18.13.0-preview.26530.1; the new default came from this PR's eng\Versions.props. Builds and collection exited 0 in each compared state. The same independent four-check verifier passed all four for each updated consumer and failed only the growth assertion for the old consumer. Setup failures are not counted as red-phase evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 23:06
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 3, 2026

@github-actions github-actions Bot 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.

🧪 Test quality review — PR #12193

Compared merge base d3ce600610baaebac245acdbd4162615f5dfcaae with head 28c7eb7b8694fd4f020d89f37943cbe3542da290. Evidence applies to this head, not every intermediate commit.

Test-value evidence

The PR changes docs/affected-test-selection.md, eng/Version.Details.xml and eng/Versions.props. It bumps the affected-tests/storage package pin from 18.13.0-preview.26530.1 to 18.13.0-preview.26553.4, and the version bump carries the behavior change.

  • Contract: Setup-aware batching in the upstream package lets affected-test collection batch more than 32 UIDs.
  • Test or check: TimingFeedbackGrowsBeyondLegacyBatchCeiling in the author's external fixture, not in this repository.
  • Counterfactual: The old package version.
  • Evidence status: Unverified by this workflow. The PR description reports executed results: the old package fails the growth assertion at a maximum of 32, and the new package passes at 128 on both TFMs. This workflow ran nothing and had no access to the logs or artifacts, so it can't confirm those results. The author says the artifacts were retained locally and not uploaded.
  • Repository tests: None changed. No repository test asserts the new batching behavior.

🧵 Parallel safety

NOT_APPLICABLE. No changed tests or parallelization configuration were in scope.

Per-test assessment

No test methods changed, so there is nothing to grade (Not applicable).

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~26 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Summary: This is a dependency-only bump of AffectedTests from 26530.1 to 26553.4. Version.Details.xml and Versions.props are consistent, and the new Sha is only on the AffectedTests entry. I found one issue, which is in the docs.

Finding (inline): The test-value evidence says the consumer was validated against "matching CodeCoverage packages", but the repo keeps CodeCoverage at 26530.1. The docs also credit CodeCoverage with new netstandard2.0/net10.0 assets. The validated combination may therefore differ from the one shipped. Please reword both statements, or confirm the exact versions used.

Not verified:

  • I did not run the evidence, and I did not check that the Sha eca1718b... or the package version exists on the feed.
  • The doc says full CI performance, non-Windows collection and the Azure upload path were not exercised.

Comment thread docs/affected-test-selection.md Resolved
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 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.

🔵 Needs a closer look

The metadata-only diff lacks the external collector’s source and retained comparison artifacts, preventing independent verification of package compatibility and collection/cancellation behavior.

No open issues 🎉

What changed in this PR

Updates TestFx’s affected-test dependencies to adopt upstream setup-aware batching, reducing repeated child initialization while preserving existing collection limits and rollout gates.

Changes:

  • Advances the shared affected-tests package pin to 18.13.0-preview.26553.4, including consumers using it for storage and test-only CodeCoverage.
  • Synchronizes dependency provenance with upstream commit eca1718b78e9adb640b700ede7b51ec97ed077fa.
  • Documents batching behavior, compatibility, reported validation, and remaining validation gaps. Shipping CodeCoverage remains unchanged.

Test-value evidence: For revision 28c7eb7b8694fd4f020d89f37943cbe3542da290, the PR reports that the same 512-case fixture detected the old 32-UID ceiling and passed with batches reaching 128 on both tested frameworks. Supporting artifacts are retained locally and were not independently verified here.

File Description
eng/​Versions.props Updates the shared affected-tests dependency version.
eng/​Version.Details.xml Aligns the dependency version and source commit provenance.
docs/​affected-test-selection.md Records batching behavior, compatibility, validation results, and limitations.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 23:26
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026

@github-actions github-actions Bot 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.

🧪 Test quality review — PR #12193

Compared merge base d3ce600610baaebac245acdbd4162615f5dfcaae with head 30dd7f909e6f4445cedaf47d5ad60fbbf7a9a260. Evidence applies to this head, not every intermediate commit.

Test-value evidence

Changed files: docs/affected-test-selection.md, eng/Version.Details.xml, eng/Versions.props. The package pin moves from 18.13.0-preview.26530.1 to 18.13.0-preview.26553.4, and that bump carries the behavior change.

  • Contract: setup-aware batching lets affected-test collection batch more than 32 UIDs.
  • Test or check: TimingFeedbackGrowsBeyondLegacyBatchCeiling in the author's external fixture. No repository test covers it.
  • Counterfactual: the old package version.
  • Status: Unverified by this workflow. The PR description reports an executed old-package failure (max 32) and new-package pass (max 128) on both TFMs. Its artifacts are retained locally and were not available to check. This is not paired execution proof.
  • Docs: not applicable, because they are not executable.

🧵 Parallel safety

NOT_APPLICABLE. No changed tests or parallelization configuration were in scope.

Per-test assessment

No test methods changed, so there is nothing to grade (Not applicable).

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~21 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 3, 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.

🔵 Needs a closer look

The updated collector implementation and retained paired-run artifacts are unavailable, preventing independent verification of cancellation, fallback and incomplete-feedback safety, and full CI collection from the dependency-only diff.

No open issues 🎉

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Final test-triage resolution — Azure Pipelines build 1662738

Result: inconclusive. No issue created. The evidence is incomplete (1 artifact download failed, and history hit its download budget), so this is not a clean bill of health.

Failure signature

  • The failing legs are Windows Release and Linux Release.

  • The failing tests are acceptance tests that run dotnet publish or dotnet build on NativeAOT assets. Examples:

    • NativeAotTests_WillRunWithExitCodeZero
    • NativeAotTests_RejectsAsyncVoidTestMethods
    • NativeAotTests_HonorsGeneratedInheritedTypeAndMethodMetadata
    • NativeAot_Smoke_Test
    • MSTestSdk_SourceGenerationOptIn_NativeAotLibraryBuilds
    • MSTestSdk_SourceGenerationOptIn_VSTestTakesPrecedenceOverNativeAot
  • They fail at restore with the same error: NU1903: Warning As Error: Package 'Microsoft.DotNet.ILCompiler' <10.0.12 | 11.0.0-rc.2.26504.105> has a known high severity vulnerability (GHSA-p3jp-9v83-76w9).

  • The tests run with TreatWarningsAsErrors=true, so NuGet audit warnings fail the restore.

Assessment (medium confidence)

  • This points to a new NuGet vulnerability advisory on the ILCompiler packages, not to a regression in the code under test. These are test-asset restore failures, not assertion failures.
  • The latest scheduled main build in history (1662146) succeeded, so the advisory probably landed after it.
  • The PR title ("Update affected-test packages for faster collection") makes a contribution from this PR plausible, but I could not confirm that from the evidence.
  • No crash or hang diagnostics were found, and there are no slowness regressions.
  • No open or closed issue matched NU1903 ILCompiler.
  • Other main builds will likely hit the same failure. If it recurs on two or more independent builds, it should become a durable issue.

Next step: pin or update the ILCompiler version, or suppress NU1903 for these generated assets (for example NuGetAuditSuppress for the advisory, or WarningsNotAsErrors). Then re-run the legs. Other build legs and the missing artifact may still change this conclusion.

🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto · ~37 AIC · ⌖ ~1 AIC · ⊞ 10K

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 31d9bc8 into main Nov 4, 2026
39 of 42 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/test-package-update branch November 4, 2026 08:59
@github-actions github-actions Bot removed the state/approved Proposal approved; ready for implementation. label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants