Skip to content

[Experiment] Add browser WebAssembly launcher package - #11305

Draft
Amaury Levé (Evangelink) wants to merge 56 commits into
mainfrom
dev/amauryleve/mtp-browser-extension
Draft

Amaury Levé (Evangelink) wants to merge 56 commits into
mainfrom
dev/amauryleve/mtp-browser-extension

Conversation

@Evangelink

@Evangelink Amaury Levé (Evangelink) commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Warning

EXPERIMENT / PROTOTYPE ONLY — this pull request exists for design validation. It is not a shipping commitment, does not establish a supported package or API, and must not be interpreted as a product roadmap promise.

Pull request

Summary

This prototype adds an optional Microsoft.Testing.Platform.Browser package that runs pure-managed browser-WASM MTP applications through dotnet test, following dotnet/sdk#55906. It builds on the authenticated HTTP transport from #10143 and single-threaded browser/WASI TRX support from #10324 while keeping browser dependencies and servicing cadence out of core MTP.

Current reconciled validation inputs (2026-11-02):

  • immutable TestFX package source: 11b0d39f9079e5ead7b91ae5ab5161b5dcd8a147
  • verified SDK/shared runner: f7edbfedcb5319fd006078d1f9516f4a27442ddf, delivered by dotnet/sdk#56305
  • caller-only reconciliation: 63d157f265bff0abb1c5d5a5aeb3c32de9ecf083 (SDK pin, test-harness parsing, and evidence; no shipping-source change)
  • the caller pin follows that verified SDK input; the SDK's package-source pin remains the immutable TestFX revision above rather than chasing caller-only HEAD updates

Current readiness: the fresh Windows stock composition passes all 11 required cases, and the source-matched SDK Linux CI now also passes 11/11. Runtime layouts are explicitly augmented with the producer-declared Core runtimes, not unmodified shipping SDKs. Current SDK Windows and TestFX reverse-direction Windows/Linux CI remain gates; the PR stays draft and Agent merge stays paused. Historical green runs below do not establish current-head readiness.

A project opts in with a Microsoft.Testing.Platform.Browser package reference and an explicit Chromium-family executable. MTP remains authoritative for discovery, execution, filtering, progress/results, cancellation, and artifact production. The optional package owns browser/page/host lifecycle only; the browser app sends results and artifacts directly to the SDK HTTP gateway.

Design and decision record

The maintained cross-repository design discussion is dotnet/sdk#55906. The implementation boundary is:

  • Core MTP/TestFX: managed discovery/execution, filters, result/progress transport, HTTP cancellation, bounded chunked artifact export, and browser-safe scheduling.
  • SDK: launcher selection contract, authenticated gateway, module aggregation, artifact destination/quota ownership, and the shared composed-acceptance runner.
  • Browser package: generated private page assets, Playwright stdio driver, explicit browser launch, startup/heartbeat/console/JS diagnostics, and complete host/browser cleanup.

The maintained protocol decision and field reference records the current reconciliation: upstream coverage retains serializer 15, handshake property 20, and artifact metadata field 9; browser transfer uses serializers 17/18 and browser properties 26-31. Retired experimental serializer 16 and properties 21-25 are not reused. Mixed old/new peers do not activate mismatched decoders; absent transfer capability retains the warning/suppressed-VFS-path fallback.

The package uses Playwright's private stdio protocol and never opens an unauthenticated TCP DevTools endpoint. Bootstrap bearer data is expanded from the SDK-owned response file in memory and is not placed in URLs or logs.

xHarness was investigated but not reused at runtime. Its Selenium/WebDriver server, URL query arguments, DOM tests_done, and console/result parsing conflict with direct MTP HTTP reporting. Its browser startup, container flags, retry, timeout, and cleanup experience informed this implementation.

Protocol additions are capability-gated and backward compatible:

  • protocol 1.5.0 handshake properties advertise HTTP control and artifact limits;
  • existing control serializers are reused over a second authenticated HTTP client;
  • artifact payloads use bounded raw TLV chunks with SDK-owned paths and quotas;
  • missing transfer capability remains compatibility-warning behavior, while a negotiated transfer failure is terminal.

BrowserTestingPackages.slnf is the conventional package-only build graph: eight package roots plus the non-packable MSTest.GlobalConfigsGenerator build dependency. Acceptance is built separately at evaluated NetCurrent. Package version lookups in AcceptanceTestBase are lazy, so reduced feeds do not fail on unrelated absent packages; missing or duplicate packages still fail exactly when requested.

CI uses existing capacity-backed public pools:

  • Windows: windows.vs2026preview.scout.amd64.open, required by the repo SDK's MSBuild 18.7 minimum and UWP package assets;
  • Linux: build.ubuntu.2204.amd64.open, with the SDK-owned CI-only InstallBrowser.sh prerequisite (fingerprint-verified Google signed APT repository when Chrome is absent).

No system-tool/cache deletion or SDK component omission is used.

Demonstration

Canonical consumer shape:

<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
  <PropertyGroup>
    <TargetFramework>net12.0</TargetFramework>
    <OutputType>Exe</OutputType>
    <EnableMSTestRunner>true</EnableMSTestRunner>
    <TestingPlatformBrowserExecutable>PATH_TO_CHROMIUM</TestingPlatformBrowserExecutable>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="MSTest.TestFramework" Version="VERSION" />
    <PackageReference Include="MSTest.TestAdapter" Version="VERSION" />
    <PackageReference Include="Microsoft.Testing.Platform.Browser" Version="0.1.0-alpha" />
  </ItemGroup>
</Project>

The strict composed suite exercises normal run, --list-tests, matching/zero/project filters, managed cancellation (exit 3), intentional test failure aggregation, >1 MiB two-chunk artifact export and byte integrity, quota rejection, package/runtime layout, desktop non-interference, and process cleanup.

Historical pre-reconciliation CI evidence from TestFX build 1632026, testing merge commit f1c7147a236bb16641e85058956d91138a228f1f with SDK 66309ab55fce95ee42e5e2236c02f7371332dbf8 (not proof of the current allocation):

  • Linux job: passed, test run 45287224, 11/11 passed, 0 failed/incomplete/not-applicable; Chrome 155.0.8059.39; diagnostic artifact (2,075,499 bytes).
  • Windows job: passed, test run 45287840, 11/11 passed, 0 failed/incomplete/not-applicable; Edge 153.0.4234.48; diagnostic artifact (2,147,863 bytes).

Both downloaded TestFX artifacts pass the SDK-owned exact-11-case validator, record succeeded=true, and record exit 0 for all six composed commands.

Aligned SDK build 1632034 independently passed its browser jobs: Linux run 45287292 and Windows run 45287874, each 11/11 passed with zero failed/incomplete/not-applicable.

These were four independent green composed jobs for the earlier inputs: TestFX Windows/Linux and SDK Windows/Linux. They are retained as history, not current Linux proof. No screenshot is included because these changes concern process/protocol and physical package contracts rather than rendered UI layout; exact commands, TRX outcomes, and artifact-integrity assertions are the clearer reproducible evidence.

Validation and regression proof

Current source-matched composition

From the SDK checkout at f7edbfedcb5319fd006078d1f9516f4a27442ddf, with the restored counterpart's actual clean HEAD verified as 11b0d39f9079e5ead7b91ae5ab5161b5dcd8a147:

.\eng\browser-testing\RunBrowserTests.ps1 -TestFxRoot artifacts\btf-dd63a33d -BrowserExecutable 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' -Configuration Debug -ResultsDirectory artifacts\log\browser-wire-composed-11b0

Result: parent exit 0; all seven recorded commands exit 0; SDK product build, fresh TestFX shipping pack, and net12 acceptance-host build each have zero warnings/errors. Windows x64, SDK 12.0.100-dev, Edge 156.0.4314.58. All 11 exact names in eng/browser-testing/required-tests.json execute and pass, zero skipped. The older btf-dd63a33d directory label is not used as source identity.

The final evidence.json, packages/manifest.json, runtime-manifest.json, and test-results/browser.trx were read independently. All eight staged package SHA-256 values and all 756 declared-runtime destination file hashes/lengths were independently rechecked after acceptance. Browser 0.1.0-dev SHA-256: 73272744AC68618B59EAF8FA6283A8F9AB714DD5A9696F4E4B9D77691C88FAB8; MTP packages 2.6.0-dev, MSTest packages 4.6.0-dev.

