arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.04580cs.SE
收藏

超越固定测试:仓库级问题解决作为代码和行为约束的共进化

Beyond Fixed Tests: Repository-Level Issue Resolution as Coevolution of Code and Behavioral Constraints

Beihang University(北京航空航天大学);Beijing Tokfinity Technology Co., Ltd.(北京拓维信息技术有限公司)

Kefan Li, Yuan Yuan, Mengfei Wang, Shihao Zheng, Wei Wang, Ping Yang, Mu Li, Weifeng Lv

AI总结:

本文提出Agent-CoEvo框架,通过共进化代码与行为约束提升修复效果,优于现有基线方法。

摘要:

软件工程师在解决仓库级问题时,并不将现有测试视为不可更改的正确性 oracle。相反,他们迭代地完善代码和用于表征预期行为的测试,因为新修改会暴露缺失的假设或误解的失败条件。相比之下,大多数现有基于大语言模型(LLM)的修复系统采用线性流程,其中测试或其他验证信号主要作为事后过滤器,将行为约束视为修复期间固定的。这种 formulation 将修复简化为在静态且可能不匹配的约束下优化代码,导致搜索空间不足和脆弱或过拟合的修复。我们主张仓库级问题解决本质上不是在固定测试下优化,而是搜索演化的行为约束。为了将此观点具体化,我们提出Agent-CoEvo,一个共进化多智能体框架,在其中候选代码补丁和测试补丁被共同探索并迭代完善。不同于将测试视为不可更改的 oracle,我们的框架将它们建模为动态约束,既引导又由修复过程修订。通过相互评估和语义重组,代码和测试候选逐步缩小与问题描述一致的行为空间。在SWE-bench Lite和SWT-bench Lite上评估,Agent-CoEvo在修复成功率和测试重现质量上均优于现有最先进的基于智能体和非智能体基线。我们的发现表明,使修复代理在搜索过程中修订行为约束是可靠问题解决的关键,指向从代码-only 优化到实现和规范共进化的转变。

英文摘要:

Software engineers resolving repository-level issues do not treat existing tests as immutable correctness oracles. Instead, they iteratively refine both code and the tests used to characterize intended behavior, as new modifications expose missing assumptions or misinterpreted failure conditions. In contrast, most existing large language model (LLM)-based repair systems adopt a linear pipeline in which tests or other validation signals act mostly as post-hoc filters, treating behavioral constraints as fixed during repair. This formulation reduces repair to optimizing code under static and potentially misaligned constraints, leading to under-constrained search and brittle or overfitted fixes. We argue that repository-level issue resolution is fundamentally not optimization under fixed tests, but search over evolving behavioral constraints. To operationalize this view, we propose Agent-CoEvo, a coevolutionary multi-agent framework in which candidate code patches and test patches are jointly explored and iteratively refined. Rather than treating tests as immutable oracles, our framework models them as dynamic constraints that both guide and are revised by the repair process. Through mutual evaluation and semantic recombination, code and test candidates progressively narrow the space of behavior consistent with the issue description. Evaluated on SWE-bench Lite and SWT-bench Lite, Agent-CoEvo consistently outperforms state-of-the-art agent-based and agentless baselines in both repair success and test reproduction quality. Our findings suggest that enabling repair agents to revise behavioral constraints during search is critical for reliable issue resolution, pointing toward a shift from code-only optimization to coevolution of implementation and specification.

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

↑