From: B4 Bugbot <bugbot+b4@kernel.org>
To: tools@kernel.org, broonie@kernel.org, konstantin@linuxfoundation.org
Subject: Re: Stitching together serieses
Date: Mon, 23 Mar 2026 20:59:09 +0000 (UTC) [thread overview]
Message-ID: <20260323-b4958fdfc4-0e75d99fc85f@git.kernel.org> (raw)
In-Reply-To: <8637ff61-4eca-42ac-96fb-d530498b3f82@sirena.org.uk>
Konstantin Ryabitsev writes in commit 1718708bd211406cc60f6343b559fe02ad2be2a4:
Add --rethread flag for stitching unthreaded patch series
When submitters send patches without proper threading, maintainers
have no way to process them as a series with b4. Add a --rethread
flag to retrieval commands (am, shazam, mbox) and review track that
fetches unrelated messages and reconstitutes them into a properly
threaded series.
With a single message ID, b4 auto-discovers the rest of the series
by querying lore for patches from the same author within a 30-minute
window, matching by [PATCH n/m] counters and revision. With multiple
message IDs, b4 uses them directly. Stdin input is supported via
--rethread -.
When no cover letter is found, the first patch becomes the thread
root — the same structure as a normal coverless series on lore.
This avoids synthetic message IDs and keeps all outgoing references
(thank-you notes, trailers, review replies) pointing at real
messages on real mailing lists.
For review tracking, an is_rethreaded flag on the series table
(schema v7) gates the retrieval path so only rethreaded series use
the multi-fetch pipeline. The flag is persisted in the tracking
commit JSON so it survives database rebuilds via rescan. Member
patch information is stored in a new series_patches table for every
tracked series, laying the groundwork for future cherry-pick-at-
track-time support.
Key changes:
- Extract parse_msgid() from get_msgid() for reuse
- Add LoreSeries static methods for series reconstitution:
identify_cover_letter(), rewrite_subject_counter(),
renumber_patches(), rethread_messages(), rethread_series()
- Add discover_rethread_series() for auto-discovery from a
single seed message using lore search (dt: time range queries)
- Add fetch_rethread_messages() and retrieve_rethreaded_messages()
- Hook into retrieve_messages() and review track's cmd_track()
- New series_patches table with (change_id, revision, position) PK
- New is_rethreaded column on series table for retrieval routing
- Persist is-rethreaded in tracking commit JSON; read it back in
rescan_branches() and create_review_branch()
- retrieve_series_messages() gateway for review TUI retrieval
- ReviewApp._fetch_rethreaded_threads() for follow-up loading
- 45 tests covering parsing, renumbering, rethreading, discovery
filtering, and integration with LoreMailbox
- Document --rethread in mbox, am/shazam, review, and man page
Closes: https://msgid.link/8637ff61-4eca-42ac-96fb-d530498b3f82@sirena.org.uk # 4958fdf
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
--
Deet-doot-dot, I am a bot.
b4 bug tracker (bugspray 0.1-dev)
prev parent reply other threads:[~2026-03-23 20:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 14:07 Stitching together serieses Mark Brown
2026-03-23 14:09 ` Mark Brown
2026-03-23 15:44 ` Konstantin Ryabitsev
2026-03-23 19:02 ` B4 Bugbot
2026-03-23 20:58 ` Konstantin Ryabitsev
2026-03-23 20:59 ` B4 Bugbot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260323-b4958fdfc4-0e75d99fc85f@git.kernel.org \
--to=bugbot+b4@kernel.org \
--cc=broonie@kernel.org \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox