人工智能辅助重授权
Relicensing with AI-Assisted Rewrite

原始链接: https://tuananh.net/2026/03/05/relicensing-with-ai-assisted-rewrite/

## chardet 重新授权与开源许可的未来 Python 库 `chardet` 近期从 LGPL 重新授权为 MIT,引发了一场关于 AI 辅助代码重写及其对开源许可影响的法律辩论。维护者使用 Claude Code 重写了代码库,但原始作者认为这违反了 LGPL,因为 AI 是在原始授权代码上训练的——而不是“干净房间”实现。 情况进一步复杂化的是,美国最高法院最近重申了版权的“人类作者身份”要求,可能使维护者无法对 AI 生成的代码进行任何授权。这造成了一种悖论:代码可能是 LGPL 要求下的衍生作品,或者由于缺乏人类作者身份而落入公有领域。 此案例凸显了一个关键问题:如果 AI 重写被认为是有效的重新授权,它可能有效地破坏像 GPL 这样的 copyleft 许可协议。`chardet` 案例是一个具有里程碑意义的测试案例,在 AI 生成代码时代划定了新的法律和伦理界限。

一场关于Hacker News的讨论集中在使用人工智能重写代码以及可能更改其许可的法律影响。最初的帖子强调了一个“重新授权”的项目,这引发了关于这种做法是否合法有效的争论。 主要讨论点包括:仅仅声明新的许可并不能改变原始LGPL许可,除非*所有*版权所有者同意。对话还涉及最近的美国最高法院关于人工智能生成作品的裁决,以及它与人工智能*转换*现有代码的区别。 用户讨论了“干净房间”重写过程(在NEC v. Intel和Compaq IBM PC BIOS逆向工程等案例中建立),作为获得新许可的潜在法律途径,但质疑其在涉及人工智能时的适用性。一个核心问题是,通过人工智能辅助重写将一个GPL许可的项目翻译成另一种语言(例如,从Python到Rust),是否可以合法地获得更宽松的许可,例如MIT,从而有效地规避GPL要求。然而,许多人认为即使进行语言转换,GPL仍然适用。
相关文章

原文
Posted on March 5, 2026  •  3 minutes  • 529 words

Disclaimer

I am not a lawyer, nor am I an expert in copyright law or software licensing. The following post is a breakdown of recent community events and legal news; it should not be taken as legal advice regarding your own projects or dependencies.


In the world of open source, relicensing is notoriously difficult. It usually requires the unanimous consent of every person who has ever contributed a line of code, a feat nearly impossible for legacy projects. chardet , a Python character encoding detector used by requests and many others, has sat in that tension for years: as a port of Mozilla’s C++ code it was bound to the LGPL, making it a gray area for corporate users and a headache for its most famous consumer.

Recently the maintainers used Claude Code to rewrite the whole codebase and release v7.0.0 , relicensing from LGPL to MIT in the process. The original author, a2mark , saw this as a potential GPL violation:

Licensed code, when modified, must be released under the same LGPL license. Their claim that it is a “complete rewrite” is irrelevant, since they had ample exposure to the originally licensed code (i.e. this is not a “clean room” implementation). Adding a fancy code generator into the mix does not somehow grant them any additional rights.

A clean room rewrite requires a wall that AI bypasses

In traditional software law, a “clean room” rewrite requires two teams:

  • Team A looks at the original code and writes a functional specification
  • Team B (which has never seen the original code) writes new code based solely on that specification. By using an AI that was prompted with the original LGPL code, the maintainers bypassed this wall. If the AI “learned” from the LGPL code to produce the new version, the resulting output is arguably a derivative work, which under the LGPL, must remain LGPL.

Coincidentally, as this drama unfolded, the U.S. Supreme Court (on March 2, 2026) declined to hear an appeal regarding copyrights for AI-generated material. By letting lower court rulings stand, the Court effectively solidified a “Human Authorship” requirement. That creates a massive legal paradox for the chardet maintainers:

  • The copyright vacuum: If AI-generated code cannot be copyrighted (as the courts suggest), then the maintainers may not even have the legal standing to license v7.0.0 under MIT or any license.
  • The derivative trap: If the AI output is considered a derivative of the original LGPL code, the “rewrite” is a license violation.
  • The ownership void: If the code is truly a “new” work created by a machine, it might technically be in the public domain the moment it’s generated, rendering the MIT license moot.

Accepting AI-rewriting as relicensing could spell the end of Copyleft

If “AI-rewriting” is accepted as a valid way to change licenses, it represents the end of Copyleft. Any developer could take a GPL-licensed project, feed it into an LLM with the prompt “Rewrite this in a different style,” and release it under MIT. The legal and ethical lines are still being drawn, and the chardet v7.0.0 case is one of the first real-world tests.

联系我们 contact @ memedata.com