Manuscript Offprint

arXiv:2611.08269

Accepted but Wrong: Silent Failures of LLM Code Repairs after API Migrations

Xiaobo Chen, Genliang Zhu, Ziyuan Wang, Chu Wang

XIAOBO CHEN, University of Massachusetts Amherst, USA

GENLIANG ZHU, Accentrust, Canada and Georgia Institute of Technology, USA

ZIYUAN WANG, Duke University, USA

CHU WANG, Accentrust, Canada and University of Illinois Urbana-Champaign, USA

After a runtime or API migration, an LLM-repaired procedure can run cleanly yet return wrong results, and a release check on typical test inputs ships it. We report a preregistered study of 73 tasks covering 60 documented changes in CPython, Node.js and SQLite. Every candidate is executed on the real runtimes against withheld contracts. Over the complete repair space, the all-assertions gate on typical inputs released 0.410 of wrong repairs. One edge input written from the release note cut this to 0.065, and to 0.061 on 15 unseen clusters. Three inputs from a blind GPT-5.6-luna writer that never saw the program reached 0.070. Two further frozen stages enlarged the menu to 1491 fragments and then added 233 hard distractors that match the legacy output on typical inputs. The edge input (0.058) and the frontier-model writer (0.058) passed their preregistered tests. Yet 0.168 and 0.153 of the hard wrong programs still passed. Two local-model writers failed their preregistered tests. Across four model families, the edge input cut wrong releases per attempt in all three open-weight families on all three menus, for example 0.233→0.057, without lowering correct completion. Self-tests helped less. A blind AI audit flagged 34 contracts as stricter than their requirements. Dropping the disputed checks changed 0 verdicts, but class-label disputes remain open. No model-written code was executed. Artifacts are available from the authors on request.

Additional Key Words and Phrases: LLM program repair, API migration, runtime upgrade, release notes, edge-case test inputs, test oracle adequacy, release gate, LLM test generation, accepted-but-wrong repairs, silent behavioral breaking changes, patch overfitting, differential testing, preregistered empirical study, Python 3.12, Node.js 24, SQLite

1 Introduction

When the runtime or API under a business procedure evolves, an approved migration must repair the procedure so that it still meets the same obligation. Some breakages are loud: a removed function raises an error. Others are quiet: every call succeeds, yet the result changes. For example:

  • an enumeration renders as 3 instead of Priority.HIGH;

  • sum() returns a more accurate float that no longer matches stored ledger totals;

  • Buffer .poolSize grows eightfold and silently changes the chunking of every upload.

A valid call can still have an invalid effect [19]. Agents notice plausible wrong values far less often than explicit errors [17]. In program repair, weak tests let incorrect patches through: the overfitting problem [31, 35, 39].

Our earlier study (Section 6) found that a pre-release check fails mainly through its inputs. Checks on the obligation released few wrong repairs once one edge input written from the release note was visible. Reviewers raised four objections:

  • the edge inputs were author-written and close to the hidden inputs;

  • the repair space is a finite menu;

  • the human contract sign-off never happened;

  • the test partition had only 34 clusters.

Authors' Contact Information: Xiaobo Chen, University of Massachusetts Amherst, Amherst, Massachusetts, USA; Genliang Zhu, Accentrust, Vancouver, Canada and Georgia Institute of Technology, School of Computer Science, Atlanta, Georgia, USA; Ziyuan Wang, Duke University, Durham, North Carolina, USA; Chu Wang, Accentrust, Vancouver, Canada and University of Illinois Urbana-Champaign, Department of Computer Science, Urbana, Illinois, USA.

This paper answers the first and fourth with new, preregistered experiments. It answers the third only with an AI audit, not a human review. It answers the second only partly: a second stage enlarges the menu to a median of 27 programs per task, but 25 tasks still have fewer than 15 options. Repairs remain choices among author-written fragments, and that stage shows that the share of wrong programs a gate releases depends on how the menu is built (LM3).

Setting. We built 73 tasks with 66 affected tasks in 60 documented-change clusters, 18 of them new, on three installed open-source lineages:

  • CPython 3.9→3.12;
  • Node.js 20→24;
  • the SQLite shell 3.51→3.54.

Every change is grounded in pinned release-note text. Every candidate is executed on the real runtimes. Hidden contracts are never shown to any model. We compare the visible-input sets that a release gate can use:

  • typical inputs only;
  • plus the author's release-note edge input;
  • plus up to three inputs from a blind writer, an isolated LLM that sees only the release note and the visible contract;
  • plus self-tests that the repairing model writes for itself before it repairs.

Four model families repair the procedures under equal information: GPT-5.6-luna via the Codex CLI, Qwen3-8B, gpt-oss-20b and qwen3.6-35b-a3b. A fifth, gemma-4-12b, failed the unchanged admission check and is reported as not admitted.

References (32)