Observed on 7.54.0, macOS.
What
// skills/Evals/Graders/CodeBased/BinaryTests.ts:33
const result = await $`cd ${workingDir} && timeout ${Math.ceil(timeout/1000)} ${command} ${testFile}`
.quiet().nothrow();
Two defects in one line:
timeout is GNU coreutils. It does not exist on a stock macOS install, so the shell answers command not found and every test file is graded failed.
${command} is interpolated as a single argv token (same root cause as the static_analysis grader), so even with timeout present a multi-word test command would not run.
Repro
Fixture t.test.ts containing one trivially passing bun test case, graded via binary_tests:
"score": 0, "passed": false, "reasoning": "0/1 tests passed",
"results": [{"file":"t.test.ts","passed":false,"error":"bun: command not found: timeout\n"}]
while bun test t.test.ts in the same directory reports 0 fail / Ran 1 test.
Expected
1/1 tests passed.
Why it matters
Unlike the static_analysis sibling this one fails safe, but it makes the grader unusable on the platform LifeOS primarily targets: every passing suite is reported as a total failure.
Fix sketch
Drop the timeout binary in favour of Bun.spawn's own timeout option, and split the command into argv (or run it via sh -c) rather than interpolating it as one token.
Observed on 7.54.0, macOS.
What
Two defects in one line:
timeoutis GNU coreutils. It does not exist on a stock macOS install, so the shell answerscommand not foundand every test file is graded failed.${command}is interpolated as a single argv token (same root cause as thestatic_analysisgrader), so even withtimeoutpresent a multi-word test command would not run.Repro
Fixture
t.test.tscontaining one trivially passingbun testcase, graded viabinary_tests:while
bun test t.test.tsin the same directory reports0 fail / Ran 1 test.Expected
1/1 tests passed.Why it matters
Unlike the
static_analysissibling this one fails safe, but it makes the grader unusable on the platform LifeOS primarily targets: every passing suite is reported as a total failure.Fix sketch
Drop the
timeoutbinary in favour ofBun.spawn's owntimeoutoption, and split the command into argv (or run it viash -c) rather than interpolating it as one token.