The layout is explicitly augmented: Core 8.0.32, 9.0.21, 10.0.13, and 11.0.0-rc.2.26504.105 come from the restored producer-declared private bootstrap. SDK/muxer/hostfxr, TFM, roll-forward, and exit/zero-result assertions are unchanged. This prerequisite is recorded as runtimeLayoutAugmented=true; it is not a claim that the shipping SDK contains every prior runtime.

Requirement Executed evidence
Run, discovery, filters, aggregation, physical artifact bytes BrowserPackage_DotnetTestRunsAndListsTestsThroughSdkHttpGateway passes in the stock composition, including the large two-chunk artifact integrity assertions.
Cooperative cancellation and bounded process cleanup BrowserPackage_SdkCancellationStopsManagedBrowserRun passes; WindowsJob_CloseKillsWorkerAndSpawnedChild separately passes with both process-exit assertions retained.
Negotiated quota failure is terminal BrowserPackage_ArtifactQuotaFailureFailsRun passes; its intentionally nonzero child is not counted as an outer failure.
Canonical culture paths and package variants BrowserPackage_ContainsPrivateCrossPlatformPlaywrightRuntime, BrowserPackage_PackNoBuildPreservesRuntimePayload, and BrowserPackage_PackWithoutBundledNodePreservesPrivateDriverAndLicenses pass. SatellitePackagePath_NormalizesProductionMetadata separately covers leading/relative Unix and Windows metadata.
Desktop non-interference and selected executable identity BrowserPackage_DesktopTestApplicationIsUnaffected passes with the declared runtime present; DotnetMuxer_ExplicitPathWithSpacesStartsSelectedExecutable separately passes.

The source-matched SDK Linux browser job in build 1659804 is now green. The coordinator independently reconciled actual log 91 and the downloaded Browser_Linux_x64_Attempt1 TRX/evidence: 11 distinct cases execute/pass, 0 failures/skips, all 11 recorded commands exit 0, and all eight package-manifest sources are 11b0d39f9079e5ead7b91ae5ab5161b5dcd8a147. The SDK tested merge is e6fff7ae1092ffff9b2ffb31626e75b5f157bd75, with verified parents SDK main 652269386d3c0702de4e6c9a6b8495e7eef5cfbc and SDK PR head f7edbfedcb5319fd006078d1f9516f4a27442ddf; the live SDK check also reports Success. Its explicit augmented Linux runtime manifest has 753 files, not the Windows layout's 756; Core 11 RC2 libcoreclr.so SHA-256 is A5DD0CF3A4F6D36F13C3D71D3244B6457A2C510EEED7A616FC952CCFA8C28E80. SDK Windows remains in progress. This adds real counterpart Linux proof, not a TestFX current-caller CI pass.

Current CI checkpoint and caller-only correction

The actual Windows and Linux TRX/evidence from TestFX build 1659780 were downloaded independently, rather than extrapolating one platform's results to the other. Both record tested merge 030bcf378c5fbbbed766f101ccb305498f1d110d and old SDK 66309ab55fce95ee42e5e2236c02f7371332dbf8, not the final caller pin. Each executes 11 cases: 8 pass, 3 fail, 0 skip.

On both platforms, BrowserPackage_ContainsPrivateCrossPlatformPlaywrightRuntime, BrowserPackage_PackNoBuildPreservesRuntimePayload, and BrowserPackage_PackWithoutBundledNodePreservesPrivateDriverAndLicenses pass. The three prior canonical-satellite/package-variant failures are absent in this actual Linux run, not merely predicted fixed from a Windows check.

The remaining failures are exactly BrowserPackage_DotnetTestRunsAndListsTestsThroughSdkHttpGateway (missing export directory), BrowserPackage_ArtifactQuotaFailureFailsRun (child exit 0 with the explicit unsupported-artifact-export warning), and BrowserPackage_DesktopTestApplicationIsUnaffected (Core 11.0.0-rc.2.26504.105 required but only 11 RC1 present; Linux exit 150, Windows exit -2147450730). All five preceding build/evaluation commands exit 0, while browser acceptance exits 2. Published diagnostic artifacts: Linux and Windows.

Ordinary Linux separately exposes four metadata-test failures because verbose CLI output prefixes the correct property with Telemetry is: Disabled. The caller-only correction reuses the already-tested last-nonempty-line parser, preserves exact tools/net8.0/any/tr/ equality, and explicitly arranges the child setting both present and absent. It does not disable CI tracing, relax any satellite/exit assertions, change wire fields, or alter shipping source.

The same eight SatellitePackagePath_NormalizesProductionMetadata rows execute in the local harness comparison: before extraction correction, four verbose rows fail at the intended banner-versus-path assertion and four absent-setting rows pass (exit 2); afterward 8/8 pass, zero skips, exit 0. This is a test-harness reproduction, not additional production-mutation proof. Both builds below finish with 0 warnings/errors, exit 0, using the CMD-local Windows PowerShell bootstrap path. The exact metadata selector is unchanged:

.\build.cmd -c Release -msbuildEngine dotnet -bl -bln browser-path-verbose-red-20261102.binlog -projects test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj
.\.dotnet\dotnet.exe artifacts\bin\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Release\net12.0\Microsoft.Testing.Platform.Acceptance.IntegrationTests.dll --filter 'FullyQualifiedName~BrowserPackagePathTests' --report-trx --report-trx-filename verbose-red.trx --results-directory artifacts\TestResults\Release\browser-path-verbose-20261102-red

.\build.cmd -c Release -msbuildEngine dotnet -bl -bln browser-path-verbose-green-20261102.binlog -projects test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj
.\.dotnet\dotnet.exe artifacts\bin\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Release\net12.0\Microsoft.Testing.Platform.Acceptance.IntegrationTests.dll --filter 'FullyQualifiedName~BrowserPackagePathTests' --report-trx --report-trx-filename final.trx --results-directory artifacts\TestResults\Release\browser-caller-final-20261102-metadata

The same eight rows also pass 8/8, zero skips, exit 0 with the parent process explicitly inheriting the CI-style verbose setting, proving that child absence is not accidentally inherited:

$env:DOTNET_CLI_CONTEXT_VERBOSE='1'
.\.dotnet\dotnet.exe artifacts\bin\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Release\net12.0\Microsoft.Testing.Platform.Acceptance.IntegrationTests.dll --filter 'FullyQualifiedName~BrowserPackagePathTests' --report-trx --report-trx-filename inherited-verbose.trx --results-directory artifacts\TestResults\Release\browser-caller-final-20261102-inherited-verbose

That override is confined to the task-owned PowerShell process; no user-global setting changes.

The retained two-case selector also executes/passes 2/2, zero skips, exit 0:

.\.dotnet\dotnet.exe artifacts\bin\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Release\net12.0\Microsoft.Testing.Platform.Acceptance.IntegrationTests.dll --filter 'FullyQualifiedName~DotnetMuxer_ExplicitPathWithSpacesStartsSelectedExecutable|FullyQualifiedName~BrowserPackage_ContainsPrivateCrossPlatformPlaywrightRuntime' --report-trx --report-trx-filename final.trx --results-directory artifacts\TestResults\Release\browser-caller-final-20261102-retained-review

The production files remain byte-for-byte unchanged from the SDK's immutable package-source 11b0d39f9079e5ead7b91ae5ab5161b5dcd8a147. The corrected caller and test harness do not require cycling the SDK's package-source pin. Final TestFX current-head Windows/Linux and SDK Windows CI still gate readiness; the old-pin failures above are not silently reclassified as passing.

Test-value evidence

  • Wire capability isolation: an isolated comparison of the c22e5fd7 source restored only ServerControlTransport from 26 to 20, retaining the four new cases/assertions. It compiled cleanly and executed four cases: three intended control-capability assertion failures, one pass, zero skips, exit 2. The aligned four-case selection passes 4/4. The nested harness changed only precedence between byte-equivalent global analyzer policies; no checks were suppressed.
  • Missing satellites and executable quoting: retained tests first execute two intended assertion failures: 13 expected culture paths versus zero packed paths, and a deliberately launchable misparsed native executable returning 1 rather than 0. With the fixes and fresh packages, the covering six-case selection passes 6/6, zero skips.
  • Linux path normalization: real build 1659688 exposed tools/net8.0/any//<culture>/...; its exact package assertions were retained. At the dd63a33d production expression, four metadata cases execute: the two leading-separator cases fail on any//tr/, and two relative cases pass. The normalized 11b0d39f expression passes all four; the covering package/path selection passes 10/10. These are production-expression checks on Windows, not substituted Linux-runtime proof.
  • No usable control pipe: the existing StartServerControlChannelAsync_SupportedButPipeNameEmptyDoesNotCreateListener case executes/fails before the production allocation guard and executes/passes afterward with the same assertion. PID-marker publication now closes its temporary file before renaming; its real Windows containment case passes without weakening lifetime assertions. No deterministic timing-failure claim is made for that race.

The TestFX current-caller Windows/Linux jobs remain readiness gates. Build 1659688 also has a separately retained ordinary Linux Release MSB3026 shared test-layout copy failure. Its project source is unchanged, but graph/global-input changes can affect exposure; concurrent writers and PR causation are unproven. The failed-binlog/log endpoints subsequently return 404. No workaround was added, and a later passing run alone is not described as fixing that collision.

Historical focused repository validation

  • build.cmd -c Release -pack -projects BrowserTestingPackages.slnf -mt 0 -bl -bln BrowserTestingPackages-fresh.binlog from a new detached checkout at bbbbfd23d4de8ed70a261b52a326804492b4b037: passed, exit 0, 0 warnings/errors. Exactly eight non-symbol shipping nupkgs were produced and every nuspec repository commit matched that exact source SHA.
  • build.cmd -c Release -projects test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj -mt 0 -bl -bln AcceptanceTestBaseLazy-final.binlog: passed, exit 0, 0 warnings/errors.
  • direct MTP run filtered to AcceptanceTestBaseTests: 1/1 passed, 0 skipped. It proves unused absent packages are not resolved, required absent packages fail with found 0, and duplicate packages fail with found 2.
  • direct MTP run filtered to BrowserPackage_ContainsPrivateCrossPlatformPlaywrightRuntime while Shipping contained exactly the required eight dev nupkgs: 1/1 passed, 0 skipped; the original 43-package local feed was restored afterward.
  • BuildDriverTests: 2/2 passed, covering nonzero build.cmd failure propagation/binlog creation and root-wrapper forwarding of -mt 0.
  • strict shared composed acceptance in TestFX build 1632026: Linux 11/11, Windows 11/11, no skips.
  • strict shared composed acceptance in SDK build 1632034: Linux 11/11, Windows 11/11, no skips.

The required-test manifest contains 11 exact TRX names and the shared validator requires every name exactly once, all Passed, zero skipped, and a valid TRX. Every generated fixture uses a unique short NuGet cache and compares all eight restored project.assets.json SHA-512 values with the staged nupkg bytes.

Immutable aligned package evidence remains at source b6c7cac92f7eeb788ae026471239ff110207bc24 under artifacts/validation/Microsoft.Testing.Platform.Browser/b6c7cac92-aligned/Shipping; the Browser nupkg SHA-256 is 2D078CB340E45A0E6C1CC5894BFF3148E29218683F36D5D038F24B3C78E67580.

At this body update, SDK Linux success is confirmed above; SDK Windows and TestFX reverse-direction/current-caller CI have not been claimed green. The PR remains draft and TestFX app maintenance remains paused. The source-matched local Windows proof, SDK Linux CI proof, and historical green jobs are distinct from the pending merge-readiness gates.

Remaining external release gates are official signing/publication approval, third-party license/SBOM/provenance review, dependency flow/merge of the matching SDK implementation, release-branch/backport decisions, runtime validation before advertising untested OS/architecture combinations, and an identified servicing owner for Playwright/Node/browser cadence. The package remains experimental and is emitted to Shipping only for acceptance/cross-repository validation.

Introduce an optional Microsoft.Testing.Platform.Browser package with Chromium/CDP launch supervision, secure SDK HTTP bootstrap injection, build-transitive browser assets, and focused unit and acceptance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1c54e99e-de18-4bcd-a5c4-6163e4aeb78c
Bundle the private cross-platform Playwright runtime from clean builds, allow launcher runtime roll-forward, and make startup cancellation and teardown reliably close owned browser resources.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1c54e99e-de18-4bcd-a5c4-6163e4aeb78c
Preserve framework-provided ComputeRunArguments host contracts, including quoted empty arguments, while keeping explicit browser host overrides. Replace raw page globals with the documented testingPlatformBrowser contract version 1 and launcher-private completion binding.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep browser URLs on the validated loopback origin, use the invoking SDK muxer, avoid Playwright payload copies in unit tests, coordinate package-owned host assets, and secure the launch-info handoff with private per-run directories and handle-based validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a one-shot, origin-validated fatal-error method to the versioned browser page contract so framework bootstrap and completion negotiation failures terminate the launcher immediately instead of waiting for the completion timeout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Support no-build packing, preserve doubled quotes and multiline launcher arguments, wrap late Directory.Build host providers, avoid false-positive custom host asset coverage, and clean generated launcher configuration files.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Activate wrapping only for SDK-marked dotnet test invocations with HTTP bootstrap contract version 1, reject browser-inapplicable file and report options, and cover ordinary run, filtered/skipped/failing execution, and multi-target activation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require SDK invocation IDs for per-evaluation launcher configs, clean legacy and invocation-specific files, and link post-launch cancellation into the completion race and cleanup path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Sep 15, 2026
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Sep 15, 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.

Copilot review overview

🟡 Changes recommended

Browser crash and cleanup paths can hang, while MSBuild hook composition can bypass launcher integration.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 3 Medium severity

Open (4)
What changed in this PR

Adds an experimental browser-WASM launcher package that integrates MTP applications with dotnet test through Playwright and the SDK HTTP gateway.

Changes:

  • Adds browser launch, monitoring, diagnostics, security validation, and host assets.
  • Adds MSBuild activation, packaging, versioning, and solution registration.
  • Adds extensive unit and browser acceptance coverage.

A final security/lifecycle review is advisable because this introduces process-launch and token-injection boundaries.

File Description
TestFx.slnx Registers the browser project.
NonWindowsTests.slnf Adds non-Windows build coverage.
MutationTesting.slnx Adds the project to mutation builds.
Microsoft.Testing.Platform.slnf Adds the project to the MTP solution.
Directory.Build.props Defines independent browser package versioning.
Directory.Packages.props Centrally references Playwright.
Microsoft.Testing.Extensions.UnitTests.csproj Links browser helpers into unit tests.
BrowserLauncherOptionsTests.cs Tests parsing, security, cleanup, and platform behavior.
BrowserPackageExecutionTests.cs Adds package-level browser acceptance coverage.
Microsoft.Testing.Platform.Browser.csproj Defines launcher packaging and private runtime payload.
PACKAGE.md Documents setup, contracts, and limitations.
Program.cs Implements launcher orchestration.
BrowserExecutableLocator.cs Discovers Chromium-family executables.
BrowserLauncherOptions.cs Parses and validates launcher/bootstrap inputs.
BrowserRunMonitor.cs Monitors completion and process exits.
ChromiumBrowser.cs Manages Playwright and the browser-page API.
DiagnosticBuffer.cs Bounds and redacts diagnostics.
HostProcess.cs Starts and monitors the WASM host.
PlaywrightNodeExecutable.cs Locates and prepares Playwright’s Node runtime.
build/​Microsoft.Testing.Platform.Browser.props Forwards direct-consumer properties.
build/​Microsoft.Testing.Platform.Browser.targets Forwards direct-consumer targets.
buildTransitive/​Microsoft.Testing.Platform.Browser.props Forwards transitive properties.
buildTransitive/​Microsoft.Testing.Platform.Browser.targets Forwards transitive targets.
buildMultiTargeting/​Microsoft.Testing.Platform.Browser.props Defines launcher defaults and hook setup.
buildMultiTargeting/​Microsoft.Testing.Platform.Browser.targets Adds host assets and clean behavior.
Microsoft.Testing.Platform.Browser.After.targets Wraps computed browser host commands.
Microsoft.Testing.Platform.Browser.main.js Supervises managed browser execution.
index.html Provides the default browser host page.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Sep 15, 2026
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Sep 15, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Use the WebAssembly SDK and package-owned static host assets for the primary browser acceptance model, document the generated managed entry point and direct MTP HTTP transport, and recognize WasmAppHost App url readiness without matching debug URLs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 16, 2026 12:27

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.

