Re: [PATCH b4 0/2] Detect naked cover letters that lack a 0/N prefix and diffstat

Christian Brauner <[email protected]> Mon, 27 Jul 2026 16:37:45 +0200
Newsgroups org.kernel.linux.tools
Message-ID <20260727-umfahren-klinke-mutation-b23efcc7258c@brauner>
On 2026-07-01 15:51 +0200, Christian Brauner wrote:
> LoreMailbox only recognizes a cover letter when the message carries an
> explicit zero counter ([PATCH 0/N]) or, via the in-reply-to fallback in
> get_series(), when the thread root carries a diffstat.  A "naked" cover --
> one with neither a [PATCH 0/N] subject prefix nor a diffstat in the body --
> matches neither test, so it lands in self.unknowns and is dropped, and
> LoreSeries.has_cover stays False.
> 
> The visible fallout is in shazam -M, which then reports "No cover letter
> provided by the author" and links the first patch instead of the real
> cover.  This happens whenever an author writes a short prose cover with no
> diffstat, e.g. Christoph Hellwig's "don't build bios/contexts over multiple
> iomaps" series:
> 
>   https://lore.kernel.org/linux-xfs/[email protected]
> 
> Patch 1 extends the in-reply-to fallback to also accept the parent as the
> cover when it is a non-patch, same-author thread root (in_reply_to is None
> and not itself a reply).  Requiring the same author and the thread root
> avoids mistaking an unrelated message the series was merely sent
> in-reply-to -- a third party's bug report, say -- for a cover letter.
> 
> Patch 2 adds positive (naked single-patch cover) and negative (patch sent
> in-reply-to a stranger's bug report) fixtures and a test.
> 
> Signed-off-by: Christian Brauner (Amutable) <[email protected]>
> ---

A solution to this problem would also be nice as Christoph keeps sending
me patch series with naked cover letters and I have to fight with b4 to
apply them correctly. :)