Skip to content

feat(swe-atlas): add swe atlas qa - #4777

Merged
cmunley1 merged 10 commits into
mainfrom
cmunley1/swe-atlas-qa
Oct 24, 2026
Merged

cmunley1 merged 10 commits into
mainfrom
cmunley1/swe-atlas-qa

Conversation

@cmunley1

@cmunley1 cmunley1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add the 124-task SWE Atlas Codebase Q&A benchmark using the existing harness_agent. A small resource server creates the task sandbox, collects the answer, closes the agent sandbox, and runs the unchanged upstream rubric evaluator in a separate verifier sandbox.

prepare.py downloads a pinned upstream checkout and generates evaluation rows. Five evaluation-only example rows, their collated metrics, and five genuine complete rollout records are included for the required server-data gate. The full benchmark, rubrics, reference answers, and runtime bundles remain downloaded or private. Harness selection and runtime installation stay with the existing harness adapters. Per-harness configs in benchmarks/swe_atlas_qa/ record the settings each harness needed. No Gym core or harness code changes.

Related onboarding: #1978. No separate issue is needed for this focused benchmark addition.

Validation

  • pytest tests/unit_tests/test_task_data.py tests/unit_tests/test_registry.py resources_servers/swe_atlas_qa/tests responses_api_agents/harness_agent/tests --cov=resources_servers.swe_atlas_qa.app --cov=resources_servers.swe_atlas_qa.prepare --cov-report=term-missing:skip-covered --cov-fail-under=95 -q: 518 passed, 97.98% production-module coverage.
  • pre-commit run --all-files: passed.
  • Regression coverage verifies sandbox probe failures are masked, the benchmark is discoverable, dataset composition stays singular, and the model port validates.
  • A broader local benchmark-discovery run also encountered four unrelated macOS hostname-resolution failures in existing Apex/HLE configs. The SWE Atlas discovery regression passes.
  • git diff --cached --check: passed.
  • After merging current main: pytest resources_servers/swe_atlas_qa/tests 63 passed. All 11 harness configs resolve, and gym eval plan --config benchmarks/swe_atlas_qa/claude_code.yaml plans 124 tasks.
  • gym dataset collate "+config_paths=[resources_servers/swe_atlas_qa/configs/swe_atlas_qa.yaml]" +mode=example_validation +output_dirpath=/tmp/swe-atlas-example-collated: passed and generated matching five-row metrics.
  • gym env test +entrypoint=resources_servers/swe_atlas_qa +should_validate_data=true +skip_venv_if_present=true +uv_venv_dir=/tmp/swe-atlas-test-venvs: 63 server tests and example-artifact validation passed using the existing tested environment. The staged artifacts also passed the real data validator in an isolated directory without the source cache.
  • Five distinct exported baseline records match their saved originals exactly, including complete recorded tool traces. Preparation leaves checked-in examples untouched. Secret and private-path scans found no confidential runtime values.

Rollouts

The checked-in examples use five completed, fully judged Claude Code / Opus 4.6 baseline records. The README documents task IDs, selected attempts, and provenance. They are integration evidence and do not establish an unbiased benchmark score.

Score reproduction

Run with this PR's code unchanged (beeb012c): mini_swe (NeMo Fabric's mini-SWE-agent adapter), GLM-5.2 as the policy through the Gym model server, Claude Opus 4.5 as the judge, OpenSandbox, all 124 tasks x 3 rollouts.

Run Passes Score
This PR, failed rollouts counted as 0 189/372 50.8%
This PR, graded rollouts only 189/364 51.9%
Public leaderboard, GLM 5.2 + mini-SWE-agent 48.12 +/- 5.07

Rows now omit routing metadata. The sandbox image and /app working directory are unchanged because the resource server owns the sandbox. All 364 graded rollouts had an answer. 8 rollouts failed and count as 0: 5 mini-SWE-agent exits before submission (the Fabric adapter does not truncate long command output, and some contexts exceeded 1M tokens), 2 sandbox OOM kills, and 1 other adapter error.

Harness smoke tests

Same code, policy, and judge on three tasks (Scapy, k6 on Alpine, and kitty), one rollout each, using the configs in benchmarks/swe_atlas_qa/. These check compatibility and are not scores.

Harness Passes Rubrics passed
claude_code 3/3 11/11, 13/13, 7/7
cline 2/3 11/11, 13/13, 5/7
kilocode 2/3 11/11, 11/13, 7/7
prime 2/3 9/11, 13/13, 7/7
simple_strands 2/3 11/11, 12/13, 7/7
codex 1/3 10/11, 12/13, 7/7
opencode 1/3 9/11, 13/13, 5/7
pi 1/3 9/11, 13/13, no answer
openclaw 0/3 10/11, 11/13, 6/7
terminus_2 0/3 10/11, 8/13, no answer
hermes 3/3 11/11, 13/13, 7/7 (DeepSeek-V4.1-Flash policy)
deepagents 1/3 11/11, 11/13, 6/7 (needs #5051, DeepSeek-V4.1-Flash policy)

hermes previously rejected the routing metadata (docker_image, workdir) that rows carried, with HTTP 422. The resource server already starts each sandbox from the task image with /app as its working directory, so rows no longer carry that metadata, and unpatched Hermes runs. deepagents needs cwd: / and #5051, which lets harness_agent keep an explicit working directory. Without it the answer lands inside its virtual filesystem under /app and is not collected. Token counts reported by some harnesses have a known accounting limitation.

Compatibility and benchmark impact

This is an evaluation-only addition, marked verified: false. It uses upstream digest-pinned v1.1 repository images and preserves the upstream binary scoring semantics, including exclusion of unscored rubrics from strict pass. The response exposes incomplete-judging counts and retains the collected answer.

Users configure the sandbox provider, policy and judge endpoints, and a harness runtime bundle compatible with the chosen task image. Alpine/musl images require a compatible runtime. Private grading assets and judge credentials are staged only after the agent sandbox has closed.

The example-artifact gate is resolved locally. The public GLM 5.2 + mini-SWE-agent score reproduces within its reported interval. Inherited harness-conformance failures are outside this PR’s scope.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Tests added and pass locally.
  • Documentation added.
  • Pre-commit checks pass locally.
  • New source files include Apache-2.0 SPDX headers.
  • All commits have DCO sign-off.

@cmunley1 cmunley1 added benchmark-onboarding Self-contained benchmark onboarding feature New capabilities, enhancements, or enablement work area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Oct 20, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cmunley1

Copy link
Copy Markdown
Contributor Author

/ok to test 0066229

@cmunley1

Copy link
Copy Markdown
Contributor Author

/review model=codex

@cmunley1

Copy link
Copy Markdown
Contributor Author

/ok to test 47c7c00

@cmunley1

Copy link
Copy Markdown
Contributor Author

/review model=codex

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

HOLD — one BLOCKER and two RISK findings.

Reviewed all 14 changed files and the directly affected harness, sandbox-provider, benchmark-discovery, and CI-validation contracts. The answer probe can silently score infrastructure failures as policy failures; benchmark discovery and the mandatory server-data gate also need integration fixes.

Validation was source-only: I did not execute tests or live rollouts.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex

f'test "$(wc -c < /logs/agent/answer.txt)" -le {self.config.max_answer_bytes}',
timeout_s=30,
)
if answer_file.return_code == 0:

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.

BLOCKER — Do not convert sandbox execution failures into valid zero rewards.

Failure: Have the answer-file probe return SandboxExecResult(None, "runtime failed", 125, error_type="sandbox"). This is an explicitly supported result in the provider contract, and OpenSandbox can produce it. This branch skips downloading, then returns the default reward=0, evaluation_completed=true, and mask_sample=false. A sandbox failure therefore silently lowers benchmark scores instead of being excluded.

Correction: Immediately before this branch, distinguish an ordinary failed file predicate from an execution failure:

if answer_file.error_type is not None or answer_file.return_code not in (0, 1):
    raise RuntimeError("Agent answer inspection failed")

The existing finally will still close the agent sandbox, and the exception handler will mask the sample. Invariant: only a successfully executed file check may classify an answer as absent or invalid.

Preservation: Keep exit code 1 with no provider error as a valid zero for missing, symlinked, or oversized answers; keep exit code 0 collecting and grading nonempty answers. Preserve cancellation propagation and closure before staging private verifier assets.

Acceptance — proposed, not executed: Extend the verification tests with (125, "sandbox") and (124, "timeout"): expect zero reward, mask_sample=true, evaluation_completed=false, no grader creation, and agent closure. Retain the missing-answer exit-1 assertion of completed/unmasked zero, successful answer grading, and the existing cancellation/close-order assertions. Verify the suggested guard before adopting it.

@@ -0,0 +1,4 @@
config_paths:

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.

RISK — Declare the benchmark dataset in the catalog config itself.

Failure: This file contains only includes. The existing benchmark prefilter deliberately counts type: benchmark declarations in each raw YAML without resolving includes. Consequently, neither benchmark discovery nor the unified catalog publishes the intended swe_atlas_qa entry. Direct --benchmark swe_atlas_qa path selection can work, but listing/searching the benchmark by that name does not.

Correction: Append the following explicit declaration here, matching the included dataset configuration:

swe_atlas_qa_agent:
  responses_api_agents:
    harness_agent:
      datasets:
        - name: swe_atlas_qa
          type: benchmark
          jsonl_fpath: resources_servers/swe_atlas_qa/data/benchmark.jsonl
          prepare_script: resources_servers/swe_atlas_qa/prepare.py

It targets the same agent key, so the parent declaration replaces the included list rather than creating a second dataset; this follows the inspected include precedence.

Preservation: Keep the resource-server config independently usable, retain the provider/model includes and harness settings, and resolve exactly one benchmark dataset. Do not broaden the shared prefilter to admit arbitrary include-only suites or manifests.

Acceptance — proposed, not executed: Assert _is_benchmark_config accepts this file; assert discover_environment_catalog() contains a benchmark named swe_atlas_qa at this config; with required runtime values supplied, assert the resolved config still has exactly one dataset with the existing path and prepare script. Retain the existing suite and manifest exclusion tests. Verify the YAML suggestion before adopting it.

pytest resources_servers/swe_atlas_qa/tests
```

No downloaded task rows or rollouts are committed. Run preparation before local data validation and retain live

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.

RISK — Resolve the mandatory server-data fixture gate before merging.

Failure: On a fresh checkout, this server has no example artifacts. The server-suite runner discovers every module with a README and always enables data validation. Its validator requires five examples, example metrics, and five rollouts. Thus the CI shard containing this module fails even if all unit tests pass. Running preparation does not resolve it: prepare() writes only task rows, not metrics or rollouts, and the config declares no example dataset for collation.

Correction/invariant: Supply a complete, CI-readable smoke-fixture contract while retaining the requirement that downloaded upstream benchmark assets remain uncommitted. Under the existing validator, that means five redistributable example rows, collated metrics with Number of examples == 5, and five genuinely collected smoke rollouts at the required paths, plus an example dataset declaration. If synthetic fixtures are chosen, narrow the data ignore rule and separate them from the upstream example output so prepare() cannot overwrite them. The appropriate fixture contents or an approved benchmark-only alternative cannot be determined from the available source; a fabricated artifact or blanket disabling of validation is not a correction.

Preservation: Keep the 124-task preparation output and private source cache evaluation-only, retain source revision/cleanliness checks, and leave other servers' artifact validation enforced.

Acceptance — proposed, not executed: From a fresh checkout without downloaded assets, run the server-data validation path and expect success with five examples, matching metrics, and five real smoke records. Then prepare the benchmark and verify that private upstream assets remain untracked, benchmark output still contains 124 tasks, and preparation does not invalidate the smoke fixtures.

@cmunley1

Copy link
Copy Markdown
Contributor Author

/ok to test bdda1a2

@cmunley1

Copy link
Copy Markdown
Contributor Author

/review model=codex

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

HOLD — one unresolved RISK: the mandatory server-data validation gate remains unsatisfied.

Follow-up of review 5582438453, comparing the previous reviewed tree with the current head. Accounted for all 14 changed files; defect discovery remained limited to prior findings and subsequent changes.

Verified fixes by source inspection:

The prior fixture-gate finding remains, as detailed inline. No new escalation-eligible regression was validated.

Validation was source-only; I did not execute tests or live rollouts.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex

pytest resources_servers/swe_atlas_qa/tests
```

No downloaded task rows or rollouts are committed. Run preparation before local data validation and retain live

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.

RISK — Resolve the still-missing server-data fixture contract.

Failure / blast radius: This is the same unresolved failure as prior comment 4322850282. On a fresh checkout, gym env test +entrypoint=resources_servers/swe_atlas_qa +should_validate_data=true fails because this module has no example artifacts. The suite discovers README-bearing modules and always enables data validation, so its CI shard remains red even when unit tests pass. Running preparation is insufficient: prepare() writes only task rows, not metrics or rollouts, and the agent config declares only a benchmark dataset.

Correction / invariant: Resolve this server's smoke-fixture contract before merging. Under the unchanged validator, provide five example rows, example metrics with Number of examples == 5 and an example dataset declaration, and five genuinely collected smoke rollouts at the required paths. These must be available to clean-checkout CI without committing upstream benchmark assets. If using redistributable synthetic smoke fixtures, include sufficient task setup to collect real records, narrowly exempt the fixture artifacts from the data ignore rule, and separate preparation's upstream example output so it cannot overwrite them. Safe fixture contents or an approved benchmark-only alternative cannot be determined from the mounted source, so an exact patch would be speculative; fabricated rollout artifacts or blanket disabling of validation are not fixes.

Preservation: Keep the 124 upstream tasks evaluation-only and downloaded, retain the pinned-revision/clean-source checks and private grading assets, and preserve exactly one benchmark dataset after catalog composition. An example dataset may be added to the standalone resource config without duplicating the benchmark. Other servers' artifact validation must remain enforced.

Acceptance — proposed, not executed: From a fresh checkout without downloaded upstream assets, the server-data validation command above must pass with five examples, matching metrics, and five genuine smoke records. Example collation must select the intended smoke rows. Then prepare the pinned benchmark: expect 124 rows, unchanged smoke artifacts, and upstream assets still untracked. Retain the wrong-revision and dirty-source rejection assertions and the singular benchmark-dataset assertion.

@cmunley1

Copy link
Copy Markdown
Contributor Author

/ok to test 13b6b73

@cmunley1

Copy link
Copy Markdown
Contributor Author

/review

@NVIDIA-NeMo NVIDIA-NeMo deleted a comment from github-actions Bot Oct 24, 2026
@NVIDIA-NeMo NVIDIA-NeMo deleted a comment from github-actions Bot Oct 24, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP — no unresolved prior findings or new escalation-eligible regressions validated.

Follow-up of review 5583028711, comparing its reviewed tree with the current head and accounting for all 28 changed files. Discovery remained limited to prior findings and subsequent changes, principally the eleven harness configurations and operational documentation.

Verified by source inspection:

Validation was source-only; I did not execute tests, configuration resolution, collation, or live rollouts. The reader provides only bounded previews of the long saved rollout records; their complete traces and original-run provenance were not independently verified.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@cmunley1

Copy link
Copy Markdown
Contributor Author

/ok to test f6281dc

@cmunley1

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP — no unresolved prior findings or new escalation-eligible regressions validated.

Follow-up of review 5639111629, comparing its reviewed tree with the current head and accounting for all 30 changed files. Discovery remained limited to prior findings and subsequent changes: routing-metadata removal, updated examples and metrics, and the Hermes/DeepAgents configurations and documentation.

Verified by source inspection:

  • The answer-probe guard and regression assertions still distinguish infrastructure failures from ordinary missing-answer zeros.
  • The catalog declaration, standalone example dataset, and singular-dataset assertions remain present. Five examples, metrics declaring five examples, and five saved rollout records remain available; default preparation still leaves the examples untouched.
  • Traced metadata removal through resource-owned sandbox attachment, working-directory selection, and the shared runner, and checked the two new harness overrides against their adapter contracts.

Validation was source-only; I did not execute tests, configuration resolution, collation, or live rollouts. The saved rollout file is byte-identical to the prior reviewed artifact, but the reader exposes only bounded previews of its long records; complete trace contents and original-run provenance were not independently verified.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@cmunley1
cmunley1 merged commit ac05ed5 into main Oct 24, 2026
54 of 57 checks passed
@cmunley1
cmunley1 deleted the cmunley1/swe-atlas-qa branch October 24, 2026 19:22

This branch was previously deployed

1 inactive deployment
public — f6281dc7 Deployed Oct 24, 2026 by copy-pr-bot[bot] via release / finalize / notify #7101
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 benchmark-onboarding Self-contained benchmark onboarding complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work 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