Skip to content

Refuse a code-execution task under a harness without sandboxes - #491

Merged
gregorybchris merged 6 commits into
mainfrom
chrisg/sandbox-scoring-checks
Oct 26, 2026
Merged

gregorybchris merged 6 commits into
mainfrom
chrisg/sandbox-scoring-checks

Conversation

@gregorybchris

@gregorybchris gregorybchris commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A task that scores by running code, such as humaneval:olmo3base or livecodebench (76 specs in all), now fails during task preparation when the harness has no sandboxes, before any response is generated:

$ uv run olmo-eval run -m mock -t humaneval:olmo3base -o limit=2 --no-upload
Evaluation failed: Failed to prepare 1 task(s):
  - humaneval:olmo3base: humaneval:olmo3base scores by running code, so it has to run under a harness with sandboxes,
for example `--harness codex_universal`; harness 'default' has none.

The message suggests codex_universal because it serves every code task: its sandbox-fusion image has the MultiPL-E compilers, and it carries BigCodeBench's image. codex_python has only a Python image.

Why

The runner starts a sandbox manager only when harness_config.sandboxes is set. Without one, every execution scorer raises SandboxRequiredError at scoring time. Since #492, each instance is then left unscored, and the task fails its failure budget with "No instance was scored out of N … First failure: SandboxRequiredError …". So the run already fails, but only after generating every response, which with a real model can take hours, and the message says to "Configure sandboxes in HarnessConfig" without naming a harness that has them.

This check stops the run before the model loads and says which harness to use.

Change

AsyncEvalRunner._check_sandbox runs next to the scaffold check from #489, before prepare_task_items loads the data. It refuses a task that has at least one ExecutionScorer when the harness has no sandboxes.

  • Both checks build the task with the run's task overrides, so an override that changes the scorers, such as metrics, is taken into account. The scaffold check previously built the task without overrides.
  • A task that fails a check fails task preparation, so the whole run stops. In a suite that mixes code and non-code tasks under a harness without sandboxes, the non-code tasks don't run either. The scaffold check already behaves this way.
  • The scoring-time gate in Task._apply_scorers_async stays as the backstop: SandboxRequiredError when no sandbox is configured, SandboxInfrastructureError when sandboxes are configured but none with the capability is running.
  • A --dry-run stops before task preparation, so it is unaffected. No task's requests, scores or hash change.

Not in this PR

Addresses the up-front check asked for in #423.

Testing

  • TestRequiredSandbox in tests/test_runner.py:

    • refuses humaneval:olmo3base without sandboxes, before the data loads; the message names the harness and suggests codex_universal
    • in a run with two tasks, names only the one that runs code
    • accepts humaneval:olmo3base with a sandbox configured
    • accepts it without sandboxes when a task override replaces its metrics with one that runs no code
    • lets a task that runs no code proceed without one

    The two refusal tests fail with the check disabled, and the override test fails when the check builds the task without overrides. The others are positive controls.

  • On d60f81f2 (main with Count scoring failures against the failure budget instead of as zeros #492): uv run ruff check src/ tests/, uv run ruff format --check src/ tests/, uv run ty check src/, and uv run pytest tests/ --ignore=tests/integration (4,116 passed, 36 skipped) all pass.

  • With the check disabled on the same base, the mock command above generates both responses, leaves both unscored with SandboxRequiredError, and fails with FailureBudgetExceeded, exit code 1.

Beaker check

Commit b2d5f6c9, from before the rebases onto main. The check's code is unchanged since; later commits only add a test. On ai2/holmes, in ai2/oe-olmo3p5-eval:

Run Result Experiment
humaneval:olmo3base under the default harness (mock model) Refused at task preparation 15 s after the job started, with the new message; no model loaded 01M5445E
humaneval:olmo3base and multipl_e_humaneval_cpp:pass_at_1 under --harness codex_universal, Qwen/Qwen3-4B-Instruct-2507, limit=20 each Both scored every output (640 and 400), none with scoring_errors. pass@1 0.738 and 0.798 01M546F6

The second run confirms that the suggested harness serves a compiled MultiPL-E language as well as Python.

🤖 Generated with Claude Code

gregorybchris and others added 2 commits October 22, 2026 16:09
Without sandboxes the runner starts no executor, so every execution scorer
raised SandboxRequiredError after generation, and the runner recorded each
instance as 0. Check while tasks are prepared, before the data loads.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
codex_python has only a Python image, so MultiPL-E's compilers and
BigCodeBench's packages are missing under it. Fold the message test into the
refusal test and test a run where only one task runs code.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@gregorybchris
gregorybchris enabled auto-merge (squash) October 26, 2026 19:11
@gregorybchris
gregorybchris merged commit 63d9d8c into main Oct 26, 2026
8 checks passed
@gregorybchris
gregorybchris deleted the chrisg/sandbox-scoring-checks branch October 26, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant