arXiv(opens in a new tab)cs.SESep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.04167

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

Xin He, Yanlin Wang, Mingwei Liu, Jiachi Chen, Hongyu Zhang, Guanbin Li

Abstract

Repository-level software engineering benchmarks have significantly advanced the evaluation of coding agents, but existing benchmarks primarily measure whether generated patches pass functional tests and overlook review-derived acceptance constraints (review constraints) that often influence whether a patch is acceptable in real-world software development. We introduce SWE-Gate, a repository-level benchmark for software engineering agents that explicitly evaluates review constraint compliance alongside functional correctness. SWE-Gate derives review constraints from real pull request review comments and synthesizes repository-level repair instances around these constraints. Each instance provides separate functional and constraint tests, together with non-compliant and gold patches, enabling explicit separation between issue resolution capability and review constraint compliance. We construct SWE-Gate with 303 repository-level repair instances spanning 75 open-source Python repositories across diverse software domains. Experiments with four LLM backends spanning different capability levels under a common coding-agent scaffold reveal a substantial gap between functional success and success under the complete repair specification: among 644 repairs that pass the functional tests, 221 fail to satisfy the provided review constraints. These findings show that functional-only evaluation overestimates agents' ability to satisfy the full requirements of repository-level repair tasks. The replication package including code, data, and experimental results is available at https://github.com/DeepSoftwareAnalytics/SWE-Gate.

Introduction

Recent advances in large language models (LLMs) have transformed automated software engineering, evolving from early function-level code generation benchmarks [1, 2] to repository-level agents capable of understanding large code-bases [3–5], localizing defects, and repairing real software issues using code, version history, tests, and natural-language reports [6–9]. Repository-level repair has consequently become an important measure of practical programming ability. SWE-Bench [6], the de facto benchmark, constructs tasks from real issue-pull request pairs and evaluates patches with executable functional tests, driving systems such as SWE-Agent [7] and OpenHands [8].

Despite their success, existing repository-level benchmarks largely adopt a single evaluation criterion: a repair is considered successful if the generated patch passes the functional test suite which is typically provided with the PR and mainly assesses whether the reported issue has been functionally resolved. However, in practice, a patch that resolves the reported issue and passes functional tests is not necessarily accepted [10, 11]. During code review, repository maintainers frequently require contributors to satisfy additional requirements beyond functional correctness. We call such requirements review-derived acceptance constraints (gates): additional, objectively testable requirements that restrict which functionally correct repairs are acceptable. For brevity, we refer to them as review constraints hereafter. These requirements are often reflected in review comments that request changes before a patch can be accepted. Examples of such requirements include preserving backward compatibility, maintaining established exception semantics, or following repository-specific implementation conventions [12–14].

For example, a Pydantic pull request sought to add conditional serialization for extra fields. Its initial implementation provided the requested behavior by introducing a new core-schema representation, but a reviewer noted that changing this public interface would be breaking and recommended adding an extras_ser_exclude_if parameter instead.¹ The contributor subsequently adopted this backward-compatible design.

The two requirements can be tested separately. A functional test checks whether qualifying extra fields are omitted from serialized output, whereas a compatibility test checks whether the existing public schema remains unchanged and usable by code written against the previous format. A patch may therefore pass the functional test while failing compatibility, showing that implementing the requested behavior does not necessarily satisfy the review constraint raised during review.

Existing benchmarks answer whether a model can generate a functionally correct repair, but not whether that repair also complies with review-derived review constraints. These are separable evaluation dimensions: issue tests establish func-

¹https://github.com/pydantic/pydantic/pull/12657#discussion_r2671466868

*Yanlin Wang is the corresponding author.

tional success, whereas constraint tests determine whether a functional repair also meets additional acceptance requirements. Evaluating only the first may therefore overestimate agents' ability to satisfy complete repair requirements.

To bridge this gap, we introduce SWE-Gate, the first repository-level benchmark to evaluate review constraint compliance alongside functional correctness using separate executable tests. Rather than manually inventing rules or attaching them to unrelated tasks, SWE-Gate derives natural-language constraints from maintainer reviews and synthesizes realistic repairs around their engineering intent. Each instance includes a non-compliant patch that passes functional tests but violates the constraint and a gold patch that passes both, demonstrating that the dimensions are separable, executable, and jointly satisfiable.

Using SWE-Gate, we evaluate representative LLMs on 303 repository-level repair instances spanning 75 repositories across six software domains. Our experiments reveal that many repairs that successfully pass functional tests nevertheless violate review constraints, demonstrating that functional success alone does not establish that an agent-generated repair satisfies the full set of repository requirements or is acceptable for integration.

Our contributions are summarized as follows:

  • We introduce SWE-Gate, the first repository-level software engineering benchmark that incorporates executable review constraints into realistic software repair tasks.

  • We propose a dual-dimension evaluation protocol that separately measures functional correctness and review constraint compliance with executable tests.

  • We develop a semi-automated construction framework and use it to create 303 quality-assured instances across 75 repositories and six domains, then characterize constraint following across four LLM backends evaluated under a common Mini-SWE-Agent scaffold.

References (62)

  • Sotana: The open-source software development assistant, 2023
  • Agents in software engineering: Survey, landscape, and vision, 2024
  • RepoCoder: Repository-level code completion through iterative retrieval and generation
  • Llm hallucinations in practical code generation: Phenomena, mechanism, and mitigation
  • Top general performance = top domain performance? domain-codebench: A multi-domain code generation benchmark, 2025
  • SWE-bench: Can language models resolve real-world github issues? In The Twelfth International Conference on Learning Representations, 2024
  • Swe-agent: Agent-computer interfaces enable automated software engineering
  • Openhands: An open platform for AI software developers as generalist agents
  • Agentless: Demystifying llm-based software engineering agents, 2024
  • An analysis of patch plausibility and correctness for generate-and-validate patch generation systems
  • UT-Boost: Rigorous evaluation of coding agents on SWE-bench
  • Expectations, outcomes, and challenges of modern code review
  • Modern code review: a case study at google
  • Rigby and Christian Bird
  • Evaluating large language models trained on code, 2021
  • Program synthesis with large language models, 2021
  • Repobench: Benchmarking repository-level code auto-completion systems, 2023
  • Crosscodeeval: A diverse and multilingual benchmark for cross-file code completion
  • Repomincoder: Improving repository-level code generation based on information loss screening
  • xcodeeval: A large scale multilingual multitask benchmark for code understanding, generation, translation and retrieval, 2023
  • Defects4j: a database of existing faults to enable controlled testing studies for java programs
  • Bugsinpy: a database of existing bugs in python programs to enable controlled testing and debugging studies
  • Unixcoder: Unified cross-modal pre-training for code representation
  • Towards better code understanding in decoder-only models with contrastive learning
  • Snippet comment generation based on code context expansion
  • Sparsecoder: Identifier-aware sparse transformer for file-level code summarization
  • Cocosum: Contextual code summarization with multi-relational graph neural network (opens arXiv in a new tab)
  • ACM Computing Surveys, 58(11):1–43, 2026
  • Rlcoder: Reinforcement learning for repository-level code completion
  • Aligncoder: Aligning retrieval with target intent for repository-level code completion, 2026
  • Reporeasoner: Evaluating repository-level code reasoning ability of long-context language models
  • What to retrieve for effective retrieval-augmented code generation? an empirical study and beyond (opens arXiv in a new tab)
  • Swe-prime: Fewer trajectories, better performance, 2026
  • Magis: Llm-based multi-agent framework for github issue resolution
  • Phoenixrepair: Rethinking repair strategy exploration in software agents (opens arXiv in a new tab)
  • Multi-swe-bench: A multilingual benchmark for issue resolving
  • Swe-bench-java: A github issue resolving benchmark for java, 2024
  • Swe-bench pro: Can ai agents solve long-horizon software engineering tasks?, 2025
  • Swe-bench-cl: Continual learning for coding agents, 2025
  • Swe-bench goes live! In D. Belgrave, C. Zhang, H. Lin, R. Pascanu, P. Koniusz, M. Ghassemi, and N. Chen, editors, Advances in Neural Information Processing Systems, volume 38
  • Swe-rebench: An automated pipeline for task collection and decontaminated evaluation of software engineering agents
  • Swe-bench multimodal: Do ai systems generalize to visual software domains?, 2024
  • Omnigirl: A multilingual and multimodal benchmark for github issue resolution
  • Humanevo: An evolution-aware benchmark for more realistic evaluation of repository-level code generation
  • A real-world multilingual benchmark for repository-level code translation (opens arXiv in a new tab)
  • Arkrepobench: A repository-level code completion benchmark for harmonyos development
  • Realsec-bench: A benchmark for evaluating secure code generation in real-world repositories
  • Towards more realistic evaluation of lm-based code generation: an experimental study and beyond (opens arXiv in a new tab)
  • Swe-smith: Scaling data for software engineering agents
  • Swe-mirror: Scaling issue-resolving datasets by mirroring issues across repositories, 2025
  • Swe data construction, automatically! Proceedings of the ACM on Software Engineering, 3:525 – 546, 2025
  • Large language models are qualified benchmark builders: Rebuilding pre-training datasets for advancing code intelligence tasks
  • Is the cure worse than the disease? overfitting in automated program repair
  • Better test cases for better automated program repair
  • Modern code reviews in open-source projects: which problems do they fix? In Proceedings of the 11th Working Conference on Mining Software Repositories, MSR 2014, page 202–211, New York, NY, USA, 2014
  • Knowledge matters: Injecting project and testing knowledge into llm-based unit test generation (opens arXiv in a new tab)
  • A survey of large language models for code: Evolution, benchmarking, and future trends, 2024
  • Towards an understanding of large language models in software engineering tasks, 2024
  • A hierarchical and evolvable benchmark for fine-grained code instruction following with multi-turn feedback, 2025
  • Does pass rate tell the whole story? evaluating design constraint compliance in llm-based issue resolution
  • Judging llm-as-a-judge with mt-bench and chatbot arena
  • Large language models are not fair evaluators