Skip to content

Leave harness failures out of Terminal-Bench and TBLite scores and fail above a budget - #539

Merged
abhishekraok merged 12 commits into
mainfrom
claude/tb-harness-failures
Nov 10, 2026
Merged

abhishekraok merged 12 commits into
mainfrom
claude/tb-harness-failures

Conversation

@abhishekraok

Copy link
Copy Markdown
Collaborator

Written by Claude Code session review-388-2bb346

Fixes tb-harness-failures (#537): Terminal-Bench and OpenThoughts-TBLite scored harness and infrastructure failures as 0 and always reported success. Stacked on swe-v-harness-failures-fix (#538), whose evals/external/failures.py it reuses; retarget to main once that merges.

Change

Same design as #538:

  • Harness failures are not scored. A trial whose image build, container, verifier (verifier_timeout, reward_file_missing, reward_parse_error) or model server failed is left out of pass_rate, pass@k, pass_rate_std/sem and the per-difficulty and per-category rates. Its prediction carries reward: None. num_errors, error_rate and new num_measured count them.
  • pass_rate_adjusted is dropped: it would now always equal pass_rate.
  • Failure budget. New max_error_rate argument (default 0.05). The run fails when more than that fraction of trials failed this way, or when all did; it used to hard-code success=True.
  • Model protocol errors stay scored. An openai_agents ModelBehaviorError or refusal is recorded as model_error: ... and scored; a vanillux provider failure is recorded as agent_error: ... (it was the bare message before) and is a harness failure. Agent timeouts and max turns are unchanged.

Affected

terminal_bench_2 and openthoughts_tblite, for runs with errored trials; runs without one are unchanged. A result-compatibility entry is included.

Validation

uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run ty check src/
uv run pytest tests/evals/external -q

All pass. New tests: errored trials left out of pass_rate and pass@k, the budget at execute() level (one verifier timeout in four trials fails at the default and passes at 0.25), a run where every trial raised fails, and model-error versus provider-error classification. No Beaker run: accounting only.

🤖 Generated with Claude Code

abhishekraok and others added 3 commits November 3, 2026 11:41
…run above a budget

Instances the harness or infrastructure failed are no longer scored as
unresolved: resolve_rate and the other rates leave them out, num_errors
and error_rate count them, and the run fails when more than
max_error_rate (default 0.05) of instances failed that way. resume_from
reruns those instances. A scaffold-reported model protocol error
(openai_agents' ModelBehaviorError or a refusal) is the model's own and
stays scored, recorded as model_error.

The accounting lives in evals/external/failures.py so Terminal-Bench can
share it.

Fixes #487

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…il the run above a budget

Trials the harness or infrastructure failed (image build, container,
verifier timeout or unreadable reward, model server) no longer count as 0:
pass_rate, pass@k, the per-attempt spread and the per-difficulty and
per-category rates leave them out, and num_errors and error_rate count
them. pass_rate_adjusted, now identical to pass_rate, is dropped. The run
fails when more than max_error_rate (default 0.05) of trials failed that
way, instead of always reporting success. An openai_agents model protocol
error stays a scored trial, recorded as model_error.

Uses the accounting shared with SWE-bench Verified.

Fixes #537

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abhishekraok
abhishekraok requested a review from a team as a code owner November 3, 2026 19:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T01:09:29.088297Z 12ece33 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e1c915a7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

abhishekraok and others added 3 commits November 3, 2026 14:49
A model_error recorded by the scaffold kept an instance scored even when
patch extraction or grading then failed, since the sandbox and grading
handlers only set an error when none was recorded. They now record the
harness failure and keep the model error's message after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d1c7fa063

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gregorybchris gregorybchris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was generated by an agent following REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.

Looks good overall! Reusing failures.py from #538 keeps the two evals consistent, and the tests cover the failure budget, the all-failed run, and the model-error override. I ran ruff check, ruff format --check, ty check src/ and pytest tests/evals/external locally on 8d1c7fa, and all pass.

Approving, with one condition: please resolve the inline pass@k comment (src/olmo_eval/evals/external/benchmarks/terminal_bench/eval.py:232) before merging. Once #538 merges and this PR is retargeted to main, you may merge after that fix when CI is green.

abhishekraok and others added 4 commits November 9, 2026 16:39
@abhishekraok
abhishekraok changed the base branch from claude/swe-v-harness-failures to main November 10, 2026 00:53
# Conflicts:
#	docs/result-compatibility.md
@abhishekraok
abhishekraok added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 1271d24 Nov 10, 2026
8 checks passed
@abhishekraok
abhishekraok deleted the claude/tb-harness-failures branch November 10, 2026 01:24
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.

2 participants