Skip to content

Handle single-file env import#959

Open
willccbb wants to merge 4 commits intomainfrom
codex/treat-singlefile-envs-as-packages
Open

Handle single-file env import#959
willccbb wants to merge 4 commits intomainfrom
codex/treat-singlefile-envs-as-packages

Conversation

@willccbb
Copy link
Member

@willccbb willccbb commented Feb 25, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Medium Risk
Changes how eval run defaults are discovered from environment modules, which can alter num_examples/rollouts_per_example selection at runtime. The logic is small and covered by new tests, but impacts core CLI configuration behavior.

Overview
Eval CLI now loads per-environment eval defaults by locating the environment module on disk via importlib.util.find_spec, so defaults can be read from pyproject.toml for both package-based envs and single-file env modules (instead of only installed packages).

Adds targeted tests covering defaults resolution for package and single-file modules. Separately hardens CliAgentEnv interception handling by making _interception_server explicitly optional and routing access through _require_interception_server(), reducing the chance of None dereferences during rollout setup/teardown.

Written by Cursor Bugbot for commit 4bfde49. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

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 and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


if not pyproject_file.is_file():
logger.debug(f"pyproject.toml not found in installed package {module_name}")
logger.debug(f"pyproject.toml not found for installed module {module_name}")
Copy link

Choose a reason for hiding this comment

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

Skill docs missing for workflow change

Low Severity

This PR changes evaluation workflow behavior in verifiers/scripts/eval.py by altering how get_env_eval_defaults resolves pyproject.toml for environments, but no corresponding skills/*/SKILL.md updates are included. That violates the Skills Updates rule for user-facing workflow changes in verifiers/scripts/*.py.

Fix in Cursor Fix in Web

Triggered by project rule: BugBot Instructions

…e-envs-as-packages

# Conflicts:
#	verifiers/envs/experimental/cli_agent_env.py
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