Skip to content

Comments

Expose render_completion + add_trajectory_step, private/final guardrails#679

Merged
willccbb merged 5 commits intomainfrom
will/abstract-render-completion
Jan 4, 2026
Merged

Expose render_completion + add_trajectory_step, private/final guardrails#679
willccbb merged 5 commits intomainfrom
will/abstract-render-completion

Conversation

@willccbb
Copy link
Member

@willccbb willccbb commented Jan 4, 2026

Description

Elevates render_completion to an overridable MultiTurnEnv method, and adds an overridable method add_trajectory_step for setting step-level rewards/advantages/extras. Logic not intended for overriding is marked as final if public-facing, private if internal. Additional methods in Environment/EnvGroup are marked as private/final (or removed if no longer needed).

Minor reorganizations + docstring improvements.

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

API additions and overrides

  • MultiTurnEnv: new overridable render_completion and add_trajectory_step; rollout marked final; env_response is abstract; completion rendered at end of rollout.
  • experimental/RLMEnv: implements render_completion to ignore sub-LLM steps when computing completion.

Core refactors and guardrails

  • Environment: internal helpers renamed private (_format_dataset, _format_completion_dataset, _get_eval_inputs); several public methods marked final (get_dataset, get_eval_dataset, init_state, is_completed, run_rollout, run_group); removed internal completion rendering; minor doc/docstring updates.
  • EnvGroup: aligns to private dataset formatters (_format_dataset, _format_completion_dataset); rollout marked final; docstrings clarified.

Misc

  • ToolRubric and data_utils: minor typing/cast cleanups without behavior changes.

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

@willccbb willccbb marked this pull request as ready for review January 4, 2026 06:32
@willccbb willccbb requested review from mikasenghaas and snimu January 4, 2026 06:32
@willccbb willccbb merged commit 0cba34b into main Jan 4, 2026
6 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.

2 participants