paperbot · PL 论文追踪

全部论文 待读 收藏

Needle in the Repo: Diagnosing Maintainability Failures in AI-Generated Repository Edits

仓库中的针:诊断 AI 生成仓库编辑中的可维护性失效
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Haichao Zhu, Qian Zhang, Jiyuan Wang, Zhaorui Yang, Yuxin Qiu
crossref: 2026-10-09

AI 速览

一句话:提出 NITR 探针-预言机框架,诊断行为正确但破坏可维护性的 AI 仓库编辑。

现有 AI 编码 agent 评估多聚焦行为正确性,忽视模块化、可测试性等可维护性风险。本文提出 NITR,一个“探针—预言机”诊断框架:把软件工程经验蒸馏为小型多文件代码库中的受控探针,每个探针只针对一个可维护性维度,并配有隐藏 harness——功能测试保证行为,结构预言机编码可维护性约束并给出可解释诊断。作者评估 GPT、Claude、Gemini、Qwen 的 23 种直接推理与 agent 配置:平均仅解决 36.2%,最佳 57.1%;微案例 53.5% 降至多步 20.6%;依赖控制 4.3%、职责分解 15.2% 最难;13.3% 通过全部功能测试却违反结构预言机;agent 模式把平均从 28.2% 提到 45.0%,但未消除架构性失败。

问题
AI 编码 agent 的现有评测强调行为正确性,忽视弱模块化、可测试性差等可维护性风险,导致隐藏成本被推迟给下游开发者。
方法
NITR 将软件工程经验蒸馏为嵌入小型多文件代码库的受控探针,每个探针聚焦一个可维护性维度,并用隐藏 harness 结合功能测试与结构预言机给出可解释诊断。
评估
在 GPT、Claude、Gemini、Qwen 家族的 23 种直接推理与 agent 配置上评测,报告解决率、不同难度与维护性维度的表现差异,以及通过功能测试但违反结构预言机的比例。
原文摘要(Abstract)

AI coding agents can now complete complex programming tasks, but existing evaluations largely emphasize behavioral correctness and often overlook maintainability risks such as weak modularity or testability. Automation without accountability shifts invisible cost downstream because hidden maintainability failures incurred today are deferred to the developers who must extend, debug, and sustain these systems tomorrow, raising significant technical and organizational concerns for software engineering. We present Needle in the Repo (NITR), a diagnostic, probe-and-oracle framework for evaluating whether behaviorally correct repository edits preserve maintainable structure. The key idea is to distill recurring software engineering wisdom into controlled probes embedded in small, realistic multi-file codebases, with each probe designed so that success depends primarily on one targeted maintainability dimension. Each probe is paired with a hidden evaluation harness that combines (i) functional tests for required behavior, and (ii) structural oracles that encode the targeted maintainability constraint and return interpretable diagnoses. Using NITR, we extensively evaluate 23 coding configurations across GPT, Claude, Gemini, and Qwen families in both direct-inference and agent-based settings. We find that current AI coding systems remain far from robust. On average, all AI coding configurations solve only 36.2% of cases, the best reaches 57.1%, and performance drops from 53.5% on micro cases to 20.6% on multi-step cases. The hardest pressures are architectural rather than local edits, especially dependency control (4.3%) and responsibility decomposition (15.2%). Moreover, 64/483 outcomes (13.3%) pass all functional tests yet fail the structural oracle. Under our harness, agent-mode configurations improve average performance from 28.2% to 45.0%, but do not eliminate the architectural failures. These results show that progress in code generation is not yet progress in maintainable code evolution, and that NITR exposes a critical failure surface largely missed by conventional evaluation.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot12480,
  title = {Needle in the Repo: Diagnosing Maintainability Failures in AI-Generated Repository Edits},
  author = {Haichao Zhu and Qian Zhang and Jiyuan Wang and Zhaorui Yang and Yuxin Qiu},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834401}
}