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

原子提交基准测试:编码代理能否从压缩补丁中重建提交历史?

AtomicCommitBench: Can Coding Agents Reconstruct Commit Histories from Squashed Patches?

Beihang University(北京航空航天大学)

Zhihao Lin, Mingyi Zhou, Li Li

AI总结:

研究编码代理从压缩补丁重建提交历史的问题,将任务形式化为有重放要求的块到提交分区,构建基准测试并评估,发现自然重建比重放检查等难,部分方法表现较好,还找出常见失败模式及改进方法。

摘要:

编码代理常以一个压缩补丁结束会话,虽最终代码正确,但破坏了审查等所需的历史结构。我们研究回顾性提交历史重建,将任务形式化并构建AtomicCommitBench。评估结果显示自然重建比其他任务难,部分方法表现较好,还识别出失败模式及改进方法,该基准测试可评估编码代理生成的提交历史。

英文摘要:

Coding agents often finish a session by returning one squashed patch that mixes feature implementation, bug fixes, refactorings, tests, and configuration edits. While the final code may be correct, collapsing unrelated edits into one patch removes the history structure needed for review, selective revert, and later maintenance. We study retrospective commit-history reconstruction: given a completed squashed change, an agent groups its hunks into commits and materializes a replayable commit sequence. We formalize the task as hunk-to-commit partitioning with a replay requirement and build AtomicCommitBench, containing 800 real consecutive-commit episodes from 10 Python projects. Because multiple decompositions may be reasonable, we evaluate outputs using complementary metrics: PPAR for replay validity, ARI for reference-based grouping quality, and TCR for failure containment on scoreable modified-test episodes. Natural retrospective reconstruction proves substantially harder than replay checking or synthetic tangling. Although nearly all non-random methods achieve replay validity (PPAR >= 0.988), grouping quality ranges from 0.03 to 0.46 ARI. Matched synthetic composites are much easier than real same-author squashed diffs (+0.333 ARI). In our evaluation, the GPT-5.4 setup driven by Codex CLI (0.46 ARI) and the GLM-5 setup driven by Claude Code (0.43 ARI) outperform MiniMax (0.31) and Kimi (0.29). Qualitative analysis identifies same-file lumping and support-hunk drift as recurring failure modes. Dependency-Aware Commit Evidence (DACE) improves the lower-scoring setups by 0.05 to 0.08 ARI, indicating that dependency cues and hunk-role information help agents avoid locality-driven grouping errors. AtomicCommitBench enables evaluation of the commit histories produced by coding agents alongside the final code.

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

↑