feat(monitor): upload native v1 episodes to Platform - #3217
Merged
mikasenghaas merged 3 commits intoAug 8, 2026
Conversation
mrmoxon
marked this pull request as ready for review
August 7, 2026 23:29
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 cbbcac4. Configure here.
mikasenghaas
approved these changes
Aug 8, 2026
This was referenced Aug 10, 2026
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
Stacked on #3206.
PrimeMonitor currently receives first-class v1 Episodes from the orchestrator, but flattens them back into one legacy Platform row per trace. This change makes training sample uploads use the same native Episode envelope introduced for verifiers eval uploads in PrimeIntellect-ai/verifiers#2278.
Upload contract
build_samples()helper so eval and training uploads share one projection contract.info.native_wrapper; this is the authoritative payload for native Platform consumers.info.native_trace_indexso legacy readers know which trace supplied the flat summary fields.sample_idvalues required by the existing training-ingestion schema; the stable native Episode id remains innative_wrapper.id.effective.episodesto every sample monitor, while keeping PrimeMonitor serialization best-effort: invalid batches warn and skip upload without aborting training.No Platform backend schema change is required: the existing native rollout adapter already treats
info.native_wrapperas authoritative and usesnative_trace_indexfor the legacy summary.Dependency stack
#3206 pins verifiers at PrimeIntellect-ai/verifiers#2252 (
306a95fc), which predates the merged native upload helper. This PR temporarily advances that submodule tob43c355a, a narrow two-file integration commit based directly on306a95fcthat layers in the merged #2278 contract.Once #2252 is rebased/merged with current verifiers main, the temporary integration pin can be replaced with the resulting upstream commit without changing the PrimeMonitor implementation.
Test plan
uv run ... pytest -q tests/unit/utils/test_prime_monitor.py— includes serialization-failure regression coverageuv run --isolated --no-project --with ruff ruff check src/prime_rl/orchestrator/orchestrator.py src/prime_rl/utils/monitor/prime.py tests/unit/utils/test_prime_monitor.pyuv run --isolated --no-project --with ruff ruff format --check src/prime_rl/utils/monitor/prime.py tests/unit/utils/test_prime_monitor.pybuild_samples()ruff checkandruff format --checkon the two changed filesNote
Medium Risk
Changes training telemetry shape and upload path relied on by Platform dashboards; failures are softened at upload time but bad episodes could be dropped from samples without stopping training.
Overview
Training sample uploads to Prime Intellect now follow the same native Episode contract as verifiers eval uploads, instead of flattening each trace into its own Platform row.
PrimeMonitor calls verifiers'
build_samples()so each normal episode becomes one Parquet row with the full episode ininfo.native_wrapper(authoritative for native consumers) andinfo.native_trace_indexpointing at the trace used for legacy flat fields (first trainable trace when present). Prime-RL still adds run id, step, problem id, env name, and scalar/per-branch advantage on top of that projection.The orchestrator passes
effective.episodesintolog_samples. Building parquet is wrapped in try/except so a serialization failure logs a warning and skips upload rather than crashing the step.Unit tests were updated for episode-level rows, multi-trace episodes, and the serialization failure path.
Reviewed by Cursor Bugbot for commit b36afc2. Bugbot is set up for automated code reviews on this repo. Configure here.