A Correct Fix Can Still Fail: How Overspecified Tests Can Mislead AI Coding Leaderboards
Here is a number that should make anyone reading an AI leaderboard pause. On tasks that a new test-checking method flags, the top 30 submissions to SWE-bench Verified resolved only 31% of them. On the other tasks, the sa
Here is a number that should make anyone reading an AI leaderboard pause. On tasks that a new test-checking method flags, the top 30 submissions to SWE-bench Verified resolved only 31% of them. On the other tasks, the same submissions resolved 88%. The cause may be the tests, not the agents.
Picture a coding exam where the answer key demands the exact variable name the teacher used. A student who solves the problem correctly, with a different name, gets marked wrong. The student did nothing wrong. The test was too specific.
A new arXiv preprint, Spec-Test Coverage Gap, finds that this can happen in two widely used coding benchmarks, SWE-bench Verified and SWE-bench Pro. The mistake changes which AI systems look best.
How coding benchmarks grade
SWE-bench is a benchmark of real bug reports from open-source projects, and Verified and Pro are two versions of it. An AI coding agent reads a report and writes a patch, which is the code change it proposes. Tests then decide whether the patch counts as resolved, meaning it fixes the bug the way the tests check it. Those tests usually come from the human fix that originally went in. A test can require a detail the bug report never mentions. An illustrative example: a report asks a library to reject empty input, and the test insists the error message read exactly one wording. A correct patch that words the error differently fails.
How a score is given
The authors score each task's tests against its specification, the written description of what the fix must do, on a 1 to 4 scale. The question is whether a competent developer who read only the specification would pass these tests with any correct fix. Scores of 3 or 4 mean the tests pin down something the task never asked for, such as a specific name or the internal way a fix was written. The judges see the specification and the test patch, but not the repository.
Two LLM judges, which are language models used as graders, score each task. They are Claude Opus 5.5 and GPT-6.1 Sol. A task is flagged as overspecified only when both judges score it 3 or higher. Requiring agreement matters. In the authors' full-text validation, GPT alone wrongly flagged fine tasks more often than the pair did, while Claude alone matched the pair.
The method was checked on 206 test tasks with known labels, from human annotations and public agent results. On these tasks, the judges flagged 89% of the overspecified tasks and wrongly flagged 4% of the fine ones.
What the benchmarks show
Then the authors applied the method to the whole benchmarks: 500 SWE-bench Verified tasks and 731 public SWE-bench Pro tasks. The judges flagged 23% of the Verified tasks and 35% of the Pro tasks.
Flagged tasks were much harder for agents. A resolve rate is the share of tasks an agent's patch resolves. The top 30 Verified submissions, the entries agent teams sent to the benchmark's public results, resolved only 31% of the flagged tasks on average, against 88% of the other tasks. This is a correlation, not proof that the tests caused the gap. The comparison covers Verified only, even though Pro was flagged more often.
Read the chart as a warning about the leaderboard. Part of what looks like a difficulty gap may come from how the tests were written, not only from the task. This is our reading, not a finding of the paper.
Testing the claim directly
The authors went further. They asked Claude Opus 5.5 to loosen the tests on flagged tasks, but only where the specification left the requirement open. It was not allowed to add, rename or delete tests. They then regraded 2,186 failed patches from top submissions. Of those 2,186 patches, 61% passed once the tests were loosened.
If those passing patches were counted as resolved, each top-30 submission would gain 33 to 60 tasks, raising its resolve rate by up to 12 percentage points.
Our reading: this is the closest the paper gets to separating test wording from agent skill. But the same model, Claude Opus 5.5, is also one of the two judges, and it still edits the tests. The result is evidence, not proof.
Why this matters to you
- Read a leaderboard with its tests in mind. A rank is only as informative as the tests behind it.
- Check what the tests ask for. Our suggestion: a good test checks the behavior the task describes, not the way one particular patch was written.
- Look at the flagged tasks. Our suggestion: if a benchmark's hardest tasks are mostly the ones flagged for overspecification, its rankings may say more about test wording than agent skill.
What the paper does not show
This is an arXiv preprint, so treat the numbers as early results. The method depends on two LLM judges, checked on 206 validation tasks. The judges see the specification and the test patch, not the repository, and the relaxation step uses one of those same judge models.
What comes next
Our reading, not a claim of the paper: if maintainers start screening tests against specifications, some rankings could shift, and some agents that look weaker today might turn out to be fine. Whether the same flags hold up under other judges is the next test to run.
A correct patch should pass a fair test. Before you trust a leaderboard, check whether its tests ask for more than the task did.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.
