* Stitching together serieses
@ 2026-03-23 14:07 Mark Brown
2026-03-23 14:09 ` Mark Brown
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Mark Brown @ 2026-03-23 14:07 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: tools
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
Hi,
When users send a patch series in a way that doesn't thread such as:
https://lore.kernel.org/r/20260323041505.2088-1-niranjan.hy@ti.com
https://lore.kernel.org/r/20260323041545.2101-1-niranjan.hy@ti.com
https://lore.kernel.org/r/20260323041624.2120-1-niranjan.hy@ti.com
https://lore.kernel.org/r/20260323041641.2133-1-niranjan.hy@ti.com
it would be useful if b4 review had a way for users to tell it that
actually this is a series and please treat it as such.
Thanks,
Mark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stitching together serieses
2026-03-23 14:07 Stitching together serieses Mark Brown
@ 2026-03-23 14:09 ` Mark Brown
2026-03-23 15:44 ` Konstantin Ryabitsev
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-03-23 14:09 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: tools
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
On Mon, Mar 23, 2026 at 02:07:13PM +0000, Mark Brown wrote:
> Hi,
>
> When users send a patch series in a way that doesn't thread such as:
>
> https://lore.kernel.org/r/20260323041505.2088-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041545.2101-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041624.2120-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041641.2133-1-niranjan.hy@ti.com
>
> it would be useful if b4 review had a way for users to tell it that
> actually this is a series and please treat it as such.
Not just useful actually - at the minute I get:
Retrieving series: 20260323041545.2101-1-niranjan.hy@ti.com
Looking up https://lore.kernel.org/all/20260323041545.2101-1-niranjan.hy@ti.com/
Grabbing thread from lore.kernel.org/all/20260323041545.2101-1-niranjan.hy@ti.com/t.mbox.gz
Could not find cover letter or first patch
trying to track the second patch.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stitching together serieses
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Konstantin Ryabitsev @ 2026-03-23 15:44 UTC (permalink / raw)
To: Mark Brown; +Cc: tools
On Mon, Mar 23, 2026 at 02:07:13PM +0000, Mark Brown wrote:
> When users send a patch series in a way that doesn't thread such as:
>
> https://lore.kernel.org/r/20260323041505.2088-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041545.2101-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041624.2120-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041641.2133-1-niranjan.hy@ti.com
>
> it would be useful if b4 review had a way for users to tell it that
> actually this is a series and please treat it as such.
I'll see what I can do, but on the first approach this is proving fragile,
because it's breaking a lot of assumptions we currently have about a series,
such as ability to retrieve it as a single thread to check for updates, etc.
bugspray tag b4/email
--
KR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stitching together serieses
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
4 siblings, 0 replies; 6+ messages in thread
From: B4 Bugbot @ 2026-03-23 19:02 UTC (permalink / raw)
To: konstantin, broonie, tools
Hello:
This conversation is now tracked by b4 bug tracker.
There is no need to do anything else, just keep talking.
--
Deet-doot-dot, I am a bot.
b4 bug tracker (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stitching together serieses
2026-03-23 14:07 Stitching together serieses Mark Brown
` (2 preceding siblings ...)
2026-03-23 19:02 ` B4 Bugbot
@ 2026-03-23 20:58 ` Konstantin Ryabitsev
2026-03-23 20:59 ` B4 Bugbot
4 siblings, 0 replies; 6+ messages in thread
From: Konstantin Ryabitsev @ 2026-03-23 20:58 UTC (permalink / raw)
To: Mark Brown; +Cc: tools
On Mon, Mar 23, 2026 at 02:07:13PM +0000, Mark Brown wrote:
> When users send a patch series in a way that doesn't thread such as:
>
> https://lore.kernel.org/r/20260323041505.2088-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041545.2101-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041624.2120-1-niranjan.hy@ti.com
> https://lore.kernel.org/r/20260323041641.2133-1-niranjan.hy@ti.com
>
> it would be useful if b4 review had a way for users to tell it that
> actually this is a series and please treat it as such.
After several bad takes, I landed --rethread in master that should do the
right thing in Most Situations (and probably screw things up badly in all
other situations, tbh).
E.g. this works:
b4 review track --rethread https://lore.kernel.org/r/20260323041505.2088-1-niranjan.hy@ti.com
It also works for b4 am/shazam.
Please try it out and let me know any bugs you find.
Regards,
--
KR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stitching together serieses
2026-03-23 14:07 Stitching together serieses Mark Brown
` (3 preceding siblings ...)
2026-03-23 20:58 ` Konstantin Ryabitsev
@ 2026-03-23 20:59 ` B4 Bugbot
4 siblings, 0 replies; 6+ messages in thread
From: B4 Bugbot @ 2026-03-23 20:59 UTC (permalink / raw)
To: tools, broonie, konstantin
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)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-23 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox