Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3c214c2
test(network): require bounded BiDi text message assembly
seonghobae Aug 29, 2026
54aa784
test(network): canonicalize BiDi message regression
seonghobae Aug 29, 2026
851c4b9
feat(network): add bounded BiDi text message assembler
seonghobae Aug 29, 2026
c2908e3
feat(network): export BiDi text message contract
seonghobae Aug 29, 2026
218d0bc
fix(network): keep BiDi assembly warnings and state explicit
seonghobae Aug 29, 2026
af23abf
style(network): apply canonical BiDi message formatting
seonghobae Aug 29, 2026
b65252b
fix(network): satisfy strict BiDi message contracts
seonghobae Aug 29, 2026
f571646
style(network): apply canonical strict-contract formatting
seonghobae Aug 29, 2026
c9a3f30
test(network): exercise public BiDi message frame admission
seonghobae Aug 29, 2026
175d4f1
test(network): wire public BiDi message admission regression
seonghobae Aug 29, 2026
11afdbe
test(network): apply canonical rustfmt to BiDi admission regression
seonghobae Aug 29, 2026
05d08d9
test(network): cover BiDi assertion helper failures
seonghobae Aug 29, 2026
eab9c47
test(network): move BiDi public contract to integration target
seonghobae Aug 29, 2026
f44aed7
test(network): keep public BiDi contract outside library source
seonghobae Aug 29, 2026
3b23516
test(network): remove in-source BiDi public contract duplicate
seonghobae Aug 29, 2026
c74930d
test(network): remove impossible test error branches from coverage
seonghobae Aug 29, 2026
9fedffb
test(network): satisfy strict WebSocket assembler contracts
seonghobae Aug 29, 2026
ed8a5e7
style(network): apply canonical rustfmt output
seonghobae Aug 29, 2026
c316530
test(network): eliminate residual-only coverage regions
seonghobae Aug 29, 2026
c1884ba
test(network): require bounded BiDi JSON envelope parsing
seonghobae Aug 29, 2026
052e531
feat(network): classify bounded BiDi JSON envelopes
seonghobae Aug 29, 2026
fc346e1
fix(network): apply rustfmt to BiDi JSON exports
seonghobae Aug 29, 2026
5d9e1ff
fix(network): apply canonical rustfmt to BiDi JSON parser
seonghobae Aug 29, 2026
552a10d
test(network): exercise BiDi JSON parser boundaries
seonghobae Aug 30, 2026
7b8b67c
fix(test): send literal BiDi JSON over loopback
seonghobae Aug 30, 2026
1c47c14
style(test): apply canonical rustfmt
seonghobae Aug 30, 2026
3a1a87c
fix(network): remove impossible BiDi parser evidence branches
seonghobae Aug 30, 2026
ac6b532
test(network): cover public BiDi JSON parser branches over loopback
seonghobae Aug 30, 2026
32a7d96
test(network): cover malformed BiDi error ids
seonghobae Aug 30, 2026
b3d26d1
test(network): cover remaining BiDi parser transport paths
seonghobae Aug 30, 2026
6ef3c4c
test(network): cover raw UTF-8 BiDi JSON transport
seonghobae Aug 30, 2026
6a0ffd6
fix(test): encode raw UTF-8 BiDi fixture as str bytes
seonghobae Aug 30, 2026
dba07d9
test(network): cover missing BiDi envelope members over real transport
seonghobae Aug 30, 2026
57750f9
test(network): exercise BiDi debug and display on public transport path
seonghobae Aug 30, 2026
627f2c5
test(network): expose test-only bounded BiDi text fixture
seonghobae Aug 30, 2026
36466c8
fix(network): remove unused BiDi text test fixture
seonghobae Aug 30, 2026
0a364e5
test(network): exercise public BiDi JSON boundary in unit build
seonghobae Aug 30, 2026
51ae918
test(network): cover BiDi JSON parser residual paths
seonghobae Aug 30, 2026
e6d5166
test(network): cover escaped slash in BiDi JSON unit path
seonghobae Aug 30, 2026
1bdfb42
test(network): reject non-protocol BiDi error codes
seonghobae Sep 4, 2026
87854fd
fix(network): validate WebDriver BiDi error codes
seonghobae Sep 4, 2026
53acd59
docs(doctoring): correct WebDriver BiDi ErrorCode evidence
seonghobae Sep 4, 2026
7560fa1
docs(changelog): record BiDi error-code hardening
seonghobae Sep 4, 2026
7f31e50
docs(changelog): preserve redirect-cycle evidence wording
seonghobae Sep 4, 2026
8914012
test(network): reject invalid BiDi event method names
seonghobae Sep 4, 2026
977c4c3
fix(network): validate WebDriver BiDi event names
seonghobae Sep 4, 2026
c6ab0c5
fix(network): restore JSON envelope test fixtures
seonghobae Sep 4, 2026
4a9d7fa
fix(network): reject malformed BiDi event names
seonghobae Sep 4, 2026
9b70403
docs(doctoring): refresh WebDriver BiDi 2026-09-03 evidence
seonghobae Sep 4, 2026
6cade89
test(network): require spec-defined client-window error
seonghobae Sep 4, 2026
56e70a2
test(network): colocate client-window interop regression
seonghobae Sep 4, 2026
7578078
test(network): remove duplicate interop harness
seonghobae Sep 4, 2026
01ef429
fix(network): admit client-window BiDi errors
seonghobae Sep 4, 2026
3df49e6
docs(network): align BiDi error vocabulary evidence
seonghobae Sep 4, 2026
7a45943
docs(network): record BiDi ErrorCode inconsistency accurately
seonghobae Sep 4, 2026
9fa4f37
docs(changelog): preserve BiDi error-code discrepancy
seonghobae Sep 4, 2026
6407895
test(docs): lock BiDi error-vocabulary evidence
seonghobae Sep 4, 2026
b87191b
Merge pull request #247 from ContextualWisdomLab/feat/webdriver-bidi-…
seonghobae Sep 5, 2026
585791f
fix(network): adopt verified frame transport parent
seonghobae Sep 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ All notable changes to OriginWeave are documented in this file. The format follo

### Changed

- Aligned the bounded WebDriver BiDi error-envelope vocabulary with the current specification by admitting the defined `no such client window` response while retaining fail-closed rejection of unknown error codes.
- Separated logical origin authority from resolved network destination authority; an origin grant no longer implies permission to connect to every resolver result.
- Separated resolved-address authorization from direct transport evidence; an approved IP now becomes a usable stream only after the operating system reports the exact requested IP and port.
- Separated exact TCP peer proof from authenticated TLS service identity; an observed peer becomes an authenticated HTTPS stream only after explicit-root, fixed-time, SAN-bound WebPKI verification over that same stream.
Expand All @@ -69,10 +70,12 @@ All notable changes to OriginWeave are documented in this file. The format follo
- Kept the revoked-stream fixture peer alive until local shutdown and fail-closed write classification complete, removing a macOS `ENOTCONN` race from the coverage path.
- Carried the existing connection-lifetime test repairs into the frame-transport stack so inherited tests no longer close the peer before the behavior under test completes; production cleanup errors remain fail-closed.
- Made opening-exchange tests wait for the complete client request and retain the peer until each client assertion finishes, avoiding premature connection closure in both successful and rejected handshakes without changing production error handling.
- Carried the verified connection-lifetime fixture repairs into the message-assembly stack while preserving its message and JSON validation behavior.
- Updated research doctoring to pin Chromium canonicalizer evidence to an immutable revision, add RFC 9293, RFC 5280, RFC 8446, RFC 9525, rustls 0.23.42, and Rust `TcpStream` evidence, distinguish the April 2026 Fugu beta from the June 2026 release, and treat vendor benchmark claims as first-party evidence rather than independent validation.

### Security

- WebDriver BiDi local-end error envelopes now admit the 30-value rendered W3C `ErrorCode` CDDL plus the separately defined normative `no such client window` error; arbitrary strings still fail closed, and realistic loopback coverage exercises both that compatibility exception and the hostile unknown-code path.
- Raw page content cannot become a trusted instruction.
- Raw secrets are rejected and secret-capable actions require an opaque broker handle.
- Crawler mode is read-only, must pair with the public-crawl purpose, and fails closed without an applicable robots-policy decision.
Expand Down
22 changes: 19 additions & 3 deletions crates/originweave-network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@
//! peers before exposing transport I/O, and emits credential-free evidence.
//! It also bridges a session-correlated WebDriver BiDi loopback target from
//! `originweave-core` into one bounded exact TCP connection, binds and validates
//! the RFC 6455 opening exchange, and provides bounded masked client writes and
//! unmasked server-frame reads without granting browser, TLS, policy, or Agent
//! authority.
//! the RFC 6455 opening exchange, provides bounded masked client writes and
//! unmasked server-frame reads, assembles bounded WebDriver BiDi text messages, and
//! classifies complete local-end JSON envelopes without exposing generic JSON bodies
//! or granting browser, TLS, policy, secret, or Agent authority.

#![forbid(unsafe_code)]
#![deny(missing_docs)]

mod connection;
mod webdriver_bidi_connection;
mod webdriver_bidi_json_envelope;
mod webdriver_bidi_websocket_frame;
mod webdriver_bidi_websocket_handshake;
mod webdriver_bidi_websocket_message;
mod webdriver_bidi_websocket_opening_recovery;

#[cfg(test)]
mod webdriver_bidi_json_envelope_public_boundary_tests;

pub use connection::{
ConnectionPlan, DirectTcpConnection, MAX_CONNECT_TIMEOUT, MAX_CONNECTION_ATTEMPTS,
NetworkError, SocketConnectionEvidence,
Expand All @@ -26,6 +32,10 @@ pub use webdriver_bidi_connection::{
WebDriverBiDiTcpConnection, WebDriverBiDiTcpConnectionError,
WebDriverBiDiTcpConnectionEvidence, WebDriverBiDiTcpConnectionPlan,
};
pub use webdriver_bidi_json_envelope::{
MAX_WEBDRIVER_BIDI_JS_UINT, MAX_WEBDRIVER_BIDI_JSON_DEPTH, WebDriverBiDiJsonEnvelope,
WebDriverBiDiJsonEnvelopeError, WebDriverBiDiJsonEnvelopeKind,
};
pub use webdriver_bidi_websocket_frame::{
MAX_WEBSOCKET_FRAME_PAYLOAD_SIZE, MAX_WEBSOCKET_FRAME_TIMEOUT,
WebDriverBiDiWebSocketEstablished, WebDriverBiDiWebSocketFrame,
Expand All @@ -38,4 +48,10 @@ pub use webdriver_bidi_websocket_handshake::{
WebDriverBiDiWebSocketHandshakeError, WebDriverBiDiWebSocketHandshakeResponseError,
WebDriverBiDiWebSocketOpeningWriteError,
};
pub use webdriver_bidi_websocket_message::{
MAX_WEBDRIVER_BIDI_MESSAGE_SIZE, WebDriverBiDiWebSocketControlKind,
WebDriverBiDiWebSocketControlMessage, WebDriverBiDiWebSocketMessageAssembler,
WebDriverBiDiWebSocketMessageAssembly, WebDriverBiDiWebSocketMessageError,
WebDriverBiDiWebSocketTextMessage,
};
pub use webdriver_bidi_websocket_opening_recovery::WebDriverBiDiWebSocketOpeningWriteRecoveryDisposition;
Loading
Loading