arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.06065cs.SE
收藏

SWE-Review:通过智能代码审查解决问题闭环

SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review

NTU(南洋理工大学);Huawei Technologies(华为技术有限公司);HKU(香港大学)

Ruoyu Wang, Jierun Chen, Shaowei Wang, Chaofan Tao, Sidi Yang, Yuxin Jiang, Kim-Hui Yap, Lifeng Shang, Xiaohui Li, Haoli Bai

AI总结:

研究通过智能代码审查闭合PR生成环的问题,核心方法是SWE-Review框架,由审查代理进行审查并提供反馈。主要贡献是能持续改进PR,在多方面表现优于单轮审查,还能推动AI编码代理从一次性PR生成迈向闭环问题解决。

摘要:

编码代理越来越多地为实际软件问题生成本地修改请求(PR),但一次性PR生成仍是开环:PR提出时没有系统审查、诊断或修订。我们引入SWE-Review,一个通过智能代码审查来闭合此环的框架。给定一个问题和一个由人工智能生成的PR,审查代理会探索存储库,决定是否应接受该PR,并提供结构化反馈以供修订。我们用提出的SWE-Review-Bench评估此设置,以衡量审查正确性和下游修订有用性。我们还精心策划了SWE-Review-Traj数据集,以研究智能审查的更广泛应用并填补开放审查员训练的数据稀缺差距。实验表明,智能审查通过生成-审查-修订循环不断改进PR,在决策准确性和修订后的解决率方面均优于单轮固定上下文审查,能转移到审查之外以改进问题解决模型,并实现有效且高效的测试时扩展。这些结果将智能代码审查定位为一种实用机制,可推动人工智能编码代理从一次性PR生成转向闭环问题解决。

英文摘要:

Coding agents increasingly generate pull requests (PRs) for real-world software issues, yet one-shot PR generation remains open-loop: the PR is proposed without systematic review, diagnosis, or revision. We introduce \textbf{SWE-Review}, a framework for closing this loop with agentic code review. Given an issue and an AI-generated PR, a reviewer agent explores the repository, decides whether the PR should be accepted, and provides structured feedback for revision. We evaluate this setting with our proposed \textbf{SWE-Review-Bench} to measure both review correctness and downstream revision usefulness. We further curate \textbf{SWE-Review-Traj} dataset to study broader applications of agentic review and fill the data-scarcity gap for open reviewer training. Experiments show that agentic review continuously improves PRs through a generate-review-revise loop, outperforms single-turn fixed-context review in both decision accuracy and resolve rate after revision, transfers beyond review to improve issue-resolution models, and enables effective and efficient test-time scaling. These results position agentic code review as a practical mechanism for moving AI coding agents from one-shot PR generation toward closed-loop issue resolution.

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

↑