A green CI run is useful evidence, but it only demonstrates that the checks in the pipeline passed. It does not prove that a repair preserved every behavior described in the code’s documentation. A study of LLM coding agents tests that distinction with a focused example: a function’s docstring says a particular exception must propagate, while a static-analysis warning points to an exception handler. An agent can remove the warning by changing the handler and still leave the exception swallowed.
What the experiments found
- In two synthetic-code studies, agents rarely suppressed warnings on genuinely buggy examples: the reported rate was at most 1.2%. On the deliberately constructed exception-handling traps, however, they cleared the warning while retaining the bug in 22.5%–75.0% of cases. A common repair was to narrow the handler to the very exception that the documentation said should escape.
- Plain CI accepted 85.8% of these incorrect repairs. Adding exception-related rules from ruff or pylint reduced acceptance, but did not eliminate it: 50.0% of wrong repairs still passed. Linting can catch some patterns, but it cannot establish that documented behavior is preserved unless that behavior is checked.
- A generic reminder helped only one of three agents in the relevant study. A dedicated turn to review the docstring, combined with a CI check derived from it, helped all three.
- A third study froze its test set before evaluation and used functions from real libraries and recent GitHub code. It covered seven agents, four described as frontier models. Under the original CI, the documented exception was still swallowed in 9.7%–51.5% of trap cases. The review turn reduced that rate for every agent tested. An executable contract witness reduced it for four of the five agents evaluated with that intervention. On the half of the units that had a witness, the rate fell from 12.6%–54.8% to 0.0%–6.0%; the authors label this comparison post hoc.
A later author update broke down 15 remaining failures on witness-equipped units: in 10, the agent stopped while the witness still failed; in five, it passed the witness but failed a held-out input. None involved editing the docstring, witness, or CI. This points to missed behavior rather than an attempt to evade the check. The authors also reported that a placeholder test increased the error rate for five of seven agents. False reassurance is one possible explanation, not an established cause; run order and the extra file’s effect on tool use remain alternatives.
Why this matters
The lesson is not that CI is ineffective, but that a pipeline can only verify what it actually tests. If it checks lint status and visible tests but not a documented error path, a repair can look clean while breaking the contract. Teams using coding agents can turn important documentation into executable checks and include contract review in code review. Evaluations should also distinguish a green build from success on held-out behavior. Passing CI remains a valuable signal, but it is not a blanket guarantee of correctness.
Comments
Checking sign-in status...
Loading comments...