Skip to content

feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire#3104

Merged
mikasenghaas merged 5 commits into
mainfrom
feat/bump-verifiers-multi-agent
Jul 21, 2026
Merged

feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire#3104
mikasenghaas merged 5 commits into
mainfrom
feat/bump-verifiers-multi-agent

Conversation

@hallerite

@hallerite hallerite commented Jul 21, 2026

Copy link
Copy Markdown
Member

Companion to PrimeIntellect-ai/verifiers#1939. Re-pins deps/verifiers to the merged multi-agent rev 192fd8ef0 (= 0.2.2.dev7) and adopts the episode serve wire and [env] config shape.

Breaking

  • Env TOML shape: taskset / harness / per-run caps move under the env block (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.run returning list[Rollout] (one episode); Dispatcher.out_q carries one episode per entry; TrainSink.add / EvalSink.add take an episode; group and eval-epoch accounting counts episodes. Untrainable traces (agent.trainable=False) never become training samples.
  • Trace.has_error reads the new ok sentinel, not errors-emptiness.
  • run_group remains 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 from env.agent.

Orchestrator/runtime: Env.run_rolloutEnv.run; env servers pass env_config_data(env.env) instead of the full config object. Traces carry episode_id, use the ok sentinel for failures, and untrainable traces (trainable=False) are excluded from tokenization, group baselines, and effective metrics (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, and episode_id; uv.lock adds proposer-solver-v1.

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

hallerite and others added 2 commits July 21, 2026 22:09
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
hallerite marked this pull request as ready for review July 21, 2026 22:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread src/prime_rl/orchestrator/dispatcher.py
Comment thread src/prime_rl/orchestrator/eval_sink.py
…ancel markers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread src/prime_rl/orchestrator/train_sink.py
…ed avg@k

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Fix All in Cursor

❌ 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ba483bc. Configure here.

@mikasenghaas
mikasenghaas merged commit cb74ae2 into main Jul 21, 2026
18 checks passed
@hallerite
hallerite deleted the feat/bump-verifiers-multi-agent branch July 22, 2026 10:08
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