feat(monitor): upload native v1 episodes without orchestration refactor - #3232
feat(monitor): upload native v1 episodes without orchestration refactor#3232mrmoxon wants to merge 1 commit into
Conversation
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 8c4c303. Configure here.
8c4c303 to
208ba21
Compare
| episode_id: str = Field(default="", exclude=True) | ||
| # The original v1 envelope, retained only in memory so monitors can upload the | ||
| # complete multi-trace Episode without making Episode the orchestrator's unit. | ||
| native_episode: vf.WireEpisode | None = Field(default=None, exclude=True, repr=False) |
There was a problem hiding this comment.
wait each rollout stores its back-stores its episode? this seems like a lot of redundancy and could lead to perf issues
imo this is a braoder smell of the episode-type not being fully native on prl orch yet. this is a known limitation @hallerite and me want to tackle this week. wondering if we should delay this pr until then
There was a problem hiding this comment.
e..g do we even dedup the episodes if one episode makes multiple rollouts?
There was a problem hiding this comment.
if we want to get in today, then we should try to pass a flat list of episodes directly to the prime monitor
There was a problem hiding this comment.
I think we should. the PR will be much cleaner after the refactor

Goal
Preserve complete native v1 Episodes in Prime-RL sample uploads without making Episode the orchestration unit.
What changes
Env.runconverts its traces to existingRolloutobjectsPrimeMonitorand serialize it through verifiers' existingbuild_samples()compatibility pathinfo.native_wrapper, while the existing trainable trace remains the flat summary for older Platform consumersWhat does not change
Validation
git diff --checkpassedNote
Medium Risk
Changes telemetry serialization and Platform payload shape (
info, episode grouping) but keeps training on rollouts; failures are best-effort and should not block training.Overview
Prime Monitor now uploads native v1 Episodes to Platform instead of flattening each rollout with
trace_to_sample, so multi-trace episodes (judge/solver/critic, failed siblings, etc.) stay intact on the wire while training still runs on rollouts.Each v1
Env.runattaches an in-memorynative_episodeon everyRollout(fullWireEpisodewith orchestratorRollouttraces).Rolloutgains an excludednative_episodefield for monitors only.log_samplesrebuilds episodes via_rollouts_to_episodes(dedupe shared envelopes; legacy paths synthesize one-trace episodes), thenbuild_samplesprojects rows and layers run/step/advantage/env_nameas before.infocomes from verifiers (e.g.native_wrapper,native_trace_index). Parquet build failures warn and skip upload instead of crashing training.Unit tests cover multi-trace retention, legacy fallback, and serialization failure handling.
Reviewed by Cursor Bugbot for commit 208ba21. Bugbot is set up for automated code reviews on this repo. Configure here.