[PATCH b4 0/2] Detect naked cover letters that lack a 0/N prefix and diffstat
Christian Brauner <[email protected]> Wed, 01 Jul 2026 15:51:20 +0200
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <[email protected]> |
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]> --- Christian Brauner (2): Detect naked cover letters that lack a 0/N prefix and diffstat tests: exercise naked cover-letter detection src/b4/__init__.py | 13 +++++--- src/tests/samples/naked-cover-bugreport.mbox | 47 ++++++++++++++++++++++++++++ src/tests/samples/naked-cover-single.mbox | 44 ++++++++++++++++++++++++++ src/tests/test___init__.py | 32 +++++++++++++++++++ 4 files changed, 132 insertions(+), 4 deletions(-) --- base-commit: 4217c3e5d3e1eb259626142fd71b91ec6d5e3d1e change-id: 20260701-work-b4-naked-cover-letter-ee98a040e5c8