From f2468feb865073ef08228949e1bc2a4ccd9113e1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 2 Mar 2026 14:10:45 +0000 Subject: [PATCH] test(perf): use shell resolver fixture in secrets audit --- src/secrets/audit.test.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/secrets/audit.test.ts b/src/secrets/audit.test.ts index 97ba1aa67..a784cf3fc 100644 --- a/src/secrets/audit.test.ts +++ b/src/secrets/audit.test.ts @@ -139,16 +139,14 @@ describe("secrets audit", () => { return; } const execLogPath = path.join(fixture.rootDir, "exec-calls.log"); - const execScriptPath = path.join(fixture.rootDir, "resolver.mjs"); + const execScriptPath = path.join(fixture.rootDir, "resolver.sh"); await fs.writeFile( execScriptPath, [ - `#!${process.execPath}`, - "import fs from 'node:fs';", - "const req = JSON.parse(fs.readFileSync(0, 'utf8'));", - `fs.appendFileSync(${JSON.stringify(execLogPath)}, 'x\\n');`, - "const values = Object.fromEntries((req.ids ?? []).map((id) => [id, `value:${id}`]));", - "process.stdout.write(JSON.stringify({ protocolVersion: 1, values }));", + "#!/bin/sh", + `printf 'x\\n' >> ${JSON.stringify(execLogPath)}`, + "cat >/dev/null", + 'printf \'{"protocolVersion":1,"values":{"providers/openai/apiKey":"value:providers/openai/apiKey","providers/moonshot/apiKey":"value:providers/moonshot/apiKey"}}\'', ].join("\n"), { encoding: "utf8", mode: 0o700 }, );