bug#81520: Add pre-receive hook to Savannah to reject LLM-encumbered commits

Jim Porter <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
On 8/8/2026 10:26 PM, Eli Zaretskii wrote:
>> Date: Sat, 8 Aug 2026 18:45:35 -0700
>> Cc: [email protected]
>> From: Jim Porter <[email protected]>
>>
>> Sean/Eli: Before I go too far changing things, I wanted to check your
>> thoughts on how to structure this. We already have both a commit-msg
>> hook (which does some style checks on the commit message) and a pre-push
>> hook (which checks that the files listed in the commit message are
>> correct[1]).
>>
>> While I could do the LLM-attribution checks in the middle of these
>> existing checks, I think it would be clearer to do it in a separate
>> pass. That way, we're not mixing messages about long commit message
>> lines or misspelled file names with messages that we detected possible
>> LLM usage.
>>
>> Does that sound ok? (If not, it would be harder to share the code for
>> the LLM checks in both the commit-msg and pre-push hooks.)
> 
> I'm afraid I don't have a clear idea about the differences between the
> alternatives.  Can you elaborate?

It's a little hard to explain clearly without the code (or an equivalent 
amount of prose), but I'll try. Basically, I could add two separate 
implementations of the LLM check, one for the commit-msg hook and one 
for the pre-push hook. That would make the change to the commit-msg hook 
smaller, though we'd have to maintain the LLM check in two places, and 
the error messages about LLM use would be mixed in with all the other 
commit-msg errors. In my opinion, the LLM checks are different enough 
that they should be separate.

(We could also *just* add the LLM checks in the commit-msg hook and not 
the pre-push hook, which would make things a bit simpler. However, since 
this case seems a little more important than a too-long line in the 
commit message, I think having the check in both places is a nice bit of 
added protection.)

In any case, since Sean is ok with this, I'll start on an implementation 
of my idea. That should make it easier to understand instead of talking 
about it in the abstract.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.