Re: [RFC PATCH] checkpatch: teach checkpatch about the Assisted-by: tag for AI-assisted patches

Niranjana Vishwanathapura
2026-03-03T20:36:23Z

On Mon, Mar 02, 2026 at 03:36:59PM +0100, Thomas Hellström wrote:
>Documentation/process/coding-assistants.rst mandates the use of an
>uses an "Agent:Model" notation rather than a name-and-email-address
>pair, for example:
>
> Assisted-by: GitHub Copilot:claude-sonnet-4.6

Do we need the Agent to be specified along with the model given the
agents tend to me more custom built (or private) and model tend to be
more generic? Not sure if my assumption is entirely true though.

Niranjana

>
>checkpatch.pl currently emits false-positive errors and warnings for
>this tag:
>
> WARNING: Non-standard signature: Assisted-by:
> ERROR: Unrecognized email address: 'GitHub Copilot:claude-sonnet-4.6'
>
>Teach checkpatch about the tag:
>
>- Add Assisted-by: to the $signature_tags regex so it is no longer
> flagged as a non-standard signature.
>- Add Assisted-by: to the standard_signature_tags list in
> find_standard_signature() so that near-miss typos (e.g.
> 'Assited-by:') suggest the correct spelling.
>- Skip the email-address validation for Assisted-by: tags and instead
> validate that the value contains at least one colon separating the
> agent name from the model identifier. Emit a BAD_SIGN_OFF warning
> if the notation does not conform.
>
>Cc: Andy Whitcroft <apw@canonical.com>
>Cc: Joe Perches <joe@perches.com>
>Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
>Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
>Cc: linux-kernel@vger.kernel.org
>Assisted-by: GitHub Copilot:claude-sonnet-4.6
>Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>---
> scripts/checkpatch.pl | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
>diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>index e56374662ff7..dd3327e8fa55 100755
>--- a/scripts/checkpatch.pl
>+++ b/scripts/checkpatch.pl
>@@ -641,6 +641,7 @@ our $signature_tags = qr{(?xi:
> Reviewed-by:|
> Reported-by:|
> Suggested-by:|
>+ Assisted-by:|
> To:|
> Cc:
> )};
>@@ -737,7 +738,7 @@ sub find_standard_signature {
> my ($sign_off) = @_;
> my @standard_signature_tags = (
> 'Signed-off-by:', 'Co-developed-by:', 'Acked-by:', 'Tested-by:',
>- 'Reviewed-by:', 'Reported-by:', 'Suggested-by:'
>+ 'Reviewed-by:', 'Reported-by:', 'Suggested-by:', 'Assisted-by:'
> );
> foreach my $signature (@standard_signature_tags) {
> return $signature if (get_edit_distance($sign_off, $signature) <= 2);
>@@ -3107,7 +3108,15 @@ sub process {
>
> my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
> my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
>- if ($suggested_email eq "") {
>+ # Assisted-by: uses "Agent:Model" notation without an email
>+ # address, as mandated by Documentation/process/coding-assistants.rst.
>+ # Skip email validation for this tag.
>+ if ($sign_off =~ /^Assisted-by:$/i) {
>+ if ($email !~ /\S+:\S+/) {
>+ WARN("BAD_SIGN_OFF",
>+ "Assisted-by: should use 'Agent:Model' notation (e.g. 'GitHub Copilot:claude-sonnet-4.6')\n" . $herecurr);
>+ }
>+ } elsif ($suggested_email eq "") {
> ERROR("BAD_SIGN_OFF",
> "Unrecognized email address: '$email'\n" . $herecurr);
> } else {
>--
>2.53.0
>