From 6ad9bda3c658c917124d4c48703f504b48847090 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 11:38:52 +0000 Subject: [PATCH] Cover overlong websocket request envelopes in runtime and smoke Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 14 ++++++++++++++ apps/t3/src/runtimeApiServer.test.ts | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index f33fa5de45..02adbd2eed 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -2140,6 +2140,20 @@ async function main() { unexpected: true, }), ); + ws.send( + JSON.stringify({ + type: "request", + id: "x".repeat(300), + method: "app.health", + }), + ); + ws.send( + JSON.stringify({ + type: "request", + id: "smoke-malformed-long-method", + method: "m".repeat(300), + }), + ); const postMalformedHealthResponse = await sendWsRequest(ws, { id: "smoke-health-after-malformed", method: "app.health", diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index 082c46a78f..661611d01d 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -756,6 +756,20 @@ describe("runtimeApiServer", () => { unexpected: true, }), ); + client.socket.send( + JSON.stringify({ + type: "request", + id: "x".repeat(300), + method: "todos.list", + }), + ); + client.socket.send( + JSON.stringify({ + type: "request", + id: "malformed-long-method", + method: "m".repeat(300), + }), + ); const response = await sendRequest( client.socket,