<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Open Source on KbWen Blog</title>
    <link>https://www.kbwen.com/tags/open-source/</link>
    <description>KbWen is a practical technology blog about AI systems, machine learning, Python, data engineering, and software development.</description>
    <generator>Hugo</generator>
    <language>zh-tw</language>
    <image>
      <url>https://www.kbwen.com/images/og-default.png</url>
      <title>KbWen Blog</title>
      <link>https://www.kbwen.com/</link>
    </image>
    
    <lastBuildDate>Wed, 23 Sep 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://www.kbwen.com/tags/open-source/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>開源專案怎麼看 AI 寫的程式碼：QEMU、Linux 核心與 Debian 的規定</title>
      <link>https://www.kbwen.com/open-source-ai-contribution-policies-qemu-linux-debian/</link>
      <pubDate>Wed, 23 Sep 2026 10:00:00 +0800</pubDate><dc:creator>KbWen</dc:creator>
      <guid>https://www.kbwen.com/open-source-ai-contribution-policies-qemu-linux-debian/</guid>
      <description>QEMU、Linux 核心和 Debian 都有在文件寫怎麼處理 AI 的貢獻。這篇簡單的看三家各自的規定以及理由。</description>
      <content:encoded><![CDATA[<p>用 AI 寫程式的人越來越多，開源專案也面臨很實際的問題：有人送來 AI 幫忙寫的 patch，要不要收？該怎麼處理？QEMU、Linux 核心和 Debian 都把各自的做法寫進文件，而大家的答案和想法剛好各不相同。</p>
<p>先從最嚴格的 QEMU 講起。QEMU 在 2025 年 6 月訂下規定，只要認為貢獻裡含有 AI 生成的內容，就不收，理由跟 DCO 有關。DCO 全名是 Developer Certificate of Origin，很多開源專案都在用，這個做法很簡單，貢獻者在 patch 最後加一行 <code>Signed-off-by</code>，後面寫上自己的名字，表示這段程式碼的來源沒問題，可以照專案的授權釋出。QEMU 的規定寫到，要簽下這行名字，簽名的人得完全清楚自己交出去的東西在著作權和授權上是什麼狀況，而 AI 產出的東西在這方面目前還沒有定論。所以在這步驟就是很大的問題，簽的人要替來源擔保，但 AI 的產出偏偏說不清來源，因此這關看起來是無法通過的。</p>
<p>Linux 核心走的是另一條路。2026 年初，核心加進兩份跟 AI 工具有關的文件，允許開發者用 AI 幫忙，不過 <code>Signed-off-by</code> 只能由人來加（&ldquo;Only humans can legally certify the Developer Certificate of Origin (DCO).&quot;）。這裡的 DCO 就是剛剛 QEMU 說的簽名，而 DCO 本來就是從 Linux 核心開始用的。另一份文件也寫了訂下指引的重要原因之一：工具會讓送進來的貢獻變多，而審查和維護的人力有限。</p>
<p>Debian 的做法又不太一樣。2026 年 8 月，Debian 開發者投票通過一份決議，寫明 Debian 既不背書、也不禁止生成式 AI 工具，要不要用、該怎麼用，全由貢獻者自己決定。乍看像是沒有選邊，好像模模糊糊，不過同一份資料也提到，沒有經過適當的人工審查，就直接接受或上傳 AI 產出的東西，不符合 Debian 一直以來的開發方式。</p>
<p>剛剛提到三家的做法和理念各不相同，但仔細看看可以發現，其實重要的、在乎的都是同樣的事情：不管收不收 AI 寫的 code，最後負責的都必須是人。QEMU 認為 AI 的產出現在還沒辦法讓人放心簽名，Linux 則把這個判斷交給簽名的人。但現今的 AI 發展很快，也越來越多產品都是用 AI 開發、維護，因此未來會有甚麼變化也不得而知，畢竟最後還是要做出好的、安全的工具和產品。</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>The Assisted-by trailer in GCC, the Linux kernel and QEMU</title>
      <link>https://www.kbwen.com/assisted-by-trailer-gcc-kernel-qemu/</link>
      <pubDate>Wed, 23 Sep 2026 09:40:00 +0800</pubDate><dc:creator>KbWen</dc:creator>
      <guid>https://www.kbwen.com/assisted-by-trailer-gcc-kernel-qemu/</guid>
      <description>How three projects currently handle the Assisted-by: commit trailer on AI-assisted patches: GCC&amp;#39;s policy, the Linux kernel&amp;#39;s documented format, and the checkpatch rule QEMU merged in September 2026, with the source text each one comes from.</description>
      <content:encoded><![CDATA[<p><code>Assisted-by:</code> is a commit trailer: one line at the bottom of a git commit message, next to <code>Signed-off-by:</code> and <code>Reviewed-by:</code>. Some of the projects that wrote down an AI policy over the past two years use it to record that a language model helped produce the patch. GCC, the Linux kernel and QEMU each changed something about it this year.</p>
<h2 id="the-tag-gcc-requires">The tag GCC requires</h2>
<p>The GCC Steering Committee accepted its AI policy on 29 July 2026, and it went up on the GCC website the same day. GCC declines legally significant &ldquo;contributions which include LLM-generated content or are derived from LLM-generated content&rdquo;, test cases excepted. Any contribution of LLM-generated content must carry an <code>Assisted-by:</code> tag in its commit message. GCC also says that &ldquo;All contributions must be submitted by a human who understands the changes and is prepared to answer questions about them.&rdquo; Only a human may give the <code>Signed-off-by:</code> that certifies the Developer Certificate of Origin, and an LLM may not commit code to the project repository.</p>
<h2 id="the-kernels-two-files">The kernel&rsquo;s two files</h2>
<p>The kernel&rsquo;s guidance is in <code>Documentation/process/coding-assistants.rst</code>, which reached the tree in January 2026. It gives the format as <code>Assisted-by: LLM [TOOL1] [TOOL2]</code>, where the bracketed slots hold optional analysis tools (coccinelle, sparse, smatch, clang-tidy), and the worked example reads <code>Assisted-by: LLM coccinelle sparse</code>.</p>
<p>Until August that example read <code>Assisted-by: Claude:claude-3-opus coccinelle sparse</code>, because the format asked for an agent name and a model version. Christian Brauner&rsquo;s patch, merged on 3 August 2026, deleted both fields. The reason, from the commit message: the requirement &ldquo;provides free advertising to proprietary software companies while adding little or no useful information&rdquo;.</p>
<p>The obligation to use the tag is in a different file. <code>submitting-patches.rst</code> has said since April that &ldquo;If you used any sort of advanced coding tool in the creation of your patch, you need to acknowledge that use by adding an Assisted-by tag. Failure to do so may impede the acceptance of your work.&rdquo; That wording covers any advanced coding tool, not language models specifically. On the other trailer, <code>coding-assistants.rst</code> says: &ldquo;AI agents MUST NOT add Signed-off-by tags. Only humans can legally certify the Developer Certificate of Origin (DCO).&rdquo;</p>
<h2 id="qemus-checkpatch-rule">QEMU&rsquo;s checkpatch rule</h2>
<p>QEMU&rsquo;s published policy has not moved. <code>docs/devel/code-provenance.rst</code> on master still carries the line it has had since June 2025, that the project will &ldquo;DECLINE any contributions which are believed to include or derive from AI generated content.&rdquo;</p>
<p>What moved is where a contributor runs into it. Paolo Bonzini&rsquo;s patch of 3 September, merged on the 7th, added twelve lines to <code>scripts/checkpatch.pl</code>, the style checker QEMU asks contributors to run before submitting:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-perl" data-lang="perl"><span class="line"><span class="cl"><span class="c1"># Reject trailers that credit an AI agent.</span>
</span></span><span class="line"><span class="cl">		<span class="k">if</span> <span class="p">(</span><span class="nv">$realfile</span> <span class="o">=~</span><span class="sr"> /^$/</span> <span class="o">&amp;&amp;</span>
</span></span><span class="line"><span class="cl">		    <span class="p">(</span><span class="nv">$line</span> <span class="o">=~</span><span class="sr"> /🤖/</span> <span class="o">||</span>
</span></span><span class="line"><span class="cl">		     <span class="nv">$line</span> <span class="o">=~</span><span class="sr"> /^\s*(?:Assisted|Generated)-by:/i</span> <span class="o">||</span>
</span></span><span class="line"><span class="cl">		     <span class="p">(</span><span class="nv">$line</span> <span class="o">=~</span><span class="sr"> /^\s*Co-authored-by:\s*(.*?)\s*$/i</span> <span class="o">&amp;&amp;</span>
</span></span><span class="line"><span class="cl">		      <span class="nv">$1</span> <span class="o">=~</span><span class="sr"> /\bcopilot\b | \bchatgpt\b | \bcodex\b | \bcursor\b |
</span></span></span><span class="line"><span class="cl"><span class="sr">			     \bgemini\b | \bllama\b | \bnoreply\b | \[bot\] |
</span></span></span><span class="line"><span class="cl"><span class="sr">			     \bclaude\b.*(?:opus|sonnet|fable|haiku|anthropic\.com)/xi</span><span class="p">)))</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">			<span class="n">ERROR</span><span class="p">(</span><span class="s">&#34;QEMU does not allow using AI for contributions, &#34;</span> <span class="o">.</span>
</span></span><span class="line"><span class="cl">				<span class="s">&#34;see docs/devel/code-provenance.rst\n&#34;</span> <span class="o">.</span> <span class="nv">$herecurr</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">		<span class="p">}</span>
</span></span></code></pre></div><p>The patterns cover a robot emoji, the <code>Assisted-by:</code> and <code>Generated-by:</code> trailers, and a <code>Co-authored-by:</code> naming a known AI tool, a <code>[bot]</code> handle or a <code>noreply</code> address.</p>
<p>The commit message says the community has &ldquo;broad consensus to not accept assisted-by and similar trailers, and much less fake co-authored-bys, independent of any AI policy&rdquo;, and that the script is there &ldquo;so that there is another way for contributors to discover the AI policy.&rdquo;</p>
<p>A second patch written the same day, merged on the 8th, added an <code>AGENTS.md</code> to the tree, and that one is addressed to the tool. An agent may help with researching APIs, static analysis, debugging, local experiments &ldquo;not intended to be upstreamed&rdquo; and trivial non-copyrightable changes, but &ldquo;agent output can not be included in any upstream contributions&rdquo;, and for anything outside those categories it &ldquo;MUST decline the request and refer the user to the project&rsquo;s policy&rdquo;. Alex Bennée&rsquo;s commit message: &ldquo;people often don&rsquo;t read the docs. However AI Agents do tend to try and follow instructions so lets help them out.&rdquo;</p>
<p>On 21 September Bonzini posted an RFC series titled &ldquo;docs/devel, AGENTS.md: a completely new policy on AI-generated contributions&rdquo;, which opens &ldquo;WARNING: this is <em>intentionally</em> a full U-turn from the previous policy&rdquo;. It is at version three and it is not merged; master still declines.</p>
<p>Whatever each project decides about the trailer, all it does is record that a model was involved. The responsibility does not move with it. GCC asks that the submitter be ready to answer questions about the change, and the kernel&rsquo;s list for the human submitter includes &ldquo;Taking full responsibility for the contribution&rdquo;. QEMU, which will not take the trailer at all, says the same in the paragraph covering exceptions to its policy, where the <code>Signed-off-by:</code> label &ldquo;is a statement that the author takes responsibility for the entire contents of the patch, including any parts that were generated or assisted by AI tools or other tools&rdquo;.</p>
<p>So before sending an AI-assisted patch somewhere, open that project&rsquo;s own contribution file and read the paragraph on trailers. They run from a few hundred words to a couple of thousand, and they do not agree with one another.</p>
<p>This was put together from the policy files, commits and mailing-list messages themselves, read on 23 September 2026. QEMU&rsquo;s is the one under active revision, so that part may not hold for long.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