Copilot review overview

🟡 Changes recommended

The Unix launch-info directory has a cross-user trust-boundary flaw, and module-load failures can stall until the completion timeout.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 2 High severity · 3 Medium severity

Open (5)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Handle module-load failures before waiting for completion

src/​Platform/​Microsoft.Testing.Platform.Browser/​buildMultiTargeting/​assets/​Microsoft.Testing.Platform.Browser.main.js:4

A static module import is resolved before this supervisor body runs. If _framework/dotnet.js is missing or fails to load, neither complete nor reportFatalError is called, so the launcher waits for the full completion timeout (600 seconds by default) instead of reporting the bootstrap failure promptly. Load the module dynamically inside the guarded try and terminate through the versioned fatal-error API when bootstrap fails.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Sep 16, 2026
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Sep 16, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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

Artifact negotiation, exactly-once transfer behavior, protocol documentation, and current validation evidence remain unresolved.

14 open findings
Previously missed (4)

In code that hasn't changed since last review

Medium severity Require a positive peer file-count limit before artifact transfer

src/​Platform/​Microsoft.Testing.Platform/​ServerMode/​DotnetTest/​DotnetTestConnection.cs:253

Artifact transfer is enabled even when the peer omits its file-count limit, then the host invents a 10,000-file limit. That accepts a partially declared capability and can exceed the SDK's actual quota before failing mid-transfer. Require a positive FileArtifactTransferMaxFileCount alongside the other advertised limits.

Medium severity Prevent duplicate artifact transfers from concurrent notifications

src/​Platform/​Microsoft.Testing.Platform/​ServerMode/​DotnetTest/​DotnetTestConnection.cs:661

ConcurrentDictionary.GetOrAdd may run this async value factory more than once for the same path. Concurrent artifact notifications can therefore upload duplicate bytes, consume quota twice, and leave an orphan SDK artifact even though only one task is cached. Cache a Lazy<Task<string>> (or synchronize creation per path) so each path starts exactly one transfer.

Low severity Refresh validation evidence and CI status for the current pin

eng/​browser-testing/​sdk.json:3

The composed-validation pin has moved to df5a595…, while the PR description still claims validation against SDK 5b0e5fbe…, identifies b41d763f0 as the current TestFX head, and says final CI is green. The current PR head is 303a5d8c… and checks are still queued/in progress, so refresh the immutable evidence and CI statement after this exact pin/head completes validation.

Low severity Update protocol documentation for version 1.5 capabilities

src/​Platform/​Microsoft.Testing.Platform/​ServerMode/​DotnetTest/​IPC/​Constants.cs:233

Protocol 1.5 now implements HTTP reverse control and chunked artifact transfer, but the canonical docs/mstest-runner-protocol/004-protocol-dotnet-test-pipe.md still lists versions only through 1.4, documents serializer IDs only through 14, and calls browser reverse control future work. Update that protocol specification with the new capability keys, serializers, and fallback behavior in this PR.

🧠 Review effort: Balanced

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

Page-close handling, package completeness validation, signing scope, and stale validation claims remain unresolved.

14 open findings
Previously missed (2)

In code that hasn't changed since last review

Medium severity Fail completion promptly when the browser page closes

src/​Platform/​Microsoft.Testing.Platform.Browser/​ChromiumBrowser.cs:295

A page can close without crashing or disconnecting Chromium (for example, via window.close()). That leaves both browserCompletion and WaitForExitAsync pending, so the run reports only after the completion timeout (10 minutes by default) instead of failing immediately. Subscribe to IPage.Close and complete _completion exceptionally, just as the crash handler does.

Low severity Update validation evidence for the current commit pairing

eng/​browser-testing/​sdk.json:3

