Repository navigation
feat(eval): run and grade SWE-bench Verified through the agent benchmarks - #4400
Conversation
Comparing GAIA with Claude Code, or one model with another, needed a local lab folder that nobody else could run, so its numbers could not be checked or reproduced. `gaia eval tasks run --harness claude-code` now drives Claude Code over the same tasks, fixtures, time limit and judge the flagship gets, and `report` builds the harness × model table from finished runs. What the harness now guarantees, each from a bug found while comparing the two: both agents get the same wall-clock cap and the same project toolchain on PATH; a run cut off at the cap keeps the record of what it did instead of reporting zero turns; and both are scored by the same probes and judged from the same tool record. Six "everyday" tasks are ported from the lab (issue triage, duplicate detection, issue-to-fix, drafting a reply, a shell injection, labelling issues), giving a 14-task `everyday` suite. The GitHub ones run against an offline `gh` stand-in serving committed fixtures, so no task reaches a personal login, every call is logged, and writes are refused unless the task grants them. A `therock` suite reproduces four real merged fixes in ROCm/TheRock, built from public git at run time: a shallow checkout at the fix's true parent with its remote removed, so the answer is not on disk, and the reference diff (`merge^..merge`) fetched only by the judge step, after the agent has exited. Cost carries its source, because the three are different kinds of dollar: `metered` (the provider's billing API, fixed window), `api_equivalent` (Claude Code's own figure on a subscription — a price of compute, not money spent, and labelled as such in the reports) and `harness_counts` (rate-carded token counts). A run that reached the model but counted nothing reads n/a, never $0.00. Since artifacts are meant to be published: no provider key is ever in the agent's environment, every transcript is scrubbed and the run fails rather than writing a surviving secret, and `--fence` is refused where it cannot be enforced instead of pretending.
…n prompt Running the full 14-task suite on a Fireworks-routed model surfaced three things worth fixing. `--meter fireworks` read the API key through the OS credential store, and a macOS keychain item whose ACL demands authorisation blocks its reader until someone clicks. Unattended — which is how a benchmark runs — that is a hang with no output before the first task, not a failure anyone can act on. The read is now bounded and names FIREWORKS_ACCOUNT_ID's companion variable in the error, and the scrubber's own key lookup goes through the same bounded path. A suite takes a quarter of an hour and its progress is the only sign it is alive, but redirected to a log every line sat in a block buffer until the run ended. Progress is line-buffered now. Lemonade reports zero usage on a streamed Anthropic reply for a cloud-routed model as well as a local one, so the note about it says so: that leg has no token counts of its own and `--meter` is the only way to price it.
Reproducing a harness x model comparison meant reading source and the skill file to work out the commands, the cost, and what a result even means. This adds a plain-language guide at docs/reference/agent-benchmarks.mdx (registered in docs.json next to Session Analytics): what the two suites are, harness vs. model, how mechanical checks and the judge combine, the no-internet detector, real cost, every command, and the traps that have actually bitten a run (single-run noise, account-wide metering contamination, an unjudged task silently counted as failed, the harness undercounting the provider's own meter by 1-6%). Every quick-start command was run for real against a live Fireworks-routed model (controls, a --harness gaia run, report) and a two-task reproduction against an independently produced run agreed on pass/fail for both, with step and token counts in the same order of magnitude.
The guide said GLM-5.3 Flash under GAIA 'matches' Claude Opus 5 under Claude Code. Measured, it scores 4.89 (4.80-4.95) against Opus's 5.00 on a single run - close, not equal. It also put Claude Code's run-to-run spread at 2x; the measured spread is 4.5x (4:06 to 18:30 on the same model and tasks), and one TheRock run moved from 3/4 to 4/4 on repeat.
…ent benchmarks The benchmarks could only be compared with each other: the toybox suite is built for the benchmark and TheRock has no published numbers. A `swebench` suite now runs either harness on SWE-bench Verified instances and grades the patches with the official harness in Docker, so a GAIA number can be set beside a published one on the same instances and the same grader. Nothing of the dataset is committed. Instances are read from the Hugging Face dataset at run time (`datasets` if installed, else the datasets-server REST API) and cached under the work root, which `--fence` denies. The checkout is built the way TheRock's is: a bare cache filled by commit to depth 200, a single-branch `file://` clone of it, detached, no remote, and `git fsck --unreachable` must find nothing. The agent's diff becomes one row of `predictions.jsonl`; an empty diff fails the task at once, and a run that errored is shown to the judge but never submitted. Grading pulls each amd64-only 3 GB image just before its run and removes it after; a missing `swebench` package or Docker daemon is an error before anything runs. The judge grades quality against the gold patch, read only in the judge step, and never decides the pass.
|
Verdict: Request changes This adds a
The PR is stacked on #4335, so this review covers only the new SWE-bench commit. Real-world evidenceN/A: no evidence bundle was produced for this PR, and the description has no live run of the new CLI surface ( 🔍 Technical details🟡 Timeouts escape the per-instance error handling (
🟡 No live test of the harness contract ( This is the "mocks prove we called it, not that the call is valid" case from CLAUDE.md. Three things are asserted only against stubs:
If any of these is wrong, every instance quietly becomes "the harness wrote no report". An integration test marked to skip without Docker or 🟢 The examples block around line 1855 lists 🟢
🟢 Re-grading pulls images the harness then skips
Strengths
|
# Conflicts: # docs/reference/agent-benchmarks.mdx # docs/reference/eval.mdx # src/gaia/cli.py # src/gaia/eval/flagship_tasks.py
Since amd#4400 merged this afternoon, the Linux and macOS unit lanes have been red on **every open PR** in the repo. The cause is one missing section: `gaia eval tasks swebench` exists in the parser but never got a CLI reference entry, so `test_cli_docs_drift::test_every_leaf_command_is_documented` fails everywhere. This documents it, and the lanes go green again. The allowlist in that test is deliberately untouched — its docstring says nothing may be added to it going forward, so the gap is closed rather than excused. ### Test plan - [x] `pytest tests/unit/cli/test_cli_docs_drift.py` — **3 passed** - [x] Diff is one file, `docs/reference/cli.mdx`, +13/-0; `git diff --name-only -- tests/` is empty - [ ] Linux + macOS unit lanes go green on this PR <details> <summary>🔍 What was undocumented</summary> `src/gaia/cli.py:2634` registers the subcommand, and `:2503` / `:2509` add the two flags that only apply to the `swebench` suite: ``` tasks_swebench_parser = tasks_actions.add_parser( "swebench", help="Grade a swebench run's predictions with the official harness (Docker)", ``` Before: ``` $ git grep -c "eval tasks swebench" origin/main -- docs/reference/cli.mdx 0 $ pytest tests/unit/cli/test_cli_docs_drift.py FAILED test_every_leaf_command_is_documented - AssertionError: New undocumented subcommand(s) ...: [('eval', 'tasks', 'swebench')] ``` After: `3 passed`. </details>
Stacked on #4335 — merge that first. This branch is
feat/eval-harness-benchmarksplus one commit; the diff againstmainshows both until #4335 lands.The agent benchmarks could only be compared with each other:
everydayis a project built for the benchmark andtherockhas no published numbers.gaia eval tasks run --suite swebenchnow runs either harness on SWE-bench Verified instances — the public yardstick — and grades the patches with the official SWE-bench harness in Docker, so a GAIA number can be set beside a published one on the same instances and grader. Nothing of the dataset is committed: instances are fetched from Hugging Face at run time and cached under the work root, the checkout is built the leak-proof way #4335 builds TheRock's (bare cache by commit,file://clone at depth 200,git fsckmust find nothing), and the amd64-only 3 GB images are pulled and removed one at a time.Test plan
pytest tests/unit/eval— 1036 passed, 2 skipped (31 new intest_bench_swebench.py: stubbed fetcher, real-git checkout with exact argv, prediction capture, mocked harness/docker argv and pull→grade→rmi order, report parsing in the swebench 5.x shape, run/judge/grade through the suite, CLI flags)python util/lint.py --black --isort; flake8 and pylint clean on the changed filesgaia eval tasks run --suite swebench --no-judge --out /tmp/sweon a machine with Docker andpip install swebench— not run here: the local Docker Desktop VM is wedged (needs a GUI reset), soevaluateis verified against the harness's argv and report format only, not a live containergaia eval tasks report