Skip to content

fix(episode): mint an episode's run id in its task's namespace - #572

Merged
earakely-scale merged 1 commit into
mainfrom
edgararakelyan/episode-run-namespace
Nov 9, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
edgararakelyan/episode-run-namespace

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

An episode's run id was a bare uuid4().hex. agent-env run and the local runner mint run ids with new_instance_id(task_id) instead, which keeps an @local task's namespace.

A step that names what it writes after the run therefore got a bare id in an episode of an @local task, and the local-run write fence refused it. run_container_unit_tests_verifier is one such step: it names its stdout and stderr FileArtifacts after the run. So a container grader that writes a reward file (reward_path, Harbor's /logs/verifier/reward.txt) failed with LocalRunWriteError in an OpenEnv episode, while the same task graded fine under agent-env run. The workaround was verify_sandbox with bash_cmd_succeeds, which turns a fractional reward into pass/fail.

Episodes now mint their id with new_instance_id, as agent-env run does. The verifier's fractional score then reaches the OpenEnv reward unchanged (reward_of passes it through).

Tests

  • tst/unit/task/local_run_write_fence_test.py::test_an_local_episodes_verifier_outputs_are_named_after_its_run runs the real verifier inside an episode of an @local task. It runs against configured stores that fail the test on any write, and allows loopback only, for the in-process proxy. It fails before the fix with LocalRunWriteError and passes after.
  • On Linux (Ubuntu 24.04, Python 3.12), make unit-test passed apart from four tests that also fail on main on that box: two need unzip, and two are MCP CLI codegen tests whose generated scripts fail an import there. 14,133 passed, 9 skipped.
  • ruff check is clean.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Episodes now use new_instance_id to keep their task’s namespace.

  • Episode runs keep their task's namespace in their IDs.

Reviews (1) · Last reviewed commit: "fix(episode): mint an episode's run id i..." · Reviewed by Greptile

An episode's run id was a bare uuid4 hex, while `agent-env run` and the
local runner mint theirs with new_instance_id(task_id), which keeps an
@Local task's namespace. A step that names what it writes after the run,
such as run_container_unit_tests_verifier's stdout and stderr artifacts,
got a bare id in an episode of an @Local task, and the local-run write
fence refused it. A container grader writing its reward file could grade
the task under `agent-env run` but not as an OpenEnv episode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 9, 2026 19:05
@earakely-scale
earakely-scale merged commit 428e93a into main Nov 9, 2026
34 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/episode-run-namespace branch November 9, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant