fix(cdp): don't report an answered navigation as failed when the socket drops - #565
Open
bevelbyte wants to merge 1 commit into
Open
fix(cdp): don't report an answered navigation as failed when the socket drops#565bevelbyte wants to merge 1 commit into
bevelbyte wants to merge 1 commit into
Conversation
zhom
self-requested a review
August 16, 2026 19:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fast navigation can close the CDP websocket before the navigation response is observed. Donut can then report:
-32000 "no response received from CDP (connection closed)"even though the navigation already succeeded. This causes a false navigation error and can break flows that issue the next command immediately after navigation.
Which issue does this PR fix?
No existing issue. I found a minor bug while I was using the CDP automation tools.
How to test
1 .Run:
cargo test --libThis includes the new regression tests for:
2 .Manual: launch a profile and navigate between pages quickly. Before the fix, this could sometimes report a false "connection closed" error even though the page had loaded. After the fix, the command result is preserved.
The focused CDP tests pass (22/22), and the full Rust library test suite passes (731/731).
Checklist
pnpm format && pnpm lint && pnpm testlocally and it passes(Note: I had some unrelated
pnpmspawn and Biome CRLF failures on my local Windows setup, butcargo clippyand the focused Rust tests are green. CI should pass fine).AI usage (required)