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

Sean Whitton <[email protected]> Fri, 31 Jul 2026 11:04:51 +0100
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Eli Zaretskii [31/Jul 10:46am +03] wrote:
>> Date: Thu, 30 Jul 2026 17:06:57 -0700
>> Cc: [email protected]
>> From: Jim Porter <[email protected]>
>>
>> On 7/30/2026 10:36 AM, Sean Whitton wrote:
>> > We explicitly permit it in CONTRIBUTE.
>> >
>> > So yeah, let's match on e-mail addresses.
>>
>> Ok, here's a patch series to do this locally.
>
> You rush to post a patch too quickly, sorry.  When Sean and myself
> disagree, it is better to leave time to both of us to respond.
>
> In this case, I'm against this method, so let's please find better
> alternatives.
>
>> After thinking over my options here, a pre-push hook seemed better than
>> commit-msg for two reasons:
>
> Pre-push hooks are an annoyance, because usually a push is supposed to
> be a step that almost always succeeds.  Going back to commits and
> redoing them is a terrible nuisance.  Moreover, in many cases I push
> more than one commit, in which case rejection of one that is not the
> last one is an even larger nuisance.
>
>> 2. LLM agents tend to try all possibilities - even bad ones[1] - to
>> resolve failed commands. If we checked this in the commit-msg hook, an
>> LLM that vibecoded a patch might well see the error from the hook and
>> "fix" the problem by simply deleting the attribution, even without the
>> user being aware.
>
> You seem to think about an LLM agent pushing commits?  How is that
> possible if the agent doesn't have write access?

I understand your point about not wanting to encode an ever-growing list
of e-mail addresses, Eli, so let's think about alternatives.

I think that Jim has a good point about commit-msg vs. pre-push:
I would be concerned about the LLM just removing the attribution in
order to avoid the effects of the hook.  Recent models are particularly
notable for their persistence.  It's somewhat reminiscent of the
make-more-paperclips-by-any-means thought experiments.

If we can make the pre-push hook not have annoying false positives, then
we will still be in your preferred pushes-almost-always-succeed case, so
maybe that would be okay.

But this is all moot because right now, unfortunately, we don't have a
proposal for detecting these commits.

-- 
Sean Whitton