arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.17973cs.SEcs.AI
收藏

TDAD:基于图的影响力分析减少AI编码代理中的代码回归

TDAD: Test-Driven Agentic Development - Reducing Code Regressions in AI Coding Agents via Graph-Based Impact Analysis

Universidad ORT Uruguay(ORT大学乌拉圭分校);DC, UBA, Argentina(阿根廷布宜诺斯艾利斯大学(DC, UBA))

Pepe Alonso, Sergio Yovine, Victor A. Braberman

AI总结:

TDAD通过在AI编码代理提交更改前进行影响分析,减少代码回归。实验表明其将回归率降低70%,优于传统方法。

摘要:

AI编码代理可以解决现实软件问题,但经常引入回归——打破之前通过的测试。当前基准测试几乎只关注解决率,忽略了回归行为。本文提出了TDAD(基于测试的代理开发),一个开源工具,通过构建源代码和测试之间的依赖图,使代理在提交补丁前知道哪些测试需要验证,并能自我纠正。该图以轻量级代理技能形式提供——一个静态文本文件,代理在运行时查询。在SWE-bench Verified上,使用两个开源模型(Qwen3-Coder 30B,100实例;Qwen3.5-35B-A3B,25实例)评估,TDAD将回归率从6.08%降至1.82%。相比之下,添加TDD流程指令而不考虑目标测试上下文导致回归率增加到9.94%——比无干预更差。当作为代理技能部署于不同模型和框架时,TDAD将问题解决率从24%提升至32%,证明了揭示上下文信息优于规定流程工作流。所有代码、数据和日志均在https://github.com/pepealonso95/TDAD公开。

英文摘要:

AI coding agents can resolve real-world software issues, yet they frequently introduce regressions -- breaking tests that previously passed. Current benchmarks focus almost exclusively on resolution rate, leaving regression behavior under-studied. This paper presents TDAD (Test-Driven Agentic Development), an open-source tool that performs pre-change impact analysis for AI coding agents. TDAD builds a dependency map between source code and tests so that before committing a patch, the agent knows which tests to verify and can self-correct. The map is delivered as a lightweight agent skill -- a static text file the agent queries at runtime. Evaluated on SWE-bench Verified with two open-weight models running on consumer hardware (Qwen3-Coder 30B, 100 instances; Qwen3.5-35B-A3B, 25 instances), TDAD reduced regressions by 70% (6.08% to 1.82%) compared to a vanilla baseline. In contrast, adding TDD procedural instructions without targeted test context increased regressions to 9.94% -- worse than no intervention at all. When deployed as an agent skill with a different model and framework, TDAD improved issue-resolution rate from 24% to 32%, confirming that surfacing contextual information outperforms prescribing procedural workflows. All code, data, and logs are publicly available at https://github.com/pepealonso95/TDAD.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