public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: intel-xe@lists.freedesktop.org,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn	 <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] checkpatch: teach checkpatch about the Assisted-by: tag for AI-assisted patches
Date: Wed, 04 Mar 2026 19:01:52 +0100	[thread overview]
Message-ID: <01d555cd41dcfc2ec48082a5bc80f014e8c39ed1.camel@linux.intel.com> (raw)
In-Reply-To: <aadGPRx0Pbl2Uh53@nvishwa1-desk>

On Tue, 2026-03-03 at 12:36 -0800, Niranjana Vishwanathapura wrote:
> 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.


Basically this is following
https://kernel.org/doc/html//next/process/coding-assistants.html

and this patch only ensures *something* is present for
AGENT_NAME:MODEL_VERSION

Not sure whether checkpatch should allow an empty agent, like
:claude-sonnet-4.6 in this case or whether one should add
<internal>:claude-sonnet-4.6. I think the latter is the most
transparent of the two...

/Thomas


> 
> 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
> > 

  reply	other threads:[~2026-03-04 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 14:36 [RFC PATCH] checkpatch: teach checkpatch about the Assisted-by: tag for AI-assisted patches Thomas Hellström
2026-03-03 20:36 ` Niranjana Vishwanathapura
2026-03-04 18:01   ` Thomas Hellström [this message]
2026-03-04 18:24     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01d555cd41dcfc2ec48082a5bc80f014e8c39ed1.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=niranjana.vishwanathapura@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox