Skip to content

Commit 31d9bc8

Browse files
EvangelinkCopilot
andauthored
Update affected-test packages for faster collection (#12193)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent a334176 commit 31d9bc8

3 files changed

Lines changed: 43 additions & 9 deletions

File tree

‎docs/affected-test-selection.md‎

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,46 @@ discovery path and Azure DevOps upload request, and ships both `netstandard2.0`
1919
extension, collector, CodeCoverage extension, and Azure DevOps provider. The currently consumed package versions
2020
are recorded in [`eng/Versions.props`](../eng/Versions.props).
2121

22-
The affected-test packages now use `18.13.0-preview.26530.1`, built from commit
23-
`fe4721e980b711722351edfd491577a03b8d4421`. This includes refill-on-completion collection scheduling: a completed
24-
child slot can start another batch without waiting for its sibling, retaining the two-child limit, cancellation,
25-
failure handling, and atomic map publication. The previous pin, `18.13.0-preview.26529.4`, already includes this
26-
scheduler fix; this update advances to the latest published build, not a different collection algorithm.
27-
The SDK version, collection budgets, shipping CodeCoverage version, and rollout gates are unchanged.
22+
The affected-test packages now use `18.13.0-preview.26553.4`, built from commit
23+
`eca1718b78e9adb640b700ede7b51ec97ed077fa`. This includes setup-aware collection batching on top of the existing
24+
refill-on-completion scheduler. Validated, correlated child execution timing permits batches of up to 256 test UIDs,
25+
amortizing repeated child initialization and collector setup. Unavailable or incompatible timing visibly retains
26+
the legacy 4-32 batch-size policy; an explicitly incomplete terminal-test inventory rejects the whole module map.
27+
Larger batches can conservatively associate more tests with a source, without removing tests or framework coverage.
28+
29+
The initial batch size of 16, minimum size of 4, two-child limit, cancellation, authoritative exits, and atomic map
30+
publication are preserved. The SDK version, collection budgets, shipping CodeCoverage version, and rollout gates
31+
are unchanged. Affected-test hosts resolve CodeCoverage `18.13.0-preview.26553.4` through the existing test-only
32+
`VersionOverride` in [`test/Directory.Build.targets`](../test/Directory.Build.targets). The affected-test, matching
33+
test-host CodeCoverage, and Azure DevOps storage packages at that version provide `netstandard2.0` and `net10.0`
34+
assets; older .NET and .NET Framework test hosts use the `netstandard2.0` assets. The separate shipping CodeCoverage
35+
pin remains `18.13.0-preview.26530.1`; it is not the CodeCoverage version loaded by these affected-test hosts.
36+
37+
**Test-value evidence (2026-11-03):** this dependency update is based on
38+
`d3ce600610baaebac245acdbd4162615f5dfcaae`; the dependency-metadata patch, excluding this document, has SHA-256
39+
`B067E3E0586E17320669B7E8B0190606782313DED83E3EB9B927F4C49129D3B4`. An identical clean, isolated 512-case consumer
40+
was built against affected-test, storage, and test-host CodeCoverage packages all at `18.13.0-preview.26530.1` for
41+
the previous variant and all at `18.13.0-preview.26553.4` for the new variant, using separate caches. The retained
42+
`project.assets.json` from the actual TestFx test-host build also resolves all three packages at
43+
`18.13.0-preview.26553.4`, confirming the existing override rather than a mixed shipping/test-host pairing.
44+
Both builds used SDK `12.0.100-alpha.1.26509.101`, Debug, Windows x64, published MTP/MSBuild
45+
`2.6.0-preview.26552.13`, and MSTest `4.6.0-preview.26531.5`. The modern consumer targets `net11.0` and runs on the
46+
SDK's bundled .NET 12 runtime; the second consumer targets `net481`.
47+
48+
Real SDK `--collect-test-map` commands exited 0 and retained all 512 exact discovered UIDs and their source
49+
associations per module. The unchanged `TimingFeedbackGrowsBeyondLegacyBatchCeiling` assertion failed against the
50+
old package's 32-UID maximum and passed against the new package's 128-UID maximum. Both new consumer TFMs reported
51+
nine measured batches, zero fallback, and the unchanged two-child cap. Independent per-case execution markers
52+
verified the work; the SDK's zero ordinary result count during collection is expected suppressed reporting, not
53+
evidence of zero execution. These checks demonstrate optimization sensitivity, not a full-CI speedup measurement.
54+
55+
Unchanged two-module affected selection exited 0 without starting test work; a missing module map fell back to
56+
all 512 passing cases; an intentional single-case failure retained SDK exit 2. The actual TestFx test-host graph
57+
also restored and built with the new dependencies, and `TerminalResources_AreCompiledIntoThisAssembly` and
58+
`SharedTerminalTypes_AreUsable` both executed and passed with fresh TRX verification. The repository build-wrapper
59+
pack attempt was blocked by Windows PowerShell lookup during runtime bootstrap; direct pinned-SDK build and
60+
consumer validation succeeded. Full CI collection performance, non-Windows native collection, live Azure artifact
61+
publication, cancellation, and partial-feedback paths were not exercised by this dependency update.
2862

2963
Generated acceptance assets need the shipping CodeCoverage package in their local feed even when the affected-test
3064
host uses a newer preview. The MSTest acceptance project downloads that shipping package separately and stages it

‎eng/Version.Details.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
1818
<Sha>fe4721e980b711722351edfd491577a03b8d4421</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.Testing.Extensions.AffectedTests" Version="18.13.0-preview.26530.1">
20+
<Dependency Name="Microsoft.Testing.Extensions.AffectedTests" Version="18.13.0-preview.26553.4">
2121
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
22-
<Sha>fe4721e980b711722351edfd491577a03b8d4421</Sha>
22+
<Sha>eca1718b78e9adb640b700ede7b51ec97ed077fa</Sha>
2323
</Dependency>
2424
<Dependency Name="MSTest" Version="4.6.0-preview.26531.5">
2525
<Uri>https://github.com/microsoft/testfx</Uri>

‎eng/Versions.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PropertyGroup Label="MSTest prod dependencies - darc updated">
1010
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>12.0.0-beta.26552.1</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
1111
<MicrosoftTestingExtensionsCodeCoverageVersion>18.13.0-preview.26530.1</MicrosoftTestingExtensionsCodeCoverageVersion>
12-
<MicrosoftTestingExtensionsAffectedTestsVersion>18.13.0-preview.26530.1</MicrosoftTestingExtensionsAffectedTestsVersion>
12+
<MicrosoftTestingExtensionsAffectedTestsVersion>18.13.0-preview.26553.4</MicrosoftTestingExtensionsAffectedTestsVersion>
1313
<!-- empty line to avoid merge conflicts for darc PRs to update CC and MSTest+MTP -->
1414
<MSTestVersion>4.6.0-preview.26531.5</MSTestVersion>
1515
<MicrosoftTestingPlatformVersion>2.6.0-preview.26531.5</MicrosoftTestingPlatformVersion>

0 commit comments

Comments
 (0)