Skip to content

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 #2188

Description

@Bowlerjim

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions