Skip to content

fix(deepswe): score confirmed OOMs and reject incomplete verification - #5129

Merged
AdamRajfer merged 62 commits into
mainfrom
mpatelka/deepswe-oom-verification-4685
Nov 6, 2026
Merged

AdamRajfer merged 62 commits into
mainfrom
mpatelka/deepswe-oom-verification-4685

Conversation

@mpatel31415

@mpatel31415 mpatel31415 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

DeepSWE applies the shared per-stage outcome policy and saves its action and classification. Recovery and health readers consume the applied result, so a legitimate counted zero stays measured even when verification did not complete.

Targets #5128 in #5127 → #5128 → #5129 → #5605. Refs #4685 and #4783.

  • Agent OOM admission requires canonical evidence matching the owned seeded sandbox and agent stage. The shared default yields an unmasked zero with model classification; no benchmark-specific scoring flag is needed.
  • Explicit agent fail remains terminal and ungraded. Inconclusive verification uses its existing fresh-sandbox budget; exhaustion persists fail/evaluation and stays masked. Neither Store resume nor planner recovery adds another attempt after that decision.
  • Existing flat failure_outcome_action and failure_outcome_attribution fields persist the result. Attribution uses shared FailureClass; no nested record or additional enum is introduced.
  • Recovery, Store resume, the health gate and CLI metrics reuse the shared classifier. The saved resumable.recovery_outcome_policy.classification section feeds launcher readers; result-level applied classes, including explicit unknown, remain authoritative.
  • Unknown classifications are reported separately and leave health UNVERIFIED. Successful results can retain recovered failure observations without becoming failed trials or being rerun. Existing health thresholds and retry budgets are unchanged.

Standalone outputs without adjacent launcher configuration use the shared defaults. General historical-consumer migration, reverification/completion changes and a new seed retry engine remain separate work.

Verification and saved-result handling

A verifier command must complete successfully as well as produce valid reward and test-report artifacts. A nonzero process exit after writing those files is intentionally treated as incomplete; the existence of a reward file alone cannot establish successful verifier completion.

A paired local replay used the actual pinned upstream grader and the before/after verifier readers: ordinary pass/fail controls retained completed rewards of 1/0, while an injected post-grading exit 17 changed from counted to incomplete. This is focused contract evidence, not a matched before/after benchmark reward profile; that representative qualification remains outstanding.

A consistent saved counted-zero result's own registered failure kind and saved class take precedence over an unrelated last-request status. Regression coverage includes a last-request 503, model/evaluation/unknown or missing saved classes, legacy rows without a valid saved decision, and counting each zero once.

Validation

Complete DeepSWE/BaseResources tests: 202 passed. Health/recovery: 849 passed plus 169 targeted tests after the final reader adjustment. Final assembled integration selection: 552 passed. Selections overlap. Scoped pre-commit/import-linter passed; Claude review and one fix pass completed.

Fresh model-backed healthy and confirmed-OOM cases, exact source pins and limitations are documented in #5127. Final readers preserve their scores and select neither result for rerun, even when the configured OOM classification differs from the saved result. Full repository CI and representative benchmark qualification are not claimed by these checks.

Latest review fixes: the final assembled selection at 6f247486a3ff58b72ca9d83933960f4c547e6c2d passed 949 tests; scoped pre-commit and import-linter passed. Individual fixes received independent Claude review and one fix pass. These checks do not assert full repository CI or benchmark-wide score invariance.

@mpatel31415 mpatel31415 added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Oct 27, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 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 this pull request to stack #5130 October 27, 2026 14:44
@mpatel31415
mpatel31415 marked this pull request as ready for review October 27, 2026 19:46
@mpatel31415
mpatel31415 force-pushed the mpatelka/deepswe-oom-verification-4685 branch from 87dc35c to 4a37c6d Compare October 27, 2026 19:47
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 27, 2026 19:47
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Oct 27, 2026
@giuliolovisotto
giuliolovisotto force-pushed the mpatelka/deepswe-oom-verification-4685 branch from 4a37c6d to ddfb03d Compare October 28, 2026 10:36
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 28, 2026
@giuliolovisotto
giuliolovisotto removed this pull request from stack #5130 November 3, 2026 10:51
@giuliolovisotto
giuliolovisotto removed this pull request from stack #5497 November 3, 2026 15:44
@giuliolovisotto
giuliolovisotto marked this pull request as draft November 3, 2026 16:03
Signed-off-by: Giulio Lovisotto <[email protected]>
(cherry picked from commit d2a66875b33705c37f455619b6f6cc9891331720)
@giuliolovisotto
giuliolovisotto force-pushed the mpatelka/deepswe-oom-verification-4685 branch from c920ea7 to 056e60b Compare November 5, 2026 16:29
@giuliolovisotto

