Repository navigation
[rel/4.5] Handle uncorrelated JSON-RPC errors without ending MTP sessions - #12286
Conversation
Accept explicit null IDs only for genuine error responses. Preserve request correlation and shutdown accounting across the platform and source-only client, with modern and Framework packaged regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 9ab03e7)
This comment has been minimized.
This comment has been minimized.
|
Final test-triage resolution — Azure Pipelines build 1670978 Analysis is final and the evidence is complete. The PR head and merge SHAs match the build's SHAs. History from up to 12 prior builds on 1. Probable PR-related failure:
2. Likely flake or timing-sensitive:
3. Expected, not defects: No crash or hang diagnostics were collected. No issue is created, since the durable-issue thresholds are not met. Finding 1 should be fixed in this PR.
|
Backport of #12283 to
rel/4.5for MSTest 4.5.3 / MTP 2.5.3.Relates to #12261. This is a non-closing servicing reference; the issue discussion remains coordinated by the main PR.
Accept explicit
id: nullonly on genuine JSON-RPC error envelopes. Diagnose an uncorrelated error without replying, completing another pending call, coercing the ID to zero, or leaking server request-counter accounting. Keep the existing request, success, cancellation, numeric-ID and canonical-string-ID rules. Pending client calls still require a later correlated response, cancellation, EOF or disposal; this does not recover lost messages.The
cherry-pick -xretains the original co-author trailer. Release-only adaptations preserve the branch's serializer style and internal API baseline, recreate only the new host regression and its minimal fixture because main's host test file is absent here, use the release's packednet8.0/net9.0server assets andnet8.0source-client slice, and retain both new Windowsnet48cases. No new public API, malformed-frame recovery, capability, timeout, Unicode/ASCII-escaping workaround, or test serialization was introduced.Test-value evidence
All evidence below was executed on this servicing branch, not inherited from main:
a39964ce2cf09c4abcbaa7bb8f4e5818638a9de3.88b4bd31a13875e890bde34e21087c80c4e6c357.9ab03e7774cb99667362e88e0157dc2d10e89fb1, from main source base127798de9bd5c3f7204dc8932cddf043bf4bd6c6.12.0.100-alpha.1.26480.103; Windows desktop MSBuild; Debug shipping packages.net8.0net9.0net462net8.0net462net11.0The 952 unit results comprise 942 passed and 10 existing OS-conditioned Unix skips. All 96 new unit-regression executions passed. Every discovered UID matched exactly one TRX result, including all data rows; six nonempty TRX files were parsed, not inferred from process exit codes. All 17 acceptance/source-package cases executed and passed, with no skips or retry masking, retaining assembly-level
MethodLevelscheduling and unique per-test generated assets. The protocol schema's 15 positive/negative envelope cases also passed.The new unit cases cover null-error payload preservation/explicit-null serialization, malformed and missing-ID envelopes, normal success/cancellation rejection, non-null ID-kind preservation, throwing diagnostic sinks, pending response/cancellation/EOF/disposal paths, and
JsonRpcConnection_NullIdError_DoesNotCompleteRequestZero. In particular, both logger rows ofRunAsync_NullIdErrorsAreDiagnosedWithoutLeakingRequestCountspassed on all three core TFMs, and all five rows ofRunTestsAsync_NullIdErrors_PreservePendingRequestLifecyclepassed on both source-client TFMs.PackagedServer_NullIdErrorsPreserveDiscoveryExecutionAndExitnet8.0,net9.0PackagedFrameworkServer_NullIdErrorsPreserveDiscoveryExecutionAndExitnet48server usingnetstandard2.0platform assetPackagedFrameworkConsumer_NullIdErrorIsAcceptedAndRealServerRemainsUsablenet48packed source client using Jsonite, realnet8.0serverPackagedConsumer_LaunchesRealServer_DiscoversAndRunsExpectedNodenet8.0packed source client using System.Text.Json, realnet8.0serverThe two already-built packaged consumer executables were additionally launched directly. Both parent exits were 0 and both logs contained
UNCORRELATED ERROR ACCEPTED,DISCOVERED TestMethod1,EXECUTED TestMethod1, andOK. Nine consumer/server build binlogs were captured. The existing hostile-consumer compilation coverednet462,netstandard2.0, andnet5.0throughnet8.0with C# 12 and warnings as errors; the default-language consumer retained the SDK's default language version.Shipping provenance
Microsoft.Testing.Platform.2.5.3-dev.nupkg2.5.3-dev6CD097C0F8EC92D99372C239DDACCBE51D63017181DE4D9503EE94B8AF2ACEC8Microsoft.Testing.Platform.ServerMode.Client.Sources.2.5.3-dev.nupkg2.5.3-dev483DAADB5BF7436086723766968978988454A061FB0FCC8FD9F88AC9D8741D2AThe source package actually contains
netstandard2.0,net5.0compatibility, andnet8.0content slices. Both runnable consumers restored its exact matching ZIP payload into their own isolated cache: modernnet8.0selected thenet8.0slice; Windowsnet48selectednetstandard2.0. The machine's existing Visual Studio offline fallback folder was present but was not the source-package payload used. No shared cache, user, or machine setting was changed.The server tests asserted the actual loaded DLL path via
SERVER-ASSEMBLYand byte equality with the.nupkgentry before checking wire behavior. Independently confirmed DLLs have product version2.5.3-dev(the normal local Arcade file-version placeholder is42.42.42.42424):net8.0lib/net8.0/Microsoft.Testing.Platform.dll9207D6C2BC4B5A70A4375C6CDBA5C946392E1CAAA4E8E0B61FA4A7A2261A6372net9.0lib/net9.0/Microsoft.Testing.Platform.dllCBB6A4EB148D5FBE5B06B1CB2F1E0AABF68B87362E275FE0A66C5A51651335F6net48lib/netstandard2.0/Microsoft.Testing.Platform.dllC1460950D23F124FC561F8586D46454EE158F26F8AD113C6653EA832B6696BB5Exact executed commands and results
All shell environments were process-local: repository
.dotnetfirst on a bounded PATH,MSBUILDDISABLENODEREUSE=1,DOTNET_CLI_USE_MSBUILD_SERVER=0, and an isolatedNUGET_PACKAGESatartifacts\obj\n.Complete pack, independent discovery, TRX executions and direct composed-product commands
Complete pack — exit 0, 0 warnings, 0 errors:
Protocol schema — exit 0, all 15 cases passed:
core / net8.0 — discovery exit 0; execution exit 0; 147 passed, 0 existing Unix-only skips; TRX 224799 bytes:
core / net9.0 — discovery exit 0; execution exit 0; 147 passed, 0 existing Unix-only skips; TRX 224799 bytes:
core / net462 — discovery exit 0; execution exit 0; 147 passed, 0 existing Unix-only skips; TRX 224796 bytes:
client / net8.0 — discovery exit 0; execution exit 0; 292 passed, 8 existing Unix-only skips; TRX 490588 bytes:
client / net462 — discovery exit 0; execution exit 0; 209 passed, 2 existing Unix-only skips; TRX 345105 bytes:
acceptance / net11.0 — discovery exit 0; execution exit 0; 17 passed, 0 existing Unix-only skips; TRX 30709 bytes:
Direct packed net8.0 consumer — exit 0, all four required markers:
Direct packed net48 consumer — exit 0, all four required markers:
Boundaries and cleanup
No product or infrastructure blocker remains. The initial complete-pack attempt failed in the F# sample because its isolated-cache reference path was 268 characters; the file existed. Moving only this worktree's cache to
artifacts\obj\nshortened that reference to 249 characters, and the complete unchanged-source pack then passed. That setup failure is not counted as behavioral red evidence.Rider's reported Unicode parser trigger and actual IDE recovery remain unverified. Unix-only cases and an official signed/Release configuration were not executed on this Windows Debug run. Main's buildable deserializer-only counterfactual is documented in #12283; it was not rerun here and is not claimed as release proof.
After verification, 14 generated temporary asset directories and the nine original temporary build binlogs were removed only after preserving hashes, commands, six TRX files, project-assets snapshots, binary shipping layouts, stdout, and binlog copies in this session's evidence folder. No owned test processes remain. This worktree and its aligned packages are retained to own the open servicing PR. Nothing was merged or closed.