Tighten v1 EnvConfig typing#1371
Merged
Merged
Conversation
bd77d34 to
5452b7e
Compare
5452b7e to
5e004c4
Compare
5e004c4 to
925b80f
Compare
925b80f to
8b242c6
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8b242c6. Configure here.
8b242c6 to
a5bcb59
Compare
a5bcb59 to
1719184
Compare
willccbb
commented
May 14, 2026
| ) -> GroupRewardTaskset: | ||
| config = GroupRewardTasksetConfig(config, num_examples=num_examples) | ||
|
|
||
| def load_taskset(config: GroupRewardTasksetConfig) -> GroupRewardTaskset: |
Member
Author
There was a problem hiding this comment.
wdym here? GRTasksetConfig is a TasksetConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
EnvConfigto only exposetasksetandharnessvf.Configfields from their annotations, recursivelySkipValidationand optional public loader configsValidation
uv run pre-commit run --files ...uv run --group policy semgrep --metrics=off --disable-version-check --config .semgrep/verifiers.yml --error --quietuv run --python 3.13 ty check verifiersgit diff --checkNote
Medium Risk
This changes core v1 configuration parsing/merging and loader contracts across many bundled environments, which could break existing callers that relied on optional/kwargs-based env args or
Nonechild sections.Overview
Tightens the v1 loader/config contract around typed
EnvConfigchild sections.vf.EnvConfignow exposes only requiredtasksetandharnessconfig objects (no rootargs), defaults them to baseTasksetConfig/HarnessConfig, rejectsNone, forbids extra root fields inEnvConfigsubclasses, and adds automatic default factories for annotation-only nestedvf.Configfields.Updates v1 environments, docs, and templates to be taskset-first and config-driven. Public
load_taskset/load_harnessloaders now require a concrete config type (no| Nonedefaults/kwargs mirroring), many example environments add concreteEnvConfigsubclasses to bind custom child config types, and theprime env inittemplate adds--with-harnessto generate an explicitload_harnessstub.Adds policy enforcement and coverage. New Semgrep rules ban broad
SkipValidationusage and optional public loader configs,verifiers/serve/types.pycentralizes the remainingSkipValidationbehind protocol-boundary type aliases with waivers, and tests are updated/added to validate the newEnvConfigbehavior and updated environment loaders.Reviewed by Cursor Bugbot for commit 1719184. Bugbot is set up for automated code reviews on this repo. Configure here.