Copy link
Copy Markdown
Contributor

The saved-kind/last-503 regression is fixed in 056e60b; the inline replies include the evidence for retaining the nonzero-verifier-exit guard. Fallback actions are validated, and the description explicitly states that an exhausted verification FAIL remains ungraded and does not gain another attempt through resume/recovery. Agent-command timeout defaults remain the separate follow-up already agreed; this PR is ready for review, not a draft.

The actual pinned-grader pass/fail controls and paired reader replay are complete, but the requested matched before/after benchmark reward profile has not been run. The 949-test assembled selection passes locally; neither that nor the controlled live cases proves benchmark-wide score invariance or a green repository pipeline.

Use the selected length-refusal kind without bypassing stage rules for ordinary HTTP failures. Keep the saved event unchanged.

Signed-off-by: Giulio Lovisotto <[email protected]>
@giuliolovisotto

Copy link
Copy Markdown
Contributor

Fixed the six reported regressions in b5b052e; #5605 inherits it at 01f2cef. Health classification was discarding the already-established context-limit/invalid-parameter kind and using the generic or missing event kind instead. The reader now retains that refinement with the same event’s stage and HTTP status, without rewriting the event. Ordinary HTTP failures still use the observed kind, preserving custom stage-rule precedence.

All 24 tests in test_context_limit_trial_kind.py pass, including five added configuration regressions. The broader connected health/recovery selection passed 1,357 tests, with two skips and one Linux setsid test excluded on macOS; that selection includes the 24 tests. Scoped pre-commit/import-linter passed. Independent Claude review found the stage-precedence edge case; the fix and regression coverage above address it.

#5127 and #5128 are unchanged. #5605’s four existing patches are unchanged by the rebase. New-head CI and approval remain pending; this is ready for recheck, not a claim that those gates have completed.

AdamRajfer
AdamRajfer previously approved these changes Nov 5, 2026

@AdamRajfer AdamRajfer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context-limit classification is back and nothing in the shared classification got weaker; the saved kind now wins over last-request inference, with the 503 case covered. The verifier exit-code guard stays your call as documented. Approving.

giuliolovisotto
giuliolovisotto previously approved these changes Nov 5, 2026

@giuliolovisotto giuliolovisotto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context-limit regression and custom stage-rule precedence fixes are addressed. The reviewed head passes the focused and connected health/recovery tests, and its CI checks have completed successfully.

main now carries the squash merges of #5127 and #5128, which this branch
stacked on. Conflicts resolved by keeping main for the opencode agent files
(this branch does not touch them) and re-applying this branch own changes
on top of main for core/__init__.py, core/outcome_policy.py and
test_shared_fault_classes.py. The resulting tree equals main plus this
branch own diff.

Signed-off-by: Adam Rajfer <[email protected]>
@AdamRajfer

Copy link
Copy Markdown
Contributor

Merged main into the branch to clear the conflicts after #5128 landed (the two opencode files take main's version; the PR's own 15 commits are unchanged). No functional change; deepswe, sandbox, opencode and core suites green locally.

@AdamRajfer

Copy link
Copy Markdown
Contributor

@giuliolovisotto the main merge dismissed the approvals; the PR's own commits are unchanged, could you re-approve when you have a minute?

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42110687891

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42121171235

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42136087309

This branch was previously deployed

1 inactive deployment
public — d9130a68 Deployed Nov 5, 2026 by copy-pr-bot[bot] via release / finalize / notify #10476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants