mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-12-02 04:23:32 +01:00
test(pi): batch fixture startup records on the pipe
This commit is contained in:
1 parent
8c6ac9374b
commit
afaaf3166b
1 file changed
+4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user