Skip to content

openenv: raise the tbench2_env contract floor to OpenEnv#1025 - #2811

Merged
nblintao merged 1 commit into
mainfrom
tao/openenv-floor-1025
Sep 2, 2026
Merged

openenv: raise the tbench2_env contract floor to OpenEnv#1025#2811
nblintao merged 1 commit into
mainfrom
tao/openenv-floor-1025

Conversation

@nblintao

Copy link
Copy Markdown
Contributor

Why

huggingface/OpenEnv#1025 (merged 2026-08-29, 38b2a3135) closes the gap @Shi-Dong spotted: a canonical tests/test.sh run whose verifier never wrote reward.txt used to come back as reward=0.0 with the harness="tests/test.sh" marker — byte-for-byte a genuine test failure. Now the server reports it through observation.error / reward=None.

Nothing on the miles side worked around that bug (nothing could — the reply looked valid), so there is nothing to delete. The fix lands in the existing guard's reward is None or eval_error branch and, in #2802, in the eval_errorno_verdict_reason mapping; neither changes. The harness != "tests/test.sh" branch stays: it covers pre-#1012 installs and the pytest fallback, which #1025 did not touch.

What

  • Launcher preflight (openenv_launch_common.py): the source probe of the installed tbench2_env now also requires _require_canonical_verdict. A pre-Security: Remote code execution risk from trust_remote_code=True in model bridge loading #1025 install is the one case the per-episode marker guard cannot catch (the fake 0 carries the marker), so the install-time probe is the only place to reject it. All three sandbox backends bake this install into their task images, so one probe covers them.
  • Contract floor in the README and the four agent-function module docstrings: #1012 (04d259ea6)#1025 (38b2a3135).
  • Guard comment in multi_turn: the reward=None / error bullet now names "test.sh never wrote reward.txt" alongside toolkit timeout / staging I/O.

Not in this PR

Validation

No test changes: the guard and its tests are unchanged; the preflight has no unit test today (it imports the real tbench2_env). Fast tests run in CI (no torch locally).

🤖 Generated with Claude Code

huggingface/OpenEnv#1025 (38b2a3135) makes a canonical test.sh run that
never writes reward.txt a scoring error instead of reward 0.0. Before it,
that reply carried the harness marker and looked exactly like tests
failing, so the per-episode guard in multi_turn could not drop it; the
launcher's source probe is the only place that can catch such an install.

- launcher preflight also requires `_require_canonical_verdict` in the
  installed server source; error message points at #1025
- README / module docstrings: floor moved from #1012 (04d259ea6) to
  #1025 (38b2a3135)
- multi_turn guard comment lists the no-verdict case under the
  reward=None / error branch

The guard itself is unchanged: the new server behavior lands in its
existing `reward is None or error` branch, and the harness-marker branch
still covers old installs and the pytest fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@nblintao
nblintao requested a review from Shi-Dong August 29, 2026 03:22

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@Shi-Dong

Shi-Dong commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@claude review always

@claude claude 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.

Code review found no issues

No high-confidence issues detected in this change.

@Shi-Dong Shi-Dong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@nblintao
nblintao merged commit 0709889 into main Sep 2, 2026
25 checks passed
@nblintao
nblintao deleted the tao/openenv-floor-1025 branch September 2, 2026 15:15
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