From 6606bd4b60e47cafa0f05239c602b61d2e82ba98 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 05:35:22 +0000 Subject: [PATCH] Validate terminal.run RPC success in smoke test Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 6c735cfb3b..7c07ce5e70 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -1606,6 +1606,26 @@ async function main() { throw new Error("Smoke test failed: removed todo is still present in todos list."); } + const terminalRunResponse = await sendWsRequest(ws, { + id: "smoke-terminal-run", + method: "terminal.run", + params: { + command: "echo smoke-terminal-ok", + cwd: appRoot, + timeoutMs: 5_000, + }, + }); + if ( + terminalRunResponse.ok !== true || + typeof terminalRunResponse.result?.stdout !== "string" || + !terminalRunResponse.result.stdout.toLowerCase().includes("smoke-terminal-ok") || + terminalRunResponse.result?.stderr !== "" || + terminalRunResponse.result?.timedOut !== false || + terminalRunResponse.result?.code !== 0 + ) { + throw new Error("Smoke test failed: terminal.run response payload mismatch."); + } + const duplicateTokenWhileConnectedWs = new WebSocket( `${parsedWsUrl.origin}${parsedWsUrl.pathname}?token=${encodeURIComponent( parsedWsUrl.searchParams.get("token") ?? "",