arXiv:2607.26819cs.SEcs.AI2026-07

测试主流代码生成模型在开源社区中的合规行为,发现几乎不主动遵守规则。

A First Look at Coding Agents' Compliance with AI Contribution Rules in Open-Source Communities

论文配图:A First Look at Coding Agents' Compliance with AI Contribution Rules in Open-Source Communities
图 1 · 摘自论文原文
  • 构建基准测试集RepoComplianceBench,评估模型对贡献规则的响应。
  • 仅少数模型在提示下会披露或通过验证,无一拒绝在禁用AI的仓库中提交。
  • 提示和反馈可提升合规性,但强制禁用与人工审批仍难实现。

开源社区已充斥着AI生成的贡献。为应对这一现象,社区制定了涵盖全面禁止、强制披露、验证关卡和人工签字等规则。然而,代码生成模型是否阅读并遵守这些规则尚不清楚。为此,我们从49个含AI贡献规则的仓库中收集106个问题,构建RepoComplianceBench基准。通过分析每个任务执行轨迹,判断模型是否拒绝提交、如实披露、通过验证关卡,或在关键步骤升级至人类。同时测试额外提示、规则引用及合规验证者反馈的效果。在四个前沿模型上的实验表明,当前模型几乎从不主动检索贡献规则;在提示、规则引用和验证反馈下,部分模型能实现披露与验证,但在禁止使用AI的仓库中,无论何种条件均未出现拒绝提交的情况。结果表明,披露与验证问题可通过现有机制解决,但执行禁令与人工升级仍是开放难题。

原文摘要 · Abstract (English)

Open source communities have been flooded with AI-generated contributions. In defense, they have written contribution rules to regulate coding agents' behavior, spanning from a total ban, mandatory disclosure, to verification gates and human sign-offs. Yet, whether coding agents read and follow those rules, and behave in open source repositories, remains unknown. To estimate real-world rule compliance of coding agents, we curate 106 issues from 49 repositories containing AI contribution rules into RepoComplianceBench. We judge the trajectory of each run against the repository's rules, measuring whether the agent refuses to contribute, discloses its assistance truthfully, clears the required verification gates, or escalates critical steps to a human. We also test if extra prompts, rule disclosure, or feedback from the compliance verifier help with the situation. Our experiments on four frontier models show that today's agents almost never proactively retrieve the contribution rules. Agents pick up disclosure and verification with reminder prompts, rule quotes, and verifier feedback; however, they never refuse to contribute in AI-banned repositories under any condition we tested. The status reveals that verification and disclosure issues are solvable with existing mechanisms, yet enforcing bans and human escalations remains an open problem.

AI合规开源社区代码生成规则遵循

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。