TRANSMISSION // 2612.05893v1

Passing the tests can still hide a flawed search

Source published

A study of agent-written optimization programs finds that passing hidden tests did not guarantee correctness on every valid input.

AI-generated conceptual illustration for Passing the tests can still hide a flawed search
AI-generated conceptual illustration; not documentary evidence.

In exact search, a program can return a plausible answer while silently discarding information needed to find the true optimum. A preprint examines this failure mode in programs written by coding agents—and why ordinary test results may miss it.

A program can pass every test it is given and still be wrong. That risk matters in exact search and optimization, where software explores possible solutions and must preserve the information needed to identify the best one. A new preprint asks whether coding agents’ programs can make flawed decisions about what information to keep, even when they earn a perfect score from a verifier.

The researchers examined 15 programs written by coding agents for seven exact optimization tasks. Every program passed all of its hidden tests and received full verifier reward. Yet the researchers found that each produced an incorrect result on at least one valid input. The paper’s central concern is not simply that errors exist, but how an algorithm’s internal “state”—its representation of partial solutions and the way it updates or retains them—can contribute to failure.

Checking errors independently

To establish that a result was wrong, the authors did not rely on the task’s reference solution alone. Instead, they used an independent check appropriate to each case: a proof, an exhaustive oracle, or a permitted plan tested in a simulator built from the task statement. These approaches provide separate grounds for identifying an incorrect answer.

They then investigated whether a failure could be traced to how the program represented, updated, or retained its working state. This distinction matters: demonstrating that an output is wrong is not the same as locating the source of the bug. A program may contain several interacting choices, and evidence that one adjustment helps on one input does not establish that the overall algorithm is correct.

What the diagnoses showed

Eight programs showed evidence of a specific state-related defect. In six, changing the implicated decision about retaining information or transitioning between states restored an independently established comparison value on the input that revealed the error. In the other two, the authors demonstrated histories that had been merged or omitted, but did not show an edit that restored the comparison value.

Five additional programs returned the correct answer when run through their own exact branch rather than an approximate fallback. That change points to the fallback as relevant, but it does not identify the precise error within it. One program failed on an input that activated its fallback, but the authors tested no corrective edit. The remaining program’s failure was not localized. Together, these categories account for all 15 programs.

The authors stress that none of the tested edits established global correctness. A repair that works on a revealing input is useful diagnostic evidence, not proof that the program will work on every valid input.

Why hidden tests missed the errors

The study found two kinds of missed opportunity in the test suites. Some hidden tests never reached the decisions implicated in the failures. Others reached those decisions but did not produce an incorrect answer. So simply having tests—or even exercising a particular part of the code—does not guarantee that a defect will show up in the final output.

This supports a broader point about software evaluation: checking answers alone can leave important weaknesses undetected. In exact search, the algorithm’s internal choices about which partial histories to keep may determine whether it can eventually reach the optimum. The authors suggest evaluating not only whether programs return correct outputs, but also whether their representations, updates, and retention decisions preserve information needed later.

What the evidence can and cannot say

These cases demonstrate concrete instances in which a verifier gave a positive result for an incorrect program. They do not measure how often this happens across coding-agent programs more broadly, and the authors say the findings establish no effect on agent training. The study also does not show that every flaw came from state handling: several failures remained only partly or wholly unlocalized.

This article is based on the paper’s abstract, rather than a full examination of its methods, task details, or results. The source is an arXiv preprint, which may not have undergone peer review. The abstract gives the overall counts and diagnostic categories but does not provide enough detail to assess the individual tasks or independently examine the underlying evidence. The findings are therefore best read as documented examples that motivate closer evaluation—not as an estimate of how widespread the problem is.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • Why Passing Tests May Not Prove an AI Patch Is Correct

    Supporting evidence: Both studies show that passing tests did not establish correctness in the cases examined: Kaushik et al. found 15 accepted exact-optimization programs wrong on valid inputs, while Ma et al. report that nearly a third of test-passing patches in SWE-Proof admitted counterexamples. The populations and methods differ—selected agent programs versus a formally checked benchmark—so this supports only the bounded point that test success can miss defects, not a shared failure rate.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2612.05893v1 — Original paper

      Excerpt reference: static/papers/2612.05893v1.md:21-48
      Basis: Paper text
      Source file SHA-256: d04c7b0da646d2d00fe9f3058ed9817b0ffdc836c3960de7a1736ba6ebc72086

    • 2609.21190v3 — Original paper

      Excerpt reference: static/papers/2609.21190v3.md:15-69
      Basis: Paper text
      Source file SHA-256: deec578e59f477760ba19741fc72e9ba7c5ef33285d8895b6a9dc694e976ae1b

  • Why passing tests didn’t catch these AI coding defects

    Supporting evidence: Both reports document defects in agent-written code that automated tests failed to catch: Kaushik et al. found 15 programs that passed hidden suites but were wrong on valid inputs, and Lee et al. report that tests caught only 6 of 95 defects traced in one deployed tutoring system. The first is a retrospective set of exact-optimization programs; the second is one system with human-directed corrections, so their counts are not directly comparable or generalizable.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2612.05893v1 — Original paper

      Excerpt reference: static/papers/2612.05893v1.md:21-48
      Basis: Paper text
      Source file SHA-256: d04c7b0da646d2d00fe9f3058ed9817b0ffdc836c3960de7a1736ba6ebc72086

    • 2612.04234v1 — Original paper

      Excerpt reference: static/papers/2612.04234v1.md:160-246
      Basis: Paper text
      Source file SHA-256: 4d3a2a47e9b6b1074d37b2cb25cd3875f9d861f97a1b37e6284cca05247bdd3f

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.