Skip to content

fix(scicode): emit policy trajectory for rollout health - #4087

Draft
mpatel31415 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
mpatel31415:mpatelka/scicode-trajectory-health
Draft

mpatel31415 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
mpatel31415:mpatelka/scicode-trajectory-health

Conversation

@mpatel31415

@mpatel31415 mpatel31415 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Emit a SciCode ng_trajectory with one invocation and turn per generated substep. Each turn carries the exact model response ID, substep prompt, output, and rollout identity so Gym can join it to captured model calls.
  • Preserve the trajectory through the SciCode verifier. Correctness scoring, reward, code extraction, and token accounting are unchanged.
  • Record an explicit scope gap when a context-window rejection or response without an ID prevents an exact join.

Why

An evaluated SciCode smoke on Gym d782137ef produced 16/16 rollouts and 192/192 model-call captures, but all 16 quality verdicts were unobserved because the verifier output had no turns or invocations. This fixes the producer gap. No separate issue is needed because the failure is already tracked in the ongoing certification work. The patch is based directly on d782137ef, so its isolated evaluation pin excludes unrelated newer Gym commits.

Validation

  • PYTHONPATH=.:responses_api_agents/scicode_agent python -m pytest -q responses_api_agents/scicode_agent/tests/test_app.py --disable-warnings — 44 passed.
  • PYTHONPATH=.:resources_servers/scicode python -m pytest -q resources_servers/scicode/tests/test_app.py --disable-warnings — 18 passed.
  • pre-commit run --all-files — passed.
  • Follow-up 97970ef41: the same 44 agent and 18 verifier tests plus repository-wide pre-commit pass. The producer/collector integration test now uses a source problem_id different from the evaluator task index and asserts no trajectory-identity gap.
  • The new agent test sends two substep responses through run(), joins their response IDs to captured calls in Gym's rollout finalizer, and checks that the public rollout health checker reports healthy with no unobserved checks. The verifier test confirms the trajectory survives scoring with the original reward.

Rollout evidence and benchmark impact

The first new-pin JHB smoke 844856 on 4ae44a475 showed 12 captured calls, trajectory turns and invocations per completed row, but its first 11 rows carried producer_trajectory_identity_mismatch: task_id. The producer used evaluator task indices 0/1 while Gym canonicalizes SciCode trajectories to source problem_id values 77/11. Follow-up commit 97970ef41 makes the producer use the canonical source identity without changing requests, model calls, scoring or reward. The smoke on 4ae44a475 is diagnostic only; a fresh smoke on 97970ef41 must confirm zero identity gaps and healthy native quality before full benchmark reruns.

The prior real-model SciCode smoke on Gym d782137ef confirmed complete model-call capture but exposed the missing trajectory. A new real-model smoke using this commit is required before this PR is ready for review. The 16-input smoke score is diagnostic only. Full benchmark scores and acceptance bands must be recomputed on the final Gym commit; previous SciCode scores cannot certify it.

@copy-pr-bot

copy-pr-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@mpatel31415 mpatel31415 added area:agent Agent harnesses and Responses API agent behavior bug Something isn't working labels Oct 6, 2026
@mpatel31415
mpatel31415 force-pushed the mpatelka/scicode-trajectory-health branch from 1c0dfb1 to 4ae44a4 Compare October 6, 2026 06:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant