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

AI编码智能体会像人类一样编写基础设施即代码(IaC)吗?一项针对GitHub拉取请求的实证研究

Do AI Coding Agents Write Infrastructure as Code Like Humans? An Empirical Study of GitHub Pull Requests

Oakland University(奥克兰大学);University of North Carolina Wilmington(北卡罗来纳大学威尔明顿分校)

Amine Barrak, Emna Ksontini, Charles Wehbe

AI总结:

该研究通过分析34.9万余个GitHub IaC拉取请求,对比了人类、机器人、静默与已公开智能体的PR差异,发现智能体PR规模更大、合并率有别,且可持续性问题比例与人类相近。

摘要:

基础设施即代码(IaC)配置定义了云资源、网络和访问控制,AI编码智能体越来越多地编写这类配置。目前人们对智能体的贡献与人类、自动化机器人的差异、维护者对它们的评价方式,以及它们是否引发不同的可持续性问题知之甚少。我们研究了来自49241个GitHub仓库的349156个IaC拉取请求(PR),区分了人类、自动化机器人、静默智能体和已公开智能体。在表面上属于人类的PR中,机器人占比32.9%,剩余PR中有12.3%包含智能体痕迹,且该比例在研究期间呈上升趋势。智能体PR的规模约是人类PR的4倍,更常修改核心基础设施模块,而机器人主要维护依赖项。静默智能体PR的总体合并率高于人类PR(87.4% vs. 78.9%),但在同一仓库中的合并率低4.0个百分点。已公开智能体创建新基础设施的频率高于人类(34.0% vs. 21.4%),即使在同一仓库的相同变更类型中,其PR的合并可能性仍低8.4个百分点;静默智能体PR在大多数变更类型中表现出相当的接受度。最后,在2645个匹配的智能体-人类Terraform PR对中,智能体和人类PR引入可持续性问题的比例相近(10.4% vs. 10.3%;配对优势比1.02,95%置信区间0.83-1.25),最常见的问题是缺少远程状态和单体配置。

英文摘要:

Infrastructure-as-Code (IaC) configurations define cloud resources, networking, and access control, and AI coding agents increasingly write them. Little is known about how agent contributions differ from those of humans and automation bots, how maintainers evaluate them, and whether they introduce different sustainability concerns. We study 349,156 IaC pull requests (PRs) from 49,241 GitHub repositories, distinguishing humans, automation bots, silent agents, and disclosed agents. Bots account for 32.9% of ostensibly human PRs, and 12.3% of the remaining PRs contain agent traces, a share that grows over the study period. Agent PRs are about four times larger than human PRs and more often modify core infrastructure modules, whereas bots mainly maintain dependencies. Silent-agent PRs have higher overall merge rates than human PRs (87.4% vs. 78.9%) but are merged 4.0 percentage points less often within the same repositories. Disclosed agents create new infrastructure more often than humans (34.0% vs. 21.4%), and even for the same change type within the same repository, their PRs are 8.4 points less likely to be merged; silent-agent PRs show comparable acceptance for most change types. Finally, in 2,645 matched agent-human Terraform PR pairs, agent and human PRs introduce sustainability smells at similar rates (10.4% vs. 10.3%; paired odds ratio 1.02, 95% CI 0.83-1.25), most commonly missing remote state and monolithic configurations.

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

↑