Repository navigation
fix(deepswe): score confirmed agent sandbox OOM as zero - #4781
Draft
mpatel31415 wants to merge 2 commits into
Draft
mpatel31415 wants to merge 2 commits into
mpatel31415 wants to merge 2 commits into
Conversation
Signed-off-by: Martyna Patelka <[email protected]>
|
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. |
Signed-off-by: Martyna Patelka <[email protected]>
This was referenced Oct 27, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
This is the temporary, DeepSWE-only replacement for the OOM-scoring portion of #4685. It handles the observed agent-container OOM without adding shared sandbox/provider failure contracts.
Tracks issue #4783.
The current DeepSWE OpenCode leaf opts in on both the legacy sandboxed agent and its verifier. The agent runs setup before the agent command, so an OOM during setup cannot be classified as an agent outcome. When the agent command fails, the opt-in path queries the authenticated OpenSandbox inspect endpoint for that same sandbox ID. It accepts only the current
sandboxcontainer'sTerminated (exit=137, reason=OOMKilled)state; exit 137 alone, an init-container or sidecar OOM, unavailable diagnostics, and other ambiguous errors retain existing failure handling. This uses the current OpenSandbox diagnostics endpoint locally in the legacy agent path as a short-term compatibility measure.DeepSWE verifies the marker against its seeded task/image/sandbox, skips patch collection from the dead sandbox, and returns
reward=0,mask_sample=false,failure_kind=provider_oom_killed, and the inspect evidence. This gives the affected task a normal scored rollout row, including in the aggregate denominator andrequire_completecount. It does not assign zero to unrelated provider, setup, verifier, or unconfirmed failures.This PR changes only the DeepSWE leaf, DeepSWE verifier, legacy
opencode_sandboxed_agent, and their focused tests. Localopencode_agenthas no sandbox OOM to classify. The newer sandboxed agent-session interface is not used by this DeepSWE leaf and is outside this temporary fix. Shared sandbox/provider code and common failure contracts are untouched; the broader design belongs in separate work, per review on #4685.Validation and evidence
mainbase:4e4bcce60731c3ec0eb3a654cd1f6c29181a2b87.pre-commit run --all-filesandgit diff --check: passed.d9dd5a597used a synthetic OpenCode executable that allocated beyond the sandbox's fixed 256 MiB memory limit, triggering a real sandbox-container OOM. The Kubernetes container terminated withexitCode=137, reason=OOMKilled; authenticated inspect reportedsandbox State: Terminated (exit=137, reason=OOMKilled). With a captured rollout ID,rollouts.jsonlcontained one main row withreward=0.0,mask_sample=false,failure_kind=provider_oom_killed,model_patch_bytes=0, and the inspect evidence in its response metadata and failure reason. Itsng_agent_observationsretainedSandboxObservation(role=agent, provider=opensandbox, outcome=oom, exit_code=137, error_type=OOMKilled). The failures sidecar contained zero rows. Aggregation producedmean/reward=0.0,num_rollouts=1,expected_num_rollouts=1,missing_num_rollouts=0. This smoke used no model; it validates the real OOM scoring path, not model quality. A first local attempt lost its temporary port-forward during OOM and correctly left the failure unclassified; the passing run used a stable connection. No raw pod logs, credentials, task data, or evidence files are committed here.Shell:stdout marker used by completion detection. Head6ac8907a5now detects success from the isolated agent command; a focused successful-run regression test passed. The OOM classification and scoring paths are unchanged from the smoke-tested commit.6ac8907a5. The prior three-task model-backed run on fix(deepswe): score confirmed agent sandbox OOMs as zero #4685 validated only that older commit.Refs: Giulio's focused validation review, execution-path comment, and Hemil's shared-contract review.