test(websocket): connection-local overlay verification for browser-registered ops
Ported the alknet-http overlay verification to the channels-over-WS session (tests/ws_overlay_ops.rs, test-support feature, 8 tests): - overlay mechanism: browser-registered ops land in the connection's Layer 2 overlay (register_imported), exposed via overlay_env() — no PeerIds (browsers are not peers); PeerRef::Specific to a browser id routes to nothing (NOT_FOUND) - hub→browser call through compose_root_env's attached overlay - AccessControl on browser ops gates hub calls (scope match allows, missing scope FORBIDDEN) - overlay dies with the connection; no leak between connections; in-flight calls to browser ops resolve on close - wire-level: 10 interleaved concurrent calls across two WS sessions — no cross-correlation, no deadlock; disconnect mid-call resolves and a fresh session works (no listener wedge) byte_adapter: read_eof Notify now gated to the wss feature (its only consumer is from_wss) so a test-support-only build is warning-free. Verified: cargo test (182 lib), --all-features (227 lib + 5 MCP + 8 overlay + 10 WS integration), clippy -D warnings (default, test-support, all-features), fmt.
This commit is contained in:
@@ -13,9 +13,11 @@ pub mod byte_adapter;
|
||||
pub mod upgrade;
|
||||
|
||||
pub use byte_adapter::{
|
||||
split_tungstenite_to_bytes, split_ws_to_bytes, WsByteStream, WsPumps, WS_MESSAGE_CAP,
|
||||
WS_PROTOCOL_ERROR,
|
||||
split_ws_to_bytes, WsByteStream, WsPumps, WS_MESSAGE_CAP, WS_PROTOCOL_ERROR,
|
||||
};
|
||||
|
||||
#[cfg(any(test, feature = "wss"))]
|
||||
pub use byte_adapter::split_tungstenite_to_bytes;
|
||||
pub use upgrade::{run_channels_session, ws_bearer_auth, ws_upgrade_handler};
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
|
||||
Reference in New Issue
Block a user