Skip to content

feat(network): add bounded WebSocket frame transport - #204

Merged
seonghobae merged 66 commits into
feat/webdriver-bidi-websocket-handshake-responsefrom
feat/webdriver-bidi-websocket-frame-transport
Aug 26, 2026
Merged

feat(network): add bounded WebSocket frame transport#204
seonghobae merged 66 commits into
feat/webdriver-bidi-websocket-handshake-responsefrom
feat/webdriver-bidi-websocket-frame-transport

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR owns the bounded RFC 6455 frame-transport slice over an established, peer-verified WebDriver BiDi WebSocket stream. It remains narrower than BiDi message parsing or browser authority: one exact stream can write masked client text/Pong frames and read one bounded server frame without resolving, reconnecting, opening a second socket, or granting Agent capabilities.

Current stack truth

  • exact live parent/base: 0c8b39b2f31979fde0766f86ce71c7b870047b61 (feat/webdriver-bidi-websocket-handshake-response);
  • exact current head: c1bc7e78f3a9debf4f517fb6b5f11dd67be4ad92;
  • the PR is Ready and mergeable against the live parent;
  • no predecessor checks/reviews are promoted as current-head evidence.

Production and repair contract

  • Caller supplies WebDriverBiDiWebSocketMaskKey; the validated public boundary rejects immediately consecutive reuse before a second wire emission without imposing an unbounded/global uniqueness requirement.
  • The public mask-key type and handshake-plan adapters redact WebSocket client nonce and frame-mask entropy from deterministic diagnostics.
  • Bounded masked text/Pong writes and one-frame reads operate only on the established exact stream.
  • RFC 6455 client masking/server unmasking, reserved-bit/opcode rejection, minimal length encodings, control-frame FIN/125-byte limits, a 1 MiB payload ceiling, monotonic operation deadlines, and operation-local socket-timeout cleanup are enforced fail closed.
  • Close-frame validation rejects malformed one-byte payloads, invalid UTF-8 close reasons, codes outside the wire range, and the RFC-reserved wire-only codes 1004, 1005, 1006, and 1015; extension/application semantic interpretation remains above this raw framing boundary.
  • Failed frame I/O consumes state; successful operations preserve verified peer/session evidence.

Current-head evidence

The immediately preceding head 9e550a4563c1025c944898b943cc6607f2ffd46f had Rust contracts GREEN but exact coverage enforcement exposed one uncovered function/line and 12 regions. The failure was traced to a redundant inline test module in webdriver_bidi_websocket_raw_redacted.rs, while the stronger dedicated diagnostic-redaction test module already exercises the required behavior. Current head c1bc7e78f3a9debf4f517fb6b5f11dd67be4ad92 removes only that duplicate test harness.

For the unchanged current head, CodeRabbit and Devin status contexts are successful and all current inline review threads are resolved. No native GitHub Actions workflow run is currently attached to this exact head, so Rust contracts, exact four-axis production coverage, SAST, Security Scan, OpenCode/Noema/Strix, Manifest V3, SBOM/provenance, or any other gate are not claimed current until they execute against this unchanged SHA. The predecessor run is retained only as causal evidence for the repaired coverage-harness defect.

Current formal review inventory contains COMMENTED automation reviews and no qualifying independent APPROVED review. Passing automation/status is not independent approval.

Safety boundary

This slice does not authenticate Chromium/ChromeDriver process provenance, establish current OriginWeave session/context/origin/document authority, authorize policy or typed input, mint durable node handles, execute a browser action, prove a post-condition, perform DNS/reconnect/proxy fallback, or substitute TLS identity. It only advances bounded RFC 6455 framing on the exact peer-verified stream.

Protected-main AGENTS.md remains authoritative. This scheduled actor does not merge, self-approve, force-push, destructively rebase, alter workflows/rulesets, add secrets, weaken checks, tag, release, publish, or promote stale evidence.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a1d497a7-0c60-4fdf-845d-96605b330ca3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

github-advanced-security[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as ready for review August 26, 2026 12:45
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 new potential issues.

Open in Devin Review

Comment thread crates/originweave-network/tests/webdriver_bidi_websocket_pong_write.rs Outdated
@seonghobae
seonghobae merged commit a4240df into feat/webdriver-bidi-websocket-handshake-response Aug 26, 2026
2 checks passed
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