On Thu, Sep 03, 2026 at 12:04:40PM +0200, Paolo Bonzini wrote:
> The QEMU community has broad consent to not accept assisted-by and similar
> trailers, and much less fake co-authored-bys, independent of any AI policy.
> Implement this in checkpatch.pl already, so that there is another way for
> contributors to discover the AI policy.
>
> Suggested-by: Daniel P. Berrangé <[email protected]>
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
> scripts/checkpatch.pl | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 03f35e75012..90cb40dfe1f 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1811,6 +1811,18 @@ sub process {
> }
> }
>
> +# Reject trailers that credit an AI agent.
> + if ($realfile =~ /^$/ &&
> + ($line =~ /🤖/ ||
Oh wow, is that something people actually do :-)
> + $line =~ /^\s*(?:Assisted|Generated)-by:/i ||
> + ($line =~ /^\s*Co-authored-by:\s*(.*?)\s*$/i &&
> + $1 =~ /\bcopilot\b | \bchatgpt\b | \bcodex\b | \bcursor\b
> | \[bot\] |
> + \bllama\b |
> \bgemini\b.*(?:pro|flash|ultra|google\.com) |
> +
> \bclaude\b.*(?:opus|sonnet|fable|haiku|anthropic\.com)/xi))) {
I presume the qualifiers after gemini/claude are a mitigation against
accidentally matching a real person's name ?
> + ERROR("QEMU does not allow using AI for contributions,
> " .
> + "see docs/devel/code-provenance.rst\n" .
> $herecurr);
> + }
Reviewed-by: Daniel P. Berrangé <[email protected]>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|