fix(v1): collect isolated judge artifacts in owned rollouts - #2468
fix(v1): collect isolated judge artifacts in owned rollouts#2468xeophon wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6ca8baa71
ℹ️ 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".
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This change modifies the production rollout lifecycle so isolated judging can transfer artifacts before the solver runtime is destroyed. Unresolved concrete findings still raise a possible pre-solver failure in the episode-agent forwarding path, so that execution path requires verification. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
a6ca8ba to
d7c99e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7c99e06f8
ℹ️ 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".
d7c99e0 to
0df3f33
Compare
Overview
Collect isolated solver artifacts through the normal Agent.run owned-runtime lifecycle, after task finalization and before scoring and teardown.
Details
Related work
This is an alternative implementation of the artifact-lifecycle problem reported in #2342 by @crazywriter1. It preserves Agent.run ownership and whole-rollout retry semantics while reusing the same artifact representation consumed by JudgeTask.
It complements #2464: that PR hardens artifact transfer and restoration boundaries, while this PR controls when the existing collection path runs before an owned solver runtime is torn down.
Note
Medium Risk
Changes rollout teardown timing and artifact population semantics; callers that relied on task
finalizefor artifacts must opt in withcollect_artifacts=True, and isolated judging now depends on container solver runtimes.Overview
Adds an opt-in
collect_artifactsflag onAgent.run(andRollout) so declared task artifacts are gathered afterfinalizewhile the owned container runtime is still up, without tasks implementing their own collection.IsolatedAgenticJudgeEnvenables this on the solver rollout soJudgeTask.from_trace(..., share_runtime=False)receivessolution.state.artifactsbefore the solver box is torn down.collect_artifacts=Trueis rejected for subprocess runtimes (host-only temp cwd).Rollout finalize is now bounded with
asyncio.timeoutinstead ofwait_for; collection runs only when artifacts are still empty, so a customfinalizethat already populatedtrace.state.artifactsis left alone. The echo agentic fixture drops its task-levelfinalizein favor of this path.Reviewed by Cursor Bugbot for commit 0df3f33. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
collect_artifactsflag toRolloutandAgent.runfor isolated judge rolloutscollect_artifactsboolean parameter (defaultFalse) toRollout.__init__,Agent.run,Agent._run_once, and_EpisodeAgent.run, propagating the flag through to the rollout.collect_artifacts=True,Rollout.closecollects artifacts viacollect(runtime, self.task.data.artifacts)aftertask.finalizeiftrace.state.artifactsis still empty.IsolatedAgenticJudgeEnv.runnow passescollect_artifacts=Trueto the solver agent so judge can access solver-produced artifacts.asyncio.wait_forwith anasyncio.timeoutcontext manager inRollout.closefor the finalize phase; timeout behavior is unchanged.EchoAgenticTask.finalizemethod in the test fixture since artifact collection is now handled by the rollout.Agent._run_onceraisesTypeErrorwhencollect_artifacts=Trueand the resolved runtime is aSubprocessConfig; callers passing the flag with a subprocess runtime will fail at runtime.Macroscope summarized 0df3f33.