Skip to content

Capture passkey upgrade HTML before automatic navigation - #8

Closed
mmitche wants to merge 4 commits into
mainfrom
mmitche-ci-flakiness-triage
Closed

mmitche wants to merge 4 commits into
mainfrom
mmitche-ci-flakiness-triage

Conversation

@mmitche

@mmitche mmitche commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Capture passkey upgrade HTML before automatic navigation

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Retain passkey upgrade HTML before its automatic continuation can navigate.

Description

BlazorWebTemplate_ConditionalPasskeyRegistration reads the first upgrade response after the page has submitted its continuation form and navigated away. Chromium can discard that response body, producing the Network.getResponseBody error documented in dotnet/aspnetcore#69494.

For the failure cases that inspect redisplayed HTML, fetch and retain the first POST response before fulfilling the original browser request. Do not follow redirects during capture; leave GETs and subsequent POSTs on the normal browser path. Preserve the existing status, request, cookie, credential, signaling, and final-navigation assertions. All eight existing theory rows remain; no production code, retry, delay, timeout, or quarantine changes.

Simply moving the body read after the login click would still race the page's automatic navigation. Capturing before delivery provides an explicit ordering guarantee.

Validation

  • node <session-files>\passkey-response-repro.cjs — passed using installed Edge/Chromium 155 and cached Playwright 1.61.0, a loopback server, and the actual template PasskeySubmit.razor.js. Baseline: 12/12 runs reproduced the body-read error. Capture: 12/12 passed, covering successful, rejected, pending, and unsupported signaling. Checked initial GET/query handling, continuation POST, cookie deletion, credential-field removal, original response status, redirect, and final page.
  • & <session-files>\validate-passkey-capture.ps1 — passed; the exact C# capture block compiles with nullable checks and warnings as errors against cached Playwright 1.61.0 and existing .NET 10 references.
  • git -c core.longpaths=true diff --check — passed.
  • . .\activate.ps1; dotnet --version — blocked: repository SDK 12.0.100-alpha.1.26531.102 is not installed. No tools were installed.
  • Not run: BlazorWebTemplate_ConditionalPasskeyRegistration in the generated ASP.NET application. The repository SDK and matching built product/template artifacts are unavailable. The browser reproduction does not validate persistence or the eight complete C# theory rows, and the API probe does not replace a project build against pinned Playwright 1.62.0. This draft does not claim verified CI remediation.

Tradeoff: a small test-only interception is justified by repeated documented failures and a reproduced browser-lifetime mechanism. It retains all failure detection instead of adding retries or weakening assertions. The added response-path complexity is bounded to one response in affected rows; complete generated-application validation remains required before treating the flake as fixed.

This is a fork-only draft following the fork refresh. No upstream publication or CI retry was requested. Implementation and review were assisted by GitHub Copilot.

Fixes #1

Retain the first failed-persistence response before the browser can submit its continuation. Preserve the existing request, cookie, signaling, and navigation assertions.

Co-authored-by: Copilot App <[email protected]>
@mmitche mmitche closed this Nov 12, 2026
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.

[Flakiness triage] Blazor passkey template response-body race

2 participants