ChatPaper.aiChatPaper

SWE-Review:借助代理式代码审查实现问题解决的闭环

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

July 7, 2026
作者: Ruoyu Wang, Jierun Chen, Shaowei Wang, Chaofan Tao, Sidi Yang, Yuxin Jiang, Kim-Hui Yap, Lifeng Shang, Xiaohui Li, Haoli Bai
cs.AI

摘要

编码代理越来越多地为真实世界的软件问题生成拉取请求(PR),但一次性PR生成仍为开环过程:PR被提出后缺乏系统性的审查、诊断或修订。我们提出SWE-Review框架,通过代理型代码审查实现闭环。给定一个问题和一个AI生成的PR,审查代理将探索代码仓库,决定该PR是否应被接受,并提供结构化的修订反馈。我们使用所提出的SWE-Review-Bench评估这一设定,以衡量审查正确性与下游修订的有效性。此外,我们整理了SWE-Review-Traj数据集,用于研究代理型审查的更广泛应用,并填补开放审查训练中的数据稀缺缺口。实验表明,代理型审查通过“生成-审查-修订”循环持续改进PR,在决策准确性和修订后解决率方面均优于单轮固定上下文的审查,其效果可迁移至改进问题解决模型,并实现高效且有效的测试时扩展。这些结果将代理型代码审查定位为一种实用机制,推动AI编码代理从一次性PR生成迈向闭环问题解决。
English
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 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 SWE-Review-Bench to measure both review correctness and downstream revision usefulness. We further curate 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.