feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire#3104
Merged
Conversation
Companion to PrimeIntellect-ai/verifiers#1939 (multi-agent api). Re-pins deps/verifiers to 192fd8ef0 (= 0.2.2.dev7) and deps/pydantic-config to v0.4.2 (verifiers now requires prime-pydantic-config>=0.4.2). - Serve wire: the env-server route run_rollout -> run, answering one Episode envelope ({id, env, ok, errors, traces}) per env-rollout. Env.run returns list[Rollout]; an episode that failed before minting any trace raises (the dispatcher synthesizes its error marker), and a not-ok episode marks its clean traces failed so a broken episode's partial seats are never trained on. - The episode is the pipeline currency: the dispatcher emits one episode (list[Rollout]) per completed task onto out_q (a legacy run_group result emits its traces as single-trace episodes), and both sinks count episodes - never loose traces - toward group_size and eval epoch sizes. episode_id is stamped into info so saved records keep grouping. - ok is the success sentinel: has_error now reads it, so the dispatcher's empty-trajectory promotion also flips ok, and error markers carry it. - Only the trainable subset becomes training samples: a trace stamped untrainable (a multi-agent env's frozen agent) is never tokenized, never enters the group advantage, and never ships; it still lands in the trace files and observation window. - Config shape: everything env lives under the env block, following the new vf.EnvServerConfig (env.taskset, env.agent.harness, per-agent caps under env.agent.*). All checked-in TOMLs migrated; the spawned env server receives the picklable env block via env_config_data. - run_group survives only for v0/legacy bridge envs (a v1 server refuses it and always reports requires_group_scoring=False); vf's @group_reward removal doesn't touch prime-rl's own Algorithm.score_group. Verified: tests/unit green (487 passed; config-loading params covered all migrated TOMLs), ruff clean, and a 3-step reverse-text RL run on 2 GPUs trains at 0% errors with every saved trace carrying ok, agent.name, agent.trainable, and a distinct info.episode_id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ulti-agent # Conflicts: # configs/alphabet_sort/rl.toml # configs/basic/hendrycks-sanity/rl.toml # configs/debug/multi_env/reverse_text.toml # configs/debug/multimodal.toml # configs/debug/v1/general_agent.toml # configs/debug/v1/gsm8k.toml # configs/debug/v1/hendrycks_sanity.toml # configs/debug/v1/r2e_gym.toml # configs/debug/v1/reverse_text.toml # configs/debug/v1/scaleswe.toml # configs/elastic/rl.toml # configs/general_agent/rl_qwen3_0p6b.toml # configs/general_agent/rl_qwen3_4b.toml # configs/gsm8k/rl.toml # configs/hendrycks_math/rl.toml # configs/nemotron_4node/rl.toml # configs/nemotron_debug/rl.toml # deps/verifiers # examples/advanced/glm-4.5-air/swe.toml # examples/advanced/qwen3-30b-a3b/tool.toml # examples/multinode/rl.toml
hallerite
marked this pull request as ready for review
July 21, 2026 22:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ancel markers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed avg@k Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikasenghaas
approved these changes
Jul 21, 2026
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit ba483bc. Configure here.
| # treats it like any other failure | ||
| # treats it like any other failure (``has_error`` reads ``ok``) | ||
| r.errors.append(vf.Error(type="EmptyTrajectory", message="Rollout returned with no trajectory steps")) | ||
| r.ok = False |
There was a problem hiding this comment.
Partial episode siblings still train
Medium Severity
The empty-trajectory safety net flips ok only on the empty trace. Env.run already fails sibling traces when episode.ok is false so partial episodes never train, but this client-side path can leave other traces in the same episode trainable when the wire still says success. Those siblings can still tokenize and enter the batch.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ba483bc. Configure here.
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.


Companion to PrimeIntellect-ai/verifiers#1939. Re-pins
deps/verifiersto the merged multi-agent rev192fd8ef0(=0.2.2.dev7) and adopts the episode serve wire and[env]config shape.Breaking
taskset/harness/ per-run caps move under theenvblock (env.taskset,env.agent.harness,env.agent.timeout,env.agent.max_*); all checked-in configs migrated, retired keys error with pointers.Env.run_rollout->Env.runreturninglist[Rollout](one episode);Dispatcher.out_qcarries one episode per entry;TrainSink.add/EvalSink.addtake an episode; group and eval-epoch accounting counts episodes. Untrainable traces (agent.trainable=False) never become training samples.Trace.has_errorreads the newoksentinel, not errors-emptiness.run_groupremains only for v0/legacy bridge envs; requires an env server speaking the new episode wire (a version-skewed server fails loudly on the renamed route).🤖 Generated with Claude Code
Note
High Risk
Wide breaking change to env config and rollout scheduling/grouping; mis-migrated configs or version-skewed env servers will fail at runtime, and episode vs trace accounting affects batching and metrics.
Overview
Adopts verifiers 0.2.2.dev7 multi-agent episode semantics end-to-end: one env call returns an episode (
list[Rollout]traces), the dispatcher queue and train/eval sinks count episodes (not loose traces), and GRPO/eval finalization keys off episode arrivals.Breaking config: orchestrator env entries move to verifiers’
[env]layout —env.taskset,env.agent.harness, and per-agent caps (env.agent.timeout, etc.); all checked-in TOMLs and docs/skills are migrated. Legacy bridge timeouts/token budgets now read fromenv.agent.Orchestrator/runtime:
Env.run_rollout→Env.run; env servers passenv_config_data(env.env)instead of the full config object. Traces carryepisode_id, use theoksentinel for failures, and untrainable traces (trainable=False) are excluded from tokenization, group baselines, andeffectivemetrics (including pass@k sizing). Failed episodes propagate failure to sibling traces in the same episode.Observability: trace JSONL and Prime monitor uploads document multi-line episodes,
ok, andepisode_id;uv.lockaddsproposer-solver-v1.Reviewed by Cursor Bugbot for commit ba483bc. Bugbot is set up for automated code reviews on this repo. Configure here.