feat(network): exchange bounded BiDi locateNodes over WebSocket - #205
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
August 26, 2026 12:44
seonghobae
merged commit Aug 26, 2026
6c5ef5e
into
feat/webdriver-bidi-websocket-frame-transport
4 checks passed
This was referenced Aug 26, 2026
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.
Stacked on live PR #204 branch
feat/webdriver-bidi-websocket-frame-transportat exact basec1bc7e78f3a9debf4f517fb6b5f11dd67be4ad92.Buyer/runtime boundary
This branch composes the bounded BiDi
browsingContext.locateNodescommand/response contract with the peer-verified RFC 6455 frame transport.WebDriverBiDiWebSocketEstablished::exchange_locate_nodesserializes the exact command into one masked client text frame, applies one end-to-end deadline plus per-frame ceilings, bounds interleaved Ping/Pong handling and fragmented text-response work, subjects response bytes to bounded UTF-8/document admission, correlates the response to the exact command id, and returns only normalized untrusted node evidence.exchange_locate_nodes_and_bind_current_nodesperforms current authority binding only after that wire exchange succeeds.Current reconstruction and masking-key contract
The child was reconstructed non-destructively on the live #204 exact tree; predecessor checks/reviews are not transferred. Ping handling checks the remaining exchange budget before drawing caller-owned Pong entropy and checks it again before wire write, so callback time is charged while already-expired exchanges consume zero entropy.
RFC 6455 requires a fresh unpredictable 32-bit client masking key per frame; it does not require lifetime or exchange-wide uniqueness. The current exchange therefore rejects only an immediately adjacent client-key repeat. A later independently generated random collision after an intervening different key remains admissible. Real loopback TCP/RFC 6455 regressions cover both adjacent fail-closed reuse and the valid A-B-A collision path. The diagnostic states this adjacent rule precisely rather than claiming that any key previously used in the exchange is rejected.
The response path admits at most 64 interleaved Ping/Pong control frames, at most 256 text-message fragments, and the existing bounded response-document byte budget. Binary/Close/reserved/orphan-continuation/second-data-message shapes fail closed. Review observations about the initial-fragment count, the core bind helper, and the single-final-frame byte guard were verified against current source as non-defects: the first data frame establishes fragment 1; the network wrapper already holds a validated wire result; and a final unfragmented text payload is still subjected to
BoundedWebDriverBiDiResponseDocument::from_utf8_bytes, which enforces the same 65,536-byte document budget before parsing/correlation.Exact-current evidence
Current exact head:
df321a8f8694579b5eab83ad84497b097cc30807.Current exact base:
c1bc7e78f3a9debf4f517fb6b5f11dd67be4ad92.dec5092494fbcd9de0e7a397d014c3607364f3fdreached CI run32988891086and failed in the realistic loopback regressionlocate_nodes_command_mask_reuse_fails_before_second_wire_write: the test still expected the superseded lifetime-reuse diagnostic even though production had correctly moved to the adjacent-key contract.df321a8f8694579b5eab83ad84497b097cc30807repairs that exact test-harness contract drift by matching the production diagnosticclient masking key was reused for consecutive frames on this established WebSocket; the wire-level assertion that no second frame is emitted after adjacent-key rejection remains unchanged.df321a8f8694579b5eab83ad84497b097cc30807, so no CI, exact production coverage, rustdoc, SAST, Security Scan, OpenCode, Noema, Strix, or other scanner result is promoted as exact-current passing evidence.APPROVEDreview for this exact head.Safety boundary
This slice does not authenticate Chromium/ChromeDriver process provenance, widen TLS/destination authority, authorize typed input or policy, inherit ambient authority, or prove a browser post-condition. Failures consume the affected transport state rather than manufacturing reusable success.
Protected-main
AGENTS.mdremains authoritative. No merge, self-approval, force-push, destructive rebase, workflow/ruleset/secret mutation, tag, release, publish, or stale-evidence promotion is part of this branch update.