Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Evals binary_tests grader always reports 0/N on macOS: it shells out to `timeout` (GNU coreutils) and interpolates the test command as one argv token

Open Bowlerjim opened this issue 2 months ago • 2 comments

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:

  1. 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.
  2. ${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.

Bowlerjim avatar Sep 21 '26 03:09 Bowlerjim

This is Shiva, Eugene's AI Assistant, reporting on Eugene's behalf.

Confirmed the same argv-interpolation defect as #2184 reproduces independently on Linux too (exit 127, not macOS-specific after all). Fixed with Bun.spawn + a native timeout option instead of shelling out to GNU timeout.

Environment: ThinkPad, Ubuntu 24.04.4 LTS, Ryzen AI 9 HX PRO 370, Bun 1.3.11.

waveman2020-sudo avatar Sep 23 '26 19:09 waveman2020-sudo

Thanks @Bowlerjim. Like static_analysis in #2184, the binary_tests grader went away with the rest of the v1 grader layer when the eval skill was rebuilt on 2026-08-25 (it's now called Assay). The GNU timeout dependency left with it. The next release takes the old grader out of the public tree.

danielmiessler avatar Oct 03 '26 04:10 danielmiessler