跳转至

文章背景与核心概要

当前的仓库级软件工程基准测试在评估编程智能体时取得了显著进展,但现有的评估标准几乎完全依赖于生成的补丁是否能够通过标准功能测试。这种做法忽略了一个至关重要的真实世界要素:代码审查衍生的验收约束(审查约束)。为了填补这一空白,本文作者推出了 SWE-Gate,这是一个旨在同时评估审查约束符合性与功能正确性的新型基准测试。

研究结果揭示了一个巨大的差距:在成功通过功能测试的 644 个智能体生成的修复方案中,有 221 个未能满足伴随的代码审查约束。这表明,仅进行功能测试的评估往往会高估软件工程智能体的实际能力,无法真正应对生产环境的严苛要求。


SWE-Gate: Passing Functional Tests Is Not Enough for Software Engineering Agents

Authors: Xin He, Yanlin Wang, Mingwei Liu, Jiachi Chen, Hongyu Zhang, Guanbin Li
Subjects: Software Engineering (cs.SE), Artificial Intelligence (cs.AI)
arXiv ID: arXiv:2609.04167 | Submitted: September 3, 2026
Repository & Replication Package: GitHub - DeepSoftwareAnalytics/SWE-Gate


📌 Executive Summary

While repository-level software engineering benchmarks have made strides in evaluating coding agents, current evaluation standards rely almost entirely on whether a generated patch passes standard functional tests. This leaves out a critical real-world component: review-derived acceptance constraints (review constraints).

To bridge this gap, the authors introduce SWE-Gate, a new benchmark designed to evaluate review constraint compliance alongside functional correctness. Their findings reveal a significant gap: among 644 agent-generated repairs that successfully passed functional tests, 221 failed to satisfy the accompanying review constraints. This demonstrates that functional-only evaluations routinely overestimate the capabilities of software engineering agents.

虽然仓库级的软件工程基准测试在评估编程智能体方面取得了长足进步,但当前的评估标准几乎完全依赖于生成的补丁是否能通过标准功能测试。这遗漏了一个关键的真实世界组件:代码审查衍生的验收约束(审查约束)

为了填补这一空白,作者推出了 SWE-Gate,这是一个旨在同时评估审查约束符合性与功能正确性的全新基准测试。他们的研究发现了一个显著的差距:在成功通过功能测试的 644 个智能体生成的修复方案中,有 221 个未能满足伴随的代码审查约束。这表明,仅依赖功能测试的评估会例行公事般地高估软件 engineering 智能体的能力。


🔍 Key Highlights & Methodology

  • The Problem: Existing benchmarks measure functional correctness (issue resolution) while ignoring quality, style, or specific architectural constraints typically enforced during real-world Pull Request (PR) code reviews.
  • What is SWE-Gate? A repository-level benchmark explicitly evaluating review constraint compliance alongside functional code execution.
  • Dataset Composition:
  • 303 repository-level repair instances.
  • Sourced from 75 open-source Python repositories across a diverse range of software domains.
  • Derived directly from real PR review comments.
  • Structure of Instances: Each repair instance provides:
  • Separate functional tests and constraint tests.
  • Both non-compliant and "gold" (ideal) reference patches.
  • A clear separation between solving an issue and satisfying review expectations.

🔍 核心亮点与方法论

  • 问题所在: 现有的基准测试衡量的是功能正确性(问题解决情况),同时却忽视了在真实世界的拉取请求(PR)代码审查过程中通常强制执行的代码质量、风格或特定的架构约束。
  • 什么是 SWE-Gate? 这是一个仓库级的基准测试,明确评估审查约束的符合性以及功能代码的执行情况。
  • 数据集组成:
  • 303 个仓库级修复实例。
  • 来源于跨越多种软件领域的 75 个开源 Python 仓库。
  • 直接提取自真实的 PR 审查评论。
  • 实例结构: 每个修复实例均提供:
  • 独立的功能测试和约束测试。
  • 不合规的补丁与“黄金”(理想的)参考补丁。
  • 解决问题与满足审查期望之间的清晰区分。

📊 Experimental Insights

The authors tested four Large Language Model (LLM) backends using a standard coding-agent scaffold: * Out of 644 total repairs that successfully passed standard functional tests, an alarming 221 repairs failed to meet the explicit review constraints. * Takeaway: Relying solely on functional testing creates a false sense of security, overestimating an AI agent's readiness for autonomous, production-level software engineering tasks.

📊 实验洞察

作者使用标准的编码智能体脚手架测试了四个大语言模型(LLM)后端: * 在总共成功通过标准功能测试的 644 个修复方案中,令人担忧的是有 221 个修复方案未能 满足显式的代码审查约束。 * 核心结论: 仅依赖功能测试会产生虚假的安全感,高估了 AI 智能体胜任自主、生产级软件工程任务的准备就绪度。