Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

refactor(spawn): eval harnesses launch through src/core/spawn.ts (#4992)

garrytanc458d1224b52
diff --git a/src/eval/brainbench/trust-scenario.ts b/src/eval/brainbench/trust-scenario.ts
index 9e374e7574..bd74d271ba 100644
--- a/src/eval/brainbench/trust-scenario.ts
+++ b/src/eval/brainbench/trust-scenario.ts
@@ -30,7 +30,7 @@
* table reset is needed. Hermetic: no embedding provider, no model calls.
*/
-import { execFileSync } from 'node:child_process';
+import { execFileSync } from '../../core/spawn.ts';
import { randomUUID } from 'node:crypto';
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
diff --git a/src/eval/code-retrieval/harness.ts b/src/eval/code-retrieval/harness.ts
index ece7b036b6..25973d9215 100644
--- a/src/eval/code-retrieval/harness.ts
+++ b/src/eval/code-retrieval/harness.ts
@@ -289,7 +289,7 @@ export async function runCodeRetrievalEval(
let commit = 'unknown';
try {
- const { execSync } = await import('child_process');
+ const { execSync } = await import('../../core/spawn.ts');
commit = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim();
} catch {
// Not in a git repo or git unavailable — leave as 'unknown'