Skip to content

Fix local eval source loading and placement - #670

Merged
jdchawla29 merged 5 commits into
mainfrom
codex/local-eval
Sep 17, 2026
Merged

jdchawla29 merged 5 commits into
mainfrom
codex/local-eval

Conversation

@jdchawla29

@jdchawla29 jdchawla29 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

hud eval could reconstruct only a template file from a split environment, dropping startup hooks or rejecting templates spread across modules. Bound Python tasks now run their original task file or directory in each child process. The existing environment loader resolves both exported environments and environments bound to exported tasks, including verifiers. Rows that only name an environment use the source directory; image and Compose rows use Docker.

Source selection no longer depends on an env.py filename, template function locations, or Python's import cache. Distinct environments with the same name in the selected source are ambiguous; re-exports of the same instance are accepted. No task fields, CLI flags, or runtime APIs are added.

The shared source loader supports package-relative imports, rejects conflicting package roots, and reuses modules during directory scans. Standalone files whose names are already occupied use a private module name, preserving existing imports. Package re-exports remain cached so later scans do not register their templates again.

LocalRuntime serializes startup, serving, and shutdown for each environment instance, including cached sources and instances shared by separate providers. Different instances remain concurrent. Idle locks are discarded.

Platform tasksets can use --runtime local when every task and separately placed verifier supplies an image or Compose configuration. The CLI and runtime docs describe source selection and the limits of process isolation.

Validation:

  • Full non-integration suite: 1,374 passed, 2 skipped, 17 deselected.
  • Ruff lint/format, ty, and git diff --check passed.
  • Regression tests reproduce both new review findings and a package re-export failure before the fixes. Lifecycle coverage includes single/split/assembled sources, task collections, name-only Python/JSON/JSONL rows, directory ambiguity, package imports, concurrent rollouts, cleanup, and shared/separate verifiers.
  • LocalRuntime lifecycle tests cover cached directory/file/package sources, factories, separate providers, cancellation, concurrent fresh instances, and successive event loops.
  • The shipped blank environment completed four subprocess rollouts with a deterministic agent, full reward, and no errors.
  • The monorepo trace-explorer source loaded its task and all 15 templates; its external services and evaluation were not run.

Live Docker and cloud execution were not exercised; container routing is tested at the provider boundary.


Note

Medium Risk
Changes core eval placement and Python source import semantics used by every local run; mistakes could break split env layouts or platform --runtime local, though coverage is broad and APIs are unchanged.

Overview
Local hud eval now spawns the task source you passed (file or directory) in each child process, instead of reconstructing placement from a bound template module. That keeps split/assembled projects, hooks, and multi-module templates intact. load_environment and the shared source importer resolve environments from exported Environment objects and from tasks (including verifiers), dedupe re-exports, reject ambiguous same-name distinct envs, support package-relative imports, cache directory scans, and error when the same package name was already loaded from another root.

--runtime local on platform tasksets is allowed only when every task—and any separately placed verifier—has an image or Compose runtime_config; otherwise the CLI still refuses with no on-disk env source.

LocalRuntime serializes acquisitions per shared Environment instance via per-env locks (not only live-instance mode), with new lifecycle/cancellation tests. Docs for placement, hud eval, and runtimes are updated to match subprocess vs in-process behavior and isolation limits.

Extensive CLI, loader, and runtime regression tests cover project layouts, JSON/JSONL rows, verifiers, and platform local routing.

Reviewed by Cursor Bugbot for commit e748aaf. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T03:59:05.369127Z e748aaf 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: 8869123b94

ℹ️ 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".

Comment thread hud/utils/modules.py

@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: 19587ae29d

ℹ️ 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".

Comment thread hud/cli/eval.py Outdated

@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: 90e7fa59af

ℹ️ 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".

Comment thread hud/utils/modules.py

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 90e7fa5. Configure here.

Comment thread hud/cli/eval.py Outdated

@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: 5b1dc3f665

ℹ️ 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".

Comment thread hud/utils/modules.py
@jdchawla29
jdchawla29 merged commit b7b9861 into main Sep 17, 2026
8 checks passed
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