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

Sean Whitton <[email protected]> Fri, 31 Jul 2026 12:29:14 +0100
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Eli Zaretskii [31/Jul  1:51pm +03] wrote:
> One alternative would be to search the entire log message and
> author/committer addresses for regular expressions matching
> "Anthropic", "ChatGPT", "OpenAI" etc.  Regexps make it easier to adapt
> to changes and unanticipated issues, and can be general enough to be
> relatively insensitive to minor changes in email addresses.

Okay, cool, that sounds good to me.

> Btw, we must spell out these restrictions in CONTRIBUTE.

Probably a good idea, yes.

> Sorry, I don't understand the scenario.  If the attribute is removed,
> how could the hook that searches attributions work in the first place?

The assumption is that the LLM is committing and the user is manually
pushing, which is, I think, a common arrangement.

The LLM will only decide to remove the attribution if it runs into a
hook failure.  But it won't ever run into that if it's a pre-push hook.
Instead the user will, and they'll learn of the problem at that point.

> In any case, my point is that delaying the rejection until push time
> is much worse than rejecting commits, for the reasons I tried to
> explain.  If we must have a pre-push hook (which I'm not yet convinced
> we do), then at least let's have both pre-commit and pre-push hooks.

I definitely see where you are coming from and understand why you want
pushes to always succeed.

I have the opposite view, that I would prefer all our checks are on
pre-push hooks, and that commits should always succeed.  At some point I
would like to make it so that a user can choose which one they go on,
but that's off-topic right now.

-- 
Sean Whitton