From afaaf3166ba395260ac876d30a252c46a4727179 Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Fri, 20 Nov 2026 20:36:45 +0800 Subject: [PATCH] test(pi): batch fixture startup records on the pipe --- runtime/pi/test/worker.test.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/pi/test/worker.test.mjs b/runtime/pi/test/worker.test.mjs index 9d6170ce..a4099fef 100644 --- a/runtime/pi/test/worker.test.mjs +++ b/runtime/pi/test/worker.test.mjs @@ -56,8 +56,12 @@ async function invoke(t, request, onRecord = () => {}, env = fixtureEnv) { worker.stdout.on("data", chunk => { for (const r of reader.push(chunk)) { records.push(r); + // Deliver the run and any synchronous startup commands in the same write. + // Separate pipe writes can let the first model request start between them. + worker.stdin.cork(); if (r.type === "ready") send({ type: "run", version: 1, request }); onRecord(r, send); + worker.stdin.uncork(); } }); const [code] = await exit;