From 1f2ddec728bf2b9347c58fe6eda101dd091bb7aa Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 1 Aug 2026 20:32:02 -0700 Subject: [PATCH] test(mcp): make tools-list fixture logs deterministic (#117772) Co-authored-by: Peter Steinberger --- src/agents/agent-bundle-mcp-runtime.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agents/agent-bundle-mcp-runtime.test.ts b/src/agents/agent-bundle-mcp-runtime.test.ts index c2f501c070fe..59cbcf3f733e 100644 --- a/src/agents/agent-bundle-mcp-runtime.test.ts +++ b/src/agents/agent-bundle-mcp-runtime.test.ts @@ -91,6 +91,7 @@ async function writeListToolsMcpServer(params: { await writeExecutable( params.filePath, `#!/usr/bin/env node +import { appendFileSync } from "node:fs"; import fs from "node:fs/promises"; const logPath = ${JSON.stringify(params.logPath)}; @@ -156,7 +157,7 @@ if (hangToolCallsUntilRestartMarkerPath) { } } function log(line) { - void fs.appendFile(logPath, line + "\\n", "utf8").catch(() => {}); + appendFileSync(logPath, line + "\\n", "utf8"); } function send(message) { process.stdout.write(JSON.stringify(message) + "\\n");