Repository navigation
[rel/4.5] Preserve MTP report causes and await canceled MSTest workers - #12297
Merged
Amaury Levé (Evangelink) merged 1 commit intoNov 9, 2026
Merged
Conversation
Backport the applicable portions of #12282 (17ea6d5) and #12288 (cb58053), retaining release APIs, target frameworks and experimental reporter versions. Include the paired test-only logging reliability corrections from #12237 (bacb282) and #12251 (87a1f43). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🧪 Test quality review — PR #12297
🧵 Parallel safety
STATUS: PARTIAL — the parallel-safety specialist was not run in this pass, so coverage is incomplete. This is not a clean result. Run /parallel-audit for a full assessment.
Per-test grades
Static review only. I did not run the mutation analysis, so Mutation is N/A throughout. No inline suggestions were posted because I could not anchor an exact edit to a changed line.
| Grade | Test | Mutation | Notes | How to improve |
|---|---|---|---|---|
| B (80–89) | new ReportExceptionDiagnosticsTests. |
N/A | One long scenario with a local helper; a failure doesn't isolate the report format. | Split into per-format tests, or compare the exact JUnit failure text with a raw-string literal. |
| B (80–89) | new TestExecutionManagerTests. and ...DependencyWorkers_ |
N/A | The 60s timeout fallback is deterministic. Asserts that nothing ran, but not the 2nd worker's skip reason. | Also assert the exact outcome of the second test when cancellation was requested. |
| A (90–100) | new TestResultCaptureHelperTests. (4 data rows) |
N/A | Covers each state type with the cause text asserted. | — |
| A (90–100) | new TestResultCaptureHelperTests., ...ExplanationWithNestedException_, ...SimpleThrownException_, TryCapture_ |
N/A | Focused scenarios with exact or boundary assertions. | — |
| A (90–100) | mod DiagnosticLoggingInformationTests. |
N/A | Rendezvous-based with bounded waits and both sync and async paths. | — |
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.
🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · 31.3 AIC · ⌖ 0.722 AIC · ⊞ 7.6K · ◷
Petr Pokorny (0101)
approved these changes
Nov 9, 2026
Amaury Levé (Evangelink)
deleted the
dev/amauryleve/release-4-5-backports-578
branch
November 9, 2026 19:52
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.
Pull request
Summary
Backport the remaining applicable reporter and worker-start cancellation fixes to
rel/4.5, with the paired logging-test reliability corrections.17ea6d5771408b3da32413f6a76f59ef982c869dcb5805342d403ed9f7e7ddd116c81fee789ef7f9bacb2826dbf20a0192a6753a61a98743faf5d4f8and87a1f43d3cc04608b5b8b0f662b1fd3a9583518dThis is one commit and 10 files. The base already includes the independently merged Retry/TRX backport #12290; this PR does not duplicate it.
Design and decision record
These are servicing fixes using the upstream rationale and regression tests in the linked PRs, not a new feature or architecture. A separate design document is not needed.
Keep all release target frameworks, public/shipped API baselines and CLI options unchanged. In particular, keep CTRF and JUnit on their existing experimental
1.0.0-devversion family rather than importing main's JUnit graduation. Package readmes describe the corrected diagnostics without changing that policy.Exclude main-only agent guidance, the absent
CompatibilityPolyfillTestsfixture, the absent HangDump lifecycle fixtures from #12285, new features, retargeting and unrelated refactors/dependency updates.Consumer contract: an ordinary net10.0 executable consumes freshly packed MTP
2.5.3-dev, HTML2.5.3-dev, CTRF1.0.0-devand JUnit1.0.0-dev. Its application owns and flushes the reporters before exit. Five distinguishable results must retain their associated UID/name/outcome, explanation and causes in each final artifact. Four intentionally failing/error results make the child exit 2; the outer acceptance case must pass with exit 0. No handshake, capability, fallback, schema or multi-module protocol is changed.Demonstration
The actual packed consumer produced five results in each of CTRF, HTML and JUnit:
NestedFailure,AggregateFailure,ExplainedFailure,SimpleFailureandPassingTest. The acceptance case asserts their individual identities and outcomes rather than searching the whole report for expected strings.Before the fix, expanding
NestedFailureshowed its type/message but no inner trace. After the fix, the rendered HTML includes:Inspected the generated HTML in the browser at 1280x721 CSS pixels and in a constrained 479x699 embedded viewport. Expanded nested and aggregate results, checked the errored filter, literal markup/quotes, both aggregate branches and wrapped diagnostic blocks. The inspected diagnostic blocks fit their available width without horizontal clipping. The surrounding page still showed horizontal overflow at the constrained size; no HTML/CSS/layout change is included here.
Rendered captures were inspected locally. This text excerpt avoids publishing the report header's environment/machine metadata.
Validation and regression proof
Validated head:
279c8710539dfb83ab7f6f683f29ffc7b0ac2f3f, treef2f4df706c8e7b0e8391e1d72d834b2c71a2caf8, parenta230ee4bb0d84452157ae568528a12069af76732.The exact-head counterfactual reverses only the three production-file fixes, retaining byte-identical regression tests, logging repairs and all incoming release changes. Counterfactual patch SHA-256:
F519CCD2D0E85BAC7DD4ED905439700885568FB7F623C5A5D2AD818390EBDFFB.Both counterfactual and restored-final full Release builds/packs passed with exit 0, zero warnings/errors, all release targets including classic UWP, and package content/metadata validation intact. The repository-pinned SDK was
12.0.100-alpha.1.26480.103. Final working-tree source was restored exactly to the committed revision.Test-value evidence
RunTests_CancelledWhileStartingParallelWorkers_WaitsForScheduledWorkersandRunTests_CancelledWhileStartingDependencyWorkers_WaitsForScheduledWorkersrun.IsCompletedunexpectedly true, one worker scheduled instead of two, and the premature cancellation exception.TestResultCaptureHelperTests, includingTryCaptureCore_NestedException_PreservesInnerDiagnosticTrace,TryCaptureCore_AggregateException_PreservesAllInnerDiagnostics,TryCaptureCore_ExplanationWithNestedException_PreservesExplanationAndTraceandTryCapture_NestedException_KeepsDiagnosticTraceBoundedReports_NestedExceptions_PreserveAssociatedCausesAndExplanationsCTRF result 'nested' must retain its nested exception trace, outer exit 2.TestExecutionManagerTestsandCleanupCancellationIsolationTestscontrolsWIN_UIcompilation excludes three deployment cases: 33 cases on each other TFM, 30 on WinUI. Packed controls exercise normal/failure/cancellation/timeout paths, reflection/source generation and Framework failure identities, and assert loaded adapter bytes against the current package.DiagnosticLoggingInformationTests, especially both rows ofSynchronousLoggerCreatedBeforeRelocationWaitsForReplacementFinal matrix: 326 passing focused executions, zero failures/skips. This total includes the separately selected worker regressions also exercised by the complete manager class.
Commands and outcomes
Commands ran from the backport worktree. Only task-owned binlog/results directories are parameterized below. Each discovery command used the same selector as its execution.
Discovery used
--list-testsplus the corresponding filter and--no-ansi, without execution reporters. All discovery commands exited 0. The canonicalverify_execution.pyfrom main, blob3b5e3831555cc756dd9d3ff812cfd3c6f7e9abe2, verified both package-consuming selections against source-derived exact case names (1 report case and 13 cleanup cases).The local build launcher/PATH setup and execution-plan formatting/count issues were resolved before accepting the final proof. They were not counted as behavioral failures.
Package provenance
Each compared state was repacked before its consumer ran. Separate fresh consumer caches were verified in
project.assets.json; all four executed Core/CTRF/HTML/JUnit DLLs matched the selectedlib/net9.0entries in that state's shipping packages byte-for-byte. The three reporter binaries differ between the red and green variants; Core remains identical. The green packages identify the exact validated head above.0E2FAECBBF99C707187EE546ED8E882C8FC0C53C1C49AD23C5BB1F4975A14374AE8E34255FDAC48D4052471BC45E5F8F96889C799E09212620A5247F3DA5BD6DD29FCA7F42E84C3942D5C00BBA03FFBDC57E6BB04D36A5E355B9D40DABCE049310E70C5CCAAAFD90C410E68FCD9AF641ED37AB86FE190807A8FEC51E05F8DE8EBinlogs, TRX reports, source-state patches and package/binary manifests are retained in task-owned local artifacts, not represented as public artifact links. Validation was on Windows; Linux/macOS, hosted CI for this PR head and hosted/IDE report consumers have not been verified. No auto-merge is requested.