Repository navigation
[rel/4.5] Coalesce HangDump activity signals (#12167) - #12231
Conversation
There was a problem hiding this comment.
🧪 Test quality review — PR #12231
🧵 Parallel safety
STATUS: PARTIAL — the pre-step inputs (changed-file lists) were empty, so the parallel-safety specialist was not run. Not a clean result. New unit tests use Task.Delay/gates and private-field reflection per instance; no shared static state was spotted in a quick read.
Per-test grades
| Grade | Test | Mutation | Notes | How to improve |
|---|---|---|---|---|
| C (70–79) | new HangDumpActivityIndicatorMutationTests. |
N/A | No assertion; passes whenever nothing throws. | Assert _activitySignalTask is still null after the call. |
| A/B (not individually graded) | other new/modified tests in HangDumpMutationTests, HangDumpTests, HangDumpActivityCoalescingTests |
N/A | Skimmed only: assertions are specific (exact intervals, deferred disposal, period splitting). | — |
This advisory review is heuristic and non-blocking. Re-run with /review-tests, or /parallel-audit for the specialist.
🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · 36.3 AIC · ⌖ 0.721 AIC · ⊞ 7.6K · ◷
This comment has been minimized.
This comment has been minimized.
|
Final test-triage resolution — Azure Pipelines build 1666239 Result: actionable, deterministic test failure in this PR. Confidence is high that it is not a flake. No issue is created because this is a one-off on this PR and below the durable-issue thresholds. Affected legs: Linux Release and Windows Release, Failing test: Signature:
Next step: make the new test's asset fixture build or declare the Not product failures:
|
There was a problem hiding this comment.
🧪 Test quality review — PR #12231
🧵 Parallel safety
STATUS: PARTIAL. The pre-step input files were empty, so I did not run the parallel-safety specialist and this PR has no parallel-safety coverage. Notes:
HangDumpActivityCoalescingTestsbuilds a uniqueGuidresult directory but shares one generated asset, which is fine.- The unit tests use per-test instances.
Per-test grades
| Grade | Test | Mutation | Notes | How to improve |
|---|---|---|---|---|
| C (70–79) | new HangDumpActivityIndicatorMutationTests. |
N/A | No assertion; it only checks that no exception is thrown. | Assert that `_activitySignalTask` is null after the call. |
| A/B (80–100) | new HangDump_BurstOfResults_, the other new Dispose/GetActivitySignalInterval/InactivityTimer tests in HangDumpMutationTests, and GetTimerPeriod_* and ActivityTimer_* in HangDumpTests |
N/A | I only did a quick pass on these tests and did not grade each one individually. | — |
This advisory review is heuristic and non-blocking. Re-run with /review-tests or /parallel-audit.
🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · 32.7 AIC · ⌖ 0.72 AIC · ⊞ 7.6K · ◷
Derive the plain/TRX rows from the same TargetFrameworks.Net list used by the generated fixture. FastAcceptanceTest intentionally omits net8.0, so hard-coded rows requested outputs CI never built. Normal mode retains all four rows and all shipping-host assertions are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fixed in 7805195. The cause was the CI Reproduced the exact fast-mode failure before editing (2 passed, 2 failed). After the fix, the packed-host selection passes in fast mode (2/2) and normal mode (4/4, retaining .NET 8), with no skips and one acknowledged activity signal per 5,000 results. The refreshed HangDump pack and both targeted runner builds also pass. Live CI on the pushed head is still pending. |
There was a problem hiding this comment.
🧪 Test quality review — PR #12231
🧵 Parallel safety
PARALLEL-SAFETY RESULT
STATUS: PARTIAL
NOTES: The parallel-safety specialist was not run to completion; coverage is incomplete and this must not be read as CLEAN.
END PARALLEL-SAFETY RESULT
A light manual read of HangDumpMutationTests.cs found no obvious shared static state. The tests build their own indicator instances and use gated TaskCompletionSources. Please run /parallel-audit for a complete assembly-scoped result.
Per-test grades
Coverage is limited: this is a reduced-depth review of HangDumpMutationTests.cs. Per-test letter grades and inline suggestions were not produced, so no test is reported as A.
Observations, not grades:
- Several tests read and write private fields by reflection (
_exitSignalActivityIndicatorAsync,_activitySignalPending,_activitySignalTask,_namedPipeClient._disposed). That couples them to implementation names, so a rename breaks them silently or loudly. Prefer an internal seam orInternalsVisibleTomember where practical. AssertDisposalWaitsForLoopAsyncasserts "not completed" after a fixedTask.Delay(100). This can only produce false passes, never false failures, but it is a weak negative check. A deterministic rendezvous would be stronger.ConsumeAsync_TracksOnlyRunningAttemptsAndEmitsTraceDiagnosticscovers several transitions in one method. Splitting it would make failures easier to diagnose.OnTestSessionFinishingAsync_AfterDispose_DoesNotTouchTheDisposedLoophas no explicit assertion. It only checks that no exception is thrown.
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 · 27 AIC · ⌖ 0.714 AIC · ⊞ 7.6K · ◷
Make the post-finishing loop-state invariant explicit in the focused lifecycle regression, retaining its original no-throw check. Addresses review comment 4483349478. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
Backport #12167, Coalesce HangDump activity signals instead of one IPC round trip per test, to
rel/4.5.Preserve the upstream contract: result consumption only marks pending activity; the single-flight background loop sends at timeout/10, clamped to 10 ms–1 s; session finishing stops/awaits the loop before its final flush; cancellation, error reporting, idempotent/bounded disposal and deferred pipe disposal remain intact. Both processes use the same timeout + interval inactivity-timer formula, including timer-period splitting at the maximum supported timeout, so coalescing does not cause an early dump. Timeout parsing/defaults and the absolute CI deadline behavior are unchanged. No public API, CLI option or dependency changes.
Provenance and servicing adaptation
165333f32123111b70b3ead7f53e40e431c02055.72fd2b4b64ea00b275e0c18b1aeb36159348c1c7.e86e86244840fc7a72715e8177b216b1b4da7115.8260cd998f94be0fd7324fc0903d0a9b7bf45429.HangDumpActivityBehaviorTests.cs,HangDumpInProcessLifecycleTests.csandHelpers/HangDumpInProcessProtocolFixture.csdo not exist on this release. Rather than import those broader suites and their fixture dependencies, retain the focused upstream regressions already supported by the release and add one self-contained packed-consumer fixture covering four coalescing cases.Exact changed paths (7 files; 739 insertions, 23 deletions):
Release validation
Windows x64, repository-pinned SDK
12.0.100-alpha.1.26480.103, bootstrapped through the build scripts. Runtime executions use bootstrapped .NET 8.0.33 and 10.0.14, .NET 9.0.22 for the unit suite, and the net462 legacy path. Packages were built before commit from the exact committed production changes; the final targeted runner includes the committed acceptance-test content.FullyQualifiedName~HangDump, net8.0FullyQualifiedName~HangDump, net9.0FullyQualifiedName~HangDump, net462The 12 packed-host cases are:
HangDumpActivityCoalescingTests.HangDump_BurstOfResults_CoalescesAcknowledgedActivityBeforeExit: net8.0 and net10.0, each with and without TRX. Every app completes 5,000 results, sends one activity signal, and receives one acknowledgement; the conservative allowed maximum is two. TRX-enabled cases also contain all 5,000 results.HangDumpTests.HangDump_DefaultSetting_CreateDump: net8.0, net10.0, net462; real inactivity-triggered dump creation and non-graceful host exit.HangDumpTests.HangDump_AbsoluteDeadline_CreateDump: net8.0, net10.0, net462; real deadline-triggered dump creation while the inactivity timeout is 30 minutes.HangDumpTests.HangDump_WithDotnetTest_NoHangButOverallTimeGreaterThanTimeout_ShouldPass: succeeds without a dump even though the two active tests together exceed the configured inactivity timeout.HangDumpPlusTrxTests.HangDumpPlusTrx_WhenTestHostHangs_RecoversCompletedResultsAndFailedResultSummary: real dump/kill path, recovered completed result, absent unfinished result and failed TRX summary.Executed build commands (both final commands passed with exit 0 and zero warnings/errors):
The acceptance runner is built on the installed .NET 10 runtime because the default runner TFM is net11.0 while this release's
global.jsonbootstraps 8/9/10 runtimes. This is a validation-only property override, not a repository/framework migration; the generated shipping apps still use the release matrix.Executed direct-host selections are shown below with local reporting flags omitted. Each actual invocation also used
--report-trx, a phase-specific TRX filename and a task-owned results directory.DOTNET_ROOTandPATHwere set to the repo-local.dotnet; the generated assets' restore folders and executed DLL hashes were inspected to rule out stale/shared package consumption.An initial dotnet-engine pack with
SkipUapTargetFramework=truefailed the unchanged MSTest package-layout audit because UAP files were absent. This was resolved by the compatible installed desktop MSBuild 18.11 and a complete UAP-inclusive pack; no validation was disabled and no unrelated package metadata was changed. The failed net8.0 runner-build attempt exposed an existing net9+Lockhelper; the final net10.0 runner build succeeds without modifying it.Genuine behavioral red/green and test value
Before changing source, build and preserve the exact release-baseline HangDump package using:
Keep the committed coalescing tests and app source unchanged; replace only the HangDump package in this worktree's shipping feed with that preserved baseline, run all four cases, then restore the exact candidate in
finallyand rerun. Other aligned MTP/TRX packages stay unchanged. Both sides compile and launch successfully and complete all 5,000 app results.The red phase is four executed assertion failures, process exit 2, not a build, discovery, launch, skip or zero-test failure. Parsed TRX counters/identities reconcile for the 483 unit cases and each acceptance phase. Actual app DLL hashes match the corresponding package's net8.0/net9.0 payload; net10.0 consumes the net9.0 shipping assembly.
B61F274CEEA4363C1FAA8B4B02BE1E6B9C2E4C8F61AE8CC2A4FBEB61EC2AFE8B.43C16B39E62BBE6B46A8F712F90C6083FDABB6E73735FBF902DAAE6D5E9C8EB8.Upstream regression identities retained include
ConsumeAsync_CoalescesActivityInsteadOfSendingAnIpcRequestPerResult,GetActivitySignalInterval_IsATenthOfTheTimeoutWithinBounds,InactivityTimer_NeverExpiresBeforeTheTimeoutSinceTheLastActivity, bothDispose*_WaitsForInFlightActivitySignalBeforeReturningpaths, bounded/deferred/repeated disposal cases,OnTestSessionFinishingAsync_CanceledSessionWithPendingActivity_CompletesSoLaterHandlersRun, and maximum timer-period splitting. Their state, cancellation, gate and timer-bound assertions executed on release TFMs. The executed shipping red/green specifically proves the per-result IPC regression; no separate mutation kill rate is claimed for the other families.Evidence limits and media
No Linux/macOS execution or live-CI success is claimed; those remain CI coverage. No wall-clock speedup benchmark is claimed: elapsed launch time only provides a conservative signal-count bound, not a performance threshold. Binary logs, package/binary snapshots and phase-specific TRX results are retained in task-owned app artifacts, not uploaded as public attachments.
No screenshots/video are included: this is an internal IPC/lifecycle/timer change, and the exact source patch plus executable shipping-host red/green evidence are more useful than visual media. This PR is not merged and auto-merge is not enabled.