Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Carry terminal truncation metadata through Gym token-capture receipts

Open
#4,737 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start in nemo_rl/experience/rollout_reassembler.py, at receipt finalization near line 785, where truncation is currently inferred from the assembled length. Trace how the terminal response's incomplete_details.reason reaches that code, and how the TRUNCATED column feeds overlong_filtering. Done means the zero-token exhausted turn, sub-limit length exhaustion, completed, content-filtered and legacy receipt cases are covered by RolloutReassembler tests that check both the TRUNCATED value and the overlong filter result.

Written by the indexing model from the issue text.

Description

bug

PR #4491 fixes multi-turn context exhaustion for ordinary Gym results, but the token-capture receipt path still marks truncation only when the assembled sequence length equals the maximum length. A terminal response that ends with incomplete_details.reason=max_output_tokens before that equality can therefore escape overlong_filtering and undercount truncation metrics.

Carry the terminal response's truncation evidence through receipt assembly and use the same context-exhaustion semantics when finalizing captured rows. Preserve compatibility with older receipts that lack the metadata, and keep content-filter or ordinary completed responses distinct from length truncation.

Add tests that drive receipt assembly through RolloutReassembler for a zero-token context-exhausted final turn, terminal length exhaustion below the total limit, an ordinary completed response, a content-filtered response, and a legacy receipt. Check both the emitted TRUNCATED column and the downstream overlong filter.

Current source: receipt finalization. This is the receipt-mode follow-up requested in the review of #4491; it is distinct from #2163's older missing-column error.

Dominant language
Python
Stars
2.1k
Forks
612
Avg merge
3d 14h
Merged PRs (30d)
267

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-NeMo/RL

All issues in NVIDIA-NeMo/RL

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.