Allow large file writes over direct exec-server WebSockets (#54135)

## Why

Direct mode serves executor requests but applied the client's 8 KiB inbound request limit, causing larger `fs/writeFile` requests to disconnect the executor.

## What changed

Use a dedicated direct WebSocket connection constructor that omits the client inbound request limit while retaining WebSocket message and frame limits.

## Testing

Add a regression test that runs the direct environment and verifies successful file writes above the client request limit using both text and binary WebSocket messages.

GitOrigin-RevId: e8e77a5e8581ab9eb98446e23b77a6da41d64868
This commit is contained in:
ostepanian
2026-10-15 00:00:57 +00:00
committed by copyberry
parent 348ef773ee
commit 4ca84a1069
3 changed files with 114 additions and 1 deletions
+16
View File
@@ -481,6 +481,22 @@ impl JsonRpcConnection {
)
}
/// Direct mode dials the WebSocket but serves executor requests from the
/// harness. Do not apply the harness client's inbound request limit here;
/// the WebSocket transport still enforces its message and frame limits.
pub(crate) fn from_direct_websocket<T, E>(stream: T, connection_label: String) -> Self
where
T: Sink<Message, Error = E> + Stream<Item = Result<Message, E>> + Unpin + Send + 'static,
E: std::fmt::Display + Send + 'static,
{
Self::from_websocket_stream(
stream,
connection_label,
/*ping_interval*/ None,
/*max_inbound_request_len*/ None,
)
}
pub(crate) fn from_axum_websocket(stream: AxumWebSocket, connection_label: String) -> Self {
Self::from_websocket_stream(
stream,