Skip to content

test: live CDP download guid coverage and unroute interception deadlock fix - #643

Merged
mxschmitt merged 2 commits into
mainfrom
cursor/cdp-download-guid-test-8e4e
Sep 14, 2026
Merged

mxschmitt merged 2 commits into
mainfrom
cursor/cdp-download-guid-test-8e4e

Conversation

@mxschmitt

@mxschmitt mxschmitt commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #642 plus a deadlock that showed up on this PR’s WebKit macOS oldstable job.

Live CDP download coverage

Adds TestCDPSessionDownloadDoesNotCloseConnection: NewCDPSession → Page.enable → Page.setDownloadBehavior → an attachment download. Chrome’s Page.downloadWillBegin payload carries a download guid that is not a Playwright channel; the test asserts that event arrives intact and browser.NewContext() still works afterwards.

Route mutex deadlock

CI failure in webkit / macos-latest / go oldstable was not that CDP test (it passed in 0.32s). TestContextUnrouteCallShouldStopContextRouteFromHAR hung 12m48s:

  • onRoute held the context mutex while waiting for setNetworkInterceptionPatterns
  • dispatch then blocked in page.onClose on the same mutex
  • context.Close() from test cleanup never got its reply

The client now snapshots/mutates the route list under the lock, then releases it before the protocol round-trip. Same change on page and context Route / Unroute so wait-for-handlers cannot pin the mutex either.

Open in Web Open in Cursor 

A Page.enable'd CDPSession plus a real download is what used to kill the
driver connection; keep a browser-level regression next to the unit tests.

Co-authored-by: Max Schmitt <max@schmitt.mx>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T20:28:43.934209Z 9010a37 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@flakiness-io

flakiness-io Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Test Results Summary

This comment shows the latest test results for this pull request.

Commit Status Test Results CI Runs
52d2645 ✅ Passed 14277 passed · 1 flaky · 232 skipped 18 runs
⚠️ 1 flaky

⚠️ macOS 26.6.2 arm64 · webkit · 1.26.8 tests/input_test.go:262 › TestShouldUploadAFolder

View full report

ℹ️ About Flakiness.io in GitHub

Your team has set up Flakiness.io pull request comments. This comment is updated when

  • The first test results arrive for this pull request
  • A later run reports more results for the same commit
  • A new commit is pushed and tested

Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit.

TestContextUnrouteCallShouldStopContextRouteFromHAR hung on WebKit
macOS because onRoute held the context lock while waiting for
setNetworkInterceptionPatterns. Dispatch then blocked in page.onClose
on the same lock, so neither the interception reply nor context.Close
could complete.

Release the lock before the round-trip, and do the same in Route and
Unroute so wait-for-handlers cannot pin the mutex either.

Co-authored-by: Max Schmitt <max@schmitt.mx>
@cursor cursor Bot changed the title test: live Chromium coverage for CDP download guid passthrough test: live CDP download guid coverage and unroute interception deadlock fix Sep 14, 2026
@mxschmitt
mxschmitt merged commit 775648c into main Sep 14, 2026
23 checks passed
@mxschmitt
mxschmitt deleted the cursor/cdp-download-guid-test-8e4e branch September 14, 2026 22:23
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