Accepted but Wrong: Silent Failures of LLM Code Repairs after API Migrations
Organizations: University of Massachusetts Amherst, Amherst, Massachusetts, USA · Accentrust, Vancouver, Canada · Georgia Institute of Technology, School of Computer Science, Atlanta, Georgia, USA · Duke University, Durham, North Carolina, USA ·
Abstract
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 from 0.233 to 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.
Figures & tables
| Visible inputs | Added | FA | FR | Stale |
|---|---|---|---|---|
| typical only | 0.00 | 0.410 | 0.010 | 34/52 |
| + blind writer, k=1 | 0.96 | 0.130 | 0.010 | 49/52 |
| + blind writer, k=2 | 1.85 | 0.075 | 0.010 | 50/52 |
| + blind writer, k=3 | 2.46 | 0.070 | 0.010 | 50/52 |
| + guarded writer, k=1 | 0.73 | 0.206 | 0.010 | 42/52 |
| + guarded writer, k=2 | 1.40 | 0.161 | 0.010 | 42/52 |
| Subset | FA T | FA E | FA W 3 | E T | W T |
|---|---|---|---|---|---|
| class S (23 tasks) | 0.571 | 0.080 | 0.091 | 0.503 (<0.001) | 0.491 (<0.001) |
| class E (25 tasks) | 0.297 | 0.053 | 0.055 | 0.235 (<0.001) | 0.233 (<0.001) |
| class B (4 tasks) | 0.192 | 0.050 | 0.050 | 0.142 (0.500) | 0.142 (0.500) |
| without CPython (16 tasks) | – | – | – | 0.328 (0.002) | 0.368 (0.002) |
| without Node.js (42 tasks) | – | – | – | 0.321 (<0.001) | 0.313 (<0.001) |
| without SQLite (46 tasks) | – | – | – | 0.367 (<0.001) | 0.346 (<0.001) |
| Model | T | S | E | ES | no gate |
|---|---|---|---|---|---|
| GPT-5.6-luna | 398/22/0 | 403/9/0 | 408/7/0 | 409/0/0 | 45 |
| Qwen3-8B | 268/98/0 | 271/80/0 | 270/24/0 | 268/20/0 | 182 |
| gpt-oss-20b | 320/71/0 | 327/47/1 | 353/8/0 | 351/8/0 | 111 |
| qwen3.6-35b-a3b | 354/49/0 | 363/30/0 | 368/7/0 | 379/8/0 | 97 |
| Model | Status | H1 | H2 | H3 | H4 |
|---|---|---|---|---|---|
| GPT-5.6-luna | descriptive | 0.038 (0.499) | 0.033 (0.749) | 0.018 (1.000) | 0.013 (1.000) |
| Qwen3-8B | confirmatory | 0.176 (<0.001) | 0.046 (0.749) | 0.010 (1.000) | 0.010 (0.998) |
| gpt-oss-20b | confirmatory | 0.161 (<0.001) | 0.064 (0.088) | 0.000 (–) | 0.023 (0.385) |
| qwen3.6-35b-a3b | descriptive | 0.102 (0.004) | 0.048 (0.256) | 0.003 (1.000) | 0.023 (0.256) |
| Model | Tasks | Tests | Binding | =hidden | Sim. | FA (S) | FA (raw) | FR (raw) |
|---|---|---|---|---|---|---|---|---|
| GPT-5.6-luna | 71/73 | 187 | 153 | 5 | 0.69 | 0.153 | 0.054 | 0.031 |
| Qwen3-8B | 30/73 | 49 | 27 | 2 | 0.71 | 0.355 | 0.240 | 0.031 |
| gpt-oss-20b | 57/73 | 128 | 93 | 1 | 0.69 | 0.235 | 0.149 | 0.031 |
| qwen3.6-35b-a3b | 67/73 | 168 | 122 | 3 | 0.68 | 0.215 | 0.100 | 0.031 |
| Model | wrong | W1 | W3 | G3 | Sraw | S | FR Sraw |
|---|---|---|---|---|---|---|---|
| GPT-5.6-luna | 45 | 0.178 | 0.044 | 0.178 | 0.044 | 0.178 | 0.023 |
| Qwen3-8B | 176 | 0.261 | 0.170 | 0.261 | 0.330 | 0.455 | 0.038 |
| gpt-oss-20b | 109 | 0.156 | 0.083 | 0.266 | 0.339 | 0.376 | 0.030 |
| qwen3.6-35b-a3b | 92 | 0.098 | 0.054 | 0.337 | 0.326 | 0.337 | 0.026 |
| Writer / repairer | Tasks | GPT-5.6-luna | Qwen3-8B | gpt-oss-20b | qwen3.6-35b-a3b | model-free |
|---|---|---|---|---|---|---|
| GPT-5.6-luna (writer-001) | 50 | 0.044 | 0.170 | 0.083 | 0.054 | 0.069 |
| GPT-5.6-luna | 52 | 0.044 | 0.176 | 0.128 | 0.065 | 0.075 |
| Qwen3-8B | 23 | 0.356 | 0.330 | 0.385 | 0.337 | 0.109 |
| gpt-oss-20b | 42 | 0.178 | 0.330 | 0.339 | 0.272 | 0.088 |
| qwen3.6-35b-a3b | 48 | 0.311 | 0.210 | 0.202 | 0.326 | 0.078 |
| Writer \ repairer | Tasks | GPT-5.6-luna | Qwen3-8B | gpt-oss-20b | qwen3.6-35b-a3b |
|---|---|---|---|---|---|
| GPT-5.6-luna (writer-001) | 50 | 0.000 | 0.029 | 0.000 | 0.000 |
| GPT-5.6-luna | 52 | 0.000 | 0.157 | 0.125 | 0.021 |
| Qwen3-8B | 23 | 0.400 | 0.143 | 0.179 | 0.106 |
| gpt-oss-20b | 42 | 0.200 | 0.257 | 0.268 | 0.021 |
| qwen3.6-35b-a3b | 48 | 0.400 | 0.157 | 0.214 | 0.234 |
| Visible inputs | FA | FR |
|---|---|---|
| typical only | 0.278 | 0.014 |
| + author edge input | 0.045 | 0.014 |
| + blind writer, k=1 | 0.089 | 0.036 |
| + blind writer, k=2 | 0.054 | 0.043 |
| + blind writer, k=3 | 0.053 | 0.043 |
| + guarded writer, k=1 | 0.135 | 0.036 |
| Model | Status | T | E | LH1 | LH2 | LH3 |
|---|---|---|---|---|---|---|
| GPT-5.6-luna | descriptive | 391/29 | 401/12 | 0.074 0.031 (0.378) | 0.018 (0.378) | 0.018 |
| Qwen3-8B | confirmatory | 241/108 | 244/27 | 0.253 0.062 (<0.001) | 0.019 (0.634) | 0.047 |
| gpt-oss-20b | confirmatory | 310/85 | 334/15 | 0.212 0.038 (<0.001) | 0.031 (0.335) | 0.026 |
| qwen3.6-35b-a3b | descriptive | 327/72 | 344/9 | 0.177 0.023 (<0.001) | 0.057 (0.047) | 0.069 |
| Programs | T | E | W 3 | ||||
|---|---|---|---|---|---|---|---|
| Menu | median | wrong | tasks | wrong | tasks | wrong | tasks |
| earlier menu | 5 | 113 (2.17) | 41 | 14 (0.27) | 11 | 15 (0.29) | 12 |
| large menu | 30 | 445 (8.56) | 42 | 46 (0.88) | 17 | 62 (1.19) | 15 |
| Visible inputs | FA | FR | FA hard |
|---|---|---|---|
| typical only | 0.337 | 0.010 | 0.990 |
| + blind writer (GPT-5.6-luna), k=3 | 0.058 | 0.042 | 0.153 |
| + guarded writer, k=3 | 0.135 | 0.042 | 0.492 |
| + author edge input | 0.058 | 0.010 | 0.168 |
| + blind writer v2 (qwen3.6), k=3 | 0.094 | 0.083 | – |
| + blind writer v2 (Qwen3-8B), k=3 | 0.182 | 0.049 | – |
| Model | T | E | HA1 | HA2 | luna | qwen3.6 | Qwen3-8B | own |
|---|---|---|---|---|---|---|---|---|
| GPT-5.6-luna | 385/42 | 394/12 | 0.107 0.031 (0.063) | 0.033 (0.094) | 0.117 | 0.433 | 0.300 | 0.117 |
| Qwen3-8B c | 245/105 | 244/22 | 0.250 0.050 (<0.001) | 0.003 (1.000) | 0.173 | 0.303 | 0.378 | 0.395 |
| gpt-oss-20b c | 306/88 | 339/17 | 0.218 0.043 (<0.001) | 0.006 (0.757) | 0.104 | 0.392 | 0.384 | 0.416 |
| qwen3.6-35b-a3b | 317/80 | 347/11 | 0.198 0.028 (<0.001) | 0.020 (0.225) | 0.048 | 0.373 | 0.349 | 0.317 |
| Model | CPython | Node.js | SQLite 3.53 | SQLite 3.54 |
|---|---|---|---|---|
| GPT-5.6-luna | 37/45 (37) | 10/13 (10) | 3/4 (2) | 3/4 (3) |
| Qwen3-8B | 19/45 (24) | 6/13 (9) | 1/4 (0) | 1/4 (0) |
| gpt-oss-20b | 29/45 (28) | 7/13 (8) | 2/4 (1) | 3/4 (3) |
| qwen3.6-35b-a3b | 32/45 (34) | 10/13 (6) | 2/4 (3) | 2/4 (2) |
| Condition | Joint | affected | controls | silent | abstain | probes | doc. bytes | edits |
|---|---|---|---|---|---|---|---|---|
| stale procedure (B0) | 24/100 | – | – | 48 | 0 | 0.00 | 0.00 | 0.00 |
| scope-neutral reconstruction (B1R) | 96/100 | 72 | 24 | 0 | 4 | 1.04 | 119.83 | 1.00 |
| contract-guided local repair (B4) | 96/100 | 72 | 24 | 0 | 4 | 2.60 | 11.16 | 1.00 |
| Task | predicates | partial score | candidate operations | verdicts | decidable missing obligation |
|---|---|---|---|---|---|
| w02 | 4 | 0.75 | 1 call(s); auth header reused; edits 0 | visible: yes; upstream: fail | re-authentication via /v3/oauth/token requested but not performed (stale bearer accepted by the mock) |
| w08 | 3 | 0.67 | 1 call(s); auth header reused; edits 0 | visible: yes; upstream: fail | re-authentication via /v3/oauth/token requested but not performed (stale bearer accepted by the mock) |
| w14 | 2 | 0.50 | 1 call(s); auth header reused; edits 0 | visible: yes; upstream: fail | re-authentication via /v3/oauth/token requested but not performed (stale bearer accepted by the mock); requested second record; answer is the first record |
| Threat | What we did | What remains |
|---|---|---|
| Author-written edge and hidden inputs | blind writer that never sees program or hidden inputs; 3 of 176 inputs equal a hidden input | hidden inputs are still author-written |
| Effect seen before it was tested | fresh replication on 15 new clusters; freeze copies of the design text | M4c computable from the build before F0 (disclosed) |
| Contracts stricter than requirements | two blind AI audits per contract; post-hoc removal of p0 and d0 changes 0 verdicts | no human review; R2 class-label objections unresolved |
| One model in three roles | writer repairer matrix (post hoc); two further preregistered writers (qwen3.6, Qwen3-8B) | only GPT-5.6-luna’s writer passed; auditor and writer are the same model |
| Menu composition | hard-distractor stage (233 legacy-matching distractors); menu-independent counts | distractors remain author-generated by documented operators |
| Strong-evidence criterion | reported against its frozen definition | not met: M4a not positive; audit flags 10% |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Runtime | Origin | Class | Split | Correct | typical | edge |
|---|---|---|---|---|---|---|---|
| py-binascii-hqx | cpython | v2 | B | test | 0/6 | yes | yes |
| py-distutils-looseversion | cpython | v2 | B | test | 0/18 | yes | yes |
| py-shuffle-random-param | cpython | v2 | B | test | 0/6 | yes | yes |
| py-control-csv | cpython | v2 | C | development | 1/4 | no | no |
| py-control-json-canonical | cpython | v2 | C | development | 1/4 | no | no |
| py-control-sha256 | cpython | v2 | C | test | 2/4 | no | no |
| Row | Joint | silent | discordant with B4 |
|---|---|---|---|
| B1 (sealed) | 88/100 | 12 | 8 |
| B1C (post-audit) | 88/100 | – | 8 |
| Budget | Repr. | Feedback | Joint | silent | abstain | mean edits |
|---|---|---|---|---|---|---|
| 2 | full | behavioral | 45/48 | 0 | 3 | 1.24 |
| 2 | full | none | 45/48 | 0 | 3 | 1.24 |
| 2 | patch | behavioral | 46/48 | 0 | 2 | 1.28 |
| 2 | patch | none | 46/48 | 0 | 2 | 1.28 |
| full | behavioral | 48/48 | 0 | 0 | 1.40 | |
| full | none | 48/48 | 0 | 0 | 1.40 |
Automated Program Repair
Automated program repair develops methods that locate software faults and produce validated fixes with limited human effort.
See all 164 papers