Repository navigation
Description
Parent: #3180. Related focused metadata fix: #4882.
Purpose and priority
Audit the original #3180 problem across Gym: failures that are represented as reward-zero results or fabricated successful responses, so callers can confuse missing results with valid wrong answers.
This is a separate follow-up from #4882. The immediate priority is #4882's missing diagnostics on already-masked results; that work does not wait for this audit to finish.
Scope
- Enumerate all relevant result-producing and result-conversion paths in
resources_servers/,responses_api_agents/,environment_servers/, and sharednemo_gym/helpers at a recorded main revision. - Inspect exception handlers, early returns, raw response dictionaries, and adapters. Find synthetic zero rewards, fake/empty successful Responses objects, and infrastructure failures returned as ordinary completed results. Do not limit the search to existing issue numbers or to code that sets
mask_sample. - Follow each candidate to the final caller-visible result. Record whether there is a valid score, a completed result with an unusable score, or no usable result; retain the available evidence and any unresolved semantic question.
- Preserve legitimate zero scores as valid task outcomes. Intentional disabled judging and policy-limit cases must not be automatically classified as infrastructure failures.
- Keep masked failure placeholders in the inventory where a future result-type migration may still be needed, but route missing labels alone to fix: complete failure metadata on existing masked results #4882.
- Reuse existing environment issues and create/link focused implementation follow-ups under refactor(core): replace reward-zero failure sentinels with typed outcomes #3180 only for uncovered gaps. Existing issues with another parent should be cross-linked without moving that parent.
Inventory deliverable
For each reviewed component, record the path, reviewed revision, failure trigger, current outward result, masking/failure fields, caller interpretation, proposed disposition, linked issue/PR, and any specific dependency.
Record reviewed/no-gap and justified not-applicable cases as well as findings so unreviewed components remain visible. Existing examples are #4571 (Terminal-Bench), #4533 (Indian Banking simulator failure), and the failed-run portion of #4529 (Claude Code); these are not an exhaustive list.
Dependencies and boundaries
The audit and deterministic reproductions can start from main independently of #3302. The shared vocabulary, completed-result fields, and shared failure types have landed through #3213, #2611, and #3877.
Implementation migrations belong in the resulting producer-specific issues. Replacing a successful-looking response with a rewardless failure can change direct callers, replay, persistence, and recovery; each migration must identify the actual support it consumes from #2135 / #3302 and merge that support first.
This audit does not implement a global training include/exclude policy, change reward or masking behavior, or require all environments to migrate in one PR.
Acceptance criteria
- Repository-wide component inventory records the reviewed revision and explicit coverage.
- Every identified reward-zero/fake-success failure path has evidence and a proposed or explicitly unresolved result contract.
- Valid wrong-answer zeros are distinguished from absent/unusable scores.
- Each uncovered behavioral gap has a linked existing or new implementation issue under refactor(core): replace reward-zero failure sentinels with typed outcomes #3180, with specific dependencies recorded.
- Missing metadata alone is routed to fix: complete failure metadata on existing masked results #4882; completing this audit is not a prerequisite for that focused fix.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDev Todo
- StatusShow more project fieldsDev Todo
Activity
yuhezhang-ai commentedon Oct 30, 2026
Inventory: failures scored as results, at main
837ce27ea(Oct 28)This is the audit this issue tracks: every place in Gym where a failure (sandbox, judge, verifier, provider, bad task data, harness crash) can be scored as a model result. The fixes fall under #3180; the plan for them is under "Next for #3180" in the #2750 status refresh.
Full tables: https://gist.github.com/yuhezhang-ai/bec5538e3982f932c8c50848fbdef8e5 (
open-findings.csv: the 421 open findings with file and line;components.csv: one line per component). Search them for your component.How main treats a result
_ng_failure_classgoes to the failures file. It isn't scored and can be retried.legacy_agentrelay, an exception from an agent's/runends the collection run, unlessroute_failures_to_sidecar=trueturns it into a failures-file row. On an environment server (single_agent_turn,single_agent_turn_legacy), a failed/verifybecomes a failure row instead, retried when the error is transient.mask_sample=truekeeps the row but leaves it out of scores and the training loss.failure_kindsays why.Results
All 237 components were reviewed (169 resources servers, 62 agents, 6 environment servers), plus 21 shared
nemo_gym/modules. Each component is counted under its most serious finding:failure_kind(#4882)So 171 of 237 components have at least one open finding. 12 components mask some failures without a
failure_kind; #5223, #5315 and #5342 cover 7 of them.Where it matters most
Of the 122 resources servers with an open finding:
A training split in Gym's config is a lower bound: any environment can be trained on with other data.
What goes wrong
A component can appear in several rows.
Fixed since a first pass on Oct 23
session_lost(fix(resources): move swebench_pro and interactive_browser onto the session contract #4692).lost_session_verification(fix(resources): tighten the session contract for close, refusals and lost sessions #4679), already used by gdpval, nemo_user_sim, swebench_pro and partner_if.How to fix a failure path
The
proposed fixcolumn inopen-findings.csvfollows one rule, applied to every place a component returns 0 or masks:failure_kind, so Gym records it and can retry it.failure_kind.Most fixes are a few lines. Two shared pieces are still in review: #5072 carries a raised failure's kind and reason back to the collector, and #3302 saves failures and retries them on resume.
Questions to settle
The table refers to these as Q1–Q6.
agent_outcome_policy, which today sends a failed response with no outcome to the grader. feat(grpo): add exclude_infra masked-reward policy for infra-masked rollouts RL#4968 takes the same default for training: a masked row counts in GRPO advantages only if itsfailure_kindis a policy failure such asagent_timeout,agent_limitormodel_context_limit. About 60 components.judge_unparseable. 12 components.mask_sampleandfailure_kindtogether? A caller that ignoresmask_samplesees every masked failure as a real 0. See fix(grpo): keep masked Gym failures out of prompt-group statistics RL#4061, and feat(grpo): add exclude_infra masked-reward policy for infra-masked rollouts RL#4968, which readsfailure_kindto keep masked infrastructure failures out of advantages.count_failure_classes_as_zero, asbenchmarks/hle_diamonddoes, noted in its README, and report the failure rate next to the score. That option covers failures-file rows only, so masked rows need the same option keyed byfailure_kind. It matters for masked policy failures too: Gym's eval scores leave every masked row out, so a benchmark run throughswe_agentsdoesn't count a run that hit its iteration limit as 0.giuliolovisotto commentedon Oct 30, 2026
@yuhezhang-ai @AdamRajfer I clarified the failure contracts: the direction is configurable OutcomePolicy at each boundary, extending #4834 and the shared
OutcomePolicyConfig/choose_actionnow in #5072. Each boundary supplies documented defaults and supported actions; users/benchmarks can override them through Gym config, with partial overrides preserving the remaining defaults.For Yuhe’s questions, I suggest:
We still need to agree on those defaults, but they should be defaults of this shared mechanism rather than independent hard-coded producer rules. Supported actions and context can differ by boundary; accounting/recovery planning still enforces budgets and execution constraints. Q4 remains a consumer-contract requirement, and reporting must retain failed attempts even when retries succeed.