The validation evidence in the PR description is for SDK commit 5b0e5fbe3a and TestFx head b41d763f0, but this pin is now df5a595… and the current PR head is 303a5d8…; the current composed browser run was still in progress when reviewed. Update the description with evidence for this exact pairing before retaining the “Final CI is green” claim.

🧠 Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 cross-repository protocol and process-lifecycle changes require human review, and artifact caching plus current-head validation evidence remain unresolved.

14 open findings
Previously missed (1)

In code that hasn't changed since last review

Low severity Update validation claims to match the current source and CI state

eng/​browser-testing/​sdk.json:3

The PR body’s validation claim no longer matches this pin or the current source state: it says the current head is b41d763f0, the aligned SDK is 5b0e5fbe3a, and final CI is green, but the actual head is 580258bd5a7d..., this file now selects 6868a2467c1f..., and the current Windows/Linux composed checks (build 1631986) are still in progress. The historical b6c7cac92/5b0e5fbe3a evidence therefore does not validate the source and counterpart selected by this revision. Please update the body after the current composed run completes (including current TestFx/SDK SHAs and accessible evidence), or explicitly label the existing results as historical and current-head validation as pending.

🧠 Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

Comment thread eng/browser-testing/sdk.json Resolved
@github-actions

This comment has been minimized.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

@github-actions

This comment has been minimized.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

🟡 Changes recommended

Unquoted SDK paths break launches from directories containing spaces, satellite assemblies are omitted from packaging, and a marker-file race can cause intermittent containment-test failures.

3 open issues
4 resolved since last review

Review effort: Balanced

Preserve upstream coverage IDs, retire prototype allocations, and retain capability-gated HTTP fallback and no-channel cleanup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

🟡 Changes recommended

The pinned SDK uses incompatible protocol field IDs, causing the host to disable HTTP cancellation and drop browser artifact reports.

4 open issues

Review effort: Balanced

Comment thread eng/browser-testing/sdk.json Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 pinned SDK uses incompatible wire IDs, disabling HTTP cancellation and artifact export, so the required acceptance cases cannot pass with this pairing.

4 open issues

Review effort: Balanced

Ship all culture satellites, quote explicit SDK executables, and publish containment markers atomically. Preserve paired wire allocations and regression assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 pinned SDK uses incompatible wire allocations, disabling managed HTTP cancellation and artifact export, so it must be updated and the composed suite rerun because earlier passing results predate the change.

1 open issue
3 resolved since last review

Review effort: Balanced

Retain exact culture-path assertions and exercise the production MSBuild expression with relative and leading Unix/Windows metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 pinned SDK uses incompatible wire allocations, disabling managed HTTP cancellation and dropping browser artifacts, so the SDK implementation and pin must be updated together and the composed suite rerun.

1 open issue

Review effort: Balanced

Pin the independently verified SDK f7edbfed while retaining immutable package source 11b0d39. Reuse the property-output parser for verbose metadata probes and cover explicit present/absent child settings. Record composed proof and both actual CI failure inventories without weakening product assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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

Human assessment is needed because the probe assertions can pass even when the wrapper fails to forward -mt 0 to the common build script.

1 open issue

Review effort: Balanced

@github-actions

This comment has been minimized.

@Evangelink

Copy link
Copy Markdown
Member Author

/azp run microsoft.testfx

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Final test-triage resolution — Azure Pipelines build 1660099

Result: inconclusive. The build failed (check microsoft.testfx), but no actionable test failure could be identified.

  • The Linux Release job is failed in the pipeline timeline, but the collector found 0 failed/retried test results, 0 crash/hang diagnostics, 0 slow-test regressions and 0 timeline test signals.
  • Evidence is incomplete: 3 test-artifact downloads failed, so the test reports for some legs may be missing. I can't say the tests are clean.
  • History (previous 12 builds / 30 days) found no matching candidates, and it was not flagged as incomplete.
  • No issue was created because nothing meets the durable-issue thresholds.

Next step: inspect the failing Test step log of the "Linux Release" job in the build, and re-run the leg if the artifact publication failures were transient. Ordinary build failures are out of scope for this analysis (see Build Failure Analysis).

🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto · 20.8 AIC · ⌖ 0.511 AIC · ⊞ 9.7K

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.

2 participants