Skip to content

fix: honor group scoring in the v0 legacy env server - #1612

Merged
mikasenghaas merged 1 commit into
feat/nano-as-v1from
fix/legacy-group-scoring
Jun 10, 2026
Merged

fix: honor group scoring in the v0 legacy env server#1612
mikasenghaas merged 1 commit into
feat/nano-as-v1from
fix/legacy-group-scoring

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Fixes group scoring in the v0 legacy env server (LegacyEnvServer).

  • requires_group_scoring was hardcoded False, so a v0 env whose rubric defines group/preference reward funcs was advertised (via the info response) as single-rollout, and the orchestrator routed it down the per-rollout path.
  • _run_group looped env.run_rollout (→ rubric.score_rollout) n times. score_rollout asserts there are no group-level reward funcs, so every rollout of such an env errored.

Now:

  • requires_group_scoring = self.env.requires_group_rollouts — reflects the env's actual rubric (rubric.has_group_rewards). A non-group env still reports False and keeps the single-rollout path.
  • _run_group calls env.run_group(...) once, so the rubric scores the rollouts together (score_group) and cross-rollout (group/preference) rewards apply. score_group also handles individual-level reward funcs, so it's correct whether or not the env defines group rewards.

Verification

  • ruff check --isolated / ruff format --isolated --check clean.
  • LegacyEnvServer imports and the new _run_group / requires_group_scoring resolve against the v0 Environment.run_group / requires_group_rollouts API.

Note

Medium Risk
Changes orchestration routing and the group rollout scoring path for legacy v0 envs; behavior fix but affects reward computation for group-rubric environments.

Overview
Fixes group scoring for v0 environments served through LegacyEnvServer.

requires_group_scoring now comes from self.env.requires_group_rollouts instead of always being False, so the server info response and orchestrator correctly use the group rollout path when the rubric has group/preference rewards.

_run_group no longer runs n independent run_rollout calls (which hit score_rollout and fail on group-level reward funcs). It calls env.run_group once with n copies of the task input, so scoring goes through score_group and cross-rollout rewards apply.

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

Note

Fix group scoring in LegacyEnvServer to delegate to the v0 env's run_group API

  • LegacyEnvServer.__init__ now reads requires_group_scoring from the v0 env's requires_group_rollouts flag instead of hardcoding False.
  • LegacyEnvServer._run_group replaces n independent _run_v0 calls with a single self.env.run_group call, passing duplicated dataset row inputs for the task.
  • Behavioral Change: group rollouts are now executed as a true group rather than as independent single rollouts, which may affect scoring for environments that depend on cross-rollout group context.

Macroscope summarized 3112158.

LegacyEnvServer.requires_group_scoring was hardcoded False, so a v0 env
whose rubric defines group/preference reward funcs was routed down the
per-rollout path. rubric.score_rollout asserts there are no group reward
funcs, so every rollout of such an env errored.

Report the env's actual capability (env.requires_group_rollouts) and run
_run_group via env.run_group once, so the rubric scores the rollouts
together (score_group) and cross-rollout rewards apply.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikasenghaas
mikasenghaas marked this pull request as ready for review June 10, 2026 22:33
@mikasenghaas
mikasenghaas merged commit 0cece1e into feat/nano-as-v1 Jun 10, 2026
4 checks passed
@macroscopeapp

macroscopeapp Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This change enables group scoring in the legacy env server by propagating the environment's requires_group_rollouts config (previously hardcoded to False) and switching from individual rollout execution to batch processing via run_group. This alters how rewards are calculated for preference-based reward functions - a significant runtime behavior change that warrants human review.

You can customize Macroscope's approvability policy. Learn more.

pull Bot pushed a commit to Stars1233/verifiers that referenced this pull request Jun 23, 2026
…ai#1612)

LegacyEnvServer.requires_group_scoring was hardcoded False, so a v0 env
whose rubric defines group/preference reward funcs was routed down the
per-rollout path. rubric.score_rollout asserts there are no group reward
funcs, so every rollout of such an env errored.

Report the env's actual capability (env.requires_group_rollouts) and run
_run_group via env.run_group once, so the rubric scores the rollouts
together (score_group) and cross-rollout rewards apply.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hallerite added a commit that referenced this pull request Aug 26, 2026
## Summary

- add Prime Agent over the same generic typed ACP prompt lifecycle as
nano-RLM
- pass `--autonomous` explicitly from harness configuration
- preserve MCP programs, resume state, skills, Chat reasoning lineage,
and isolated per-rollout state
- trust Prime Agent's completed `session/prompt` boundary from [Prime
Agent PR
#1612](PrimeIntellect-ai/prime-agent#1612)
- record response-boundary and terminal-quiescence telemetry for
evidence without making it a second completion gate
- enforce single-branch lineage for the ordinary two-turn resume case

## Stack

PR 3 of the three-PR Verifiers stack. This targets nano-RLM integration
PR #2439, which targets typed ACP base PR #2438.

Prime Agent PR #1612 is merged and included in the pinned beta used
here. It makes `session/prompt` wait for recursive terminal quiescence
and returns the final autonomous stop reason.

## Validation

- full Verifiers suite on the combined stack — 919 passed, 77
credential-gated skips
- Prime Agent Prime VM MCP/resume E2E — passed against
`0.8.0-beta.548.1.9bc0055`
- single-branch assertion enabled and passed for the resumed
conversation
- Seth's full feature canary against current Prime Agent `main`
(`9bc0055`) — passed
  - reward `1.0`; all 13 feature checks true
  - retained-child follow-up acknowledged and child deleted
  - terminal quiescence after response boundary
  - zero outstanding subagents and autonomous continuations
  - Docker container removed
- changed-file pre-commit hooks and push-hook CI-parity type check

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Introduces network-fetched agent binaries and a new ACP harness on the
eval critical path; the RLM default pin change can shift behavior for
existing RLM rollouts.
> 
> **Overview**
> Adds a **Prime Agent** v1 harness that runs Prime Agent in native
**ACP mode** on the shared `ACPHarness` path, with MCP, resume, skills,
and optional **`autonomous`** continuation via config.
> 
> The harness **bootstraps a pinned beta** from GitHub releases
(checksum-verified tarballs, global npm install under a commit-keyed
prefix), wires the **intercept** provider to the eval endpoint, and
keeps **per-rollout state** (models config, daemon socket, wrapper).
After each ACP turn it **records lifecycle telemetry**
(`responseBoundary`, `terminalQuiescence`, infrastructure status) under
`trace.info["acp_lifecycle"]` for evidence without gating completion on
it.
> 
> **E2E** gains a Prime VM row for `prime-agent` in the ACP resume+MCP
test, asserting two turns show OK infrastructure and zero outstanding
subagents at terminal quiescence. **nano-RLM**’s default install ref is
bumped to a newer commit.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9af8996. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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