Repository navigation
patch, baseline: fix quilt mail series collection and tip.git baseline resolution - #879
Merged
Merged
Conversation
Mailers such as quilt mail omit the In-Reply-To header on follow-up patches in a series and record the cover letter message ID only in References (RFC 5322 section 3.6.4 places the immediate parent last in References). Because quilt message IDs have no shared hyphenated stem either, leaving in_reply_to unset after thread isolation caused every patch in a quilt series to land in its own thread and remain an incomplete patchset. Populate in_reply_to from the last non-self entry in References when In-Reply-To is absent or empty, and normalize whitespace and control characters on both headers consistently with Message-ID. Fixes: 127dac6 ("fix: enforce thread isolation for multi-part patchsets") Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Sashiko reviewCommit 7/8 —
|
Member
Author
|
Resolved the
|
rgushchin
force-pushed
the
fix/quilt-and-tip-patches
branch
from
November 11, 2026 20:43
1ec1478 to
5fb8d8b
Compare
Sashiko review — v2Commit 2/8 —
|
Member
Author
|
Resolved the
|
rgushchin
force-pushed
the
fix/quilt-and-tip-patches
branch
from
November 11, 2026 21:23
5fb8d8b to
e500666
Compare
Sashiko review — v3Commit 2/8 —
|
In create_patchset, is_cover_patch_pair checked total_parts == 1 on the incoming message without checking existing_total == 1 on the candidate patchset (unlike is_cover_patch_pair_in_thread immediately below it). When an author posted an unrelated standalone 1/1 patch in the thread of an incomplete 0/N multi-part series, is_cover_patch_pair evaluated to true, bypassing subject matching and absorbing the unrelated 1/1 patch into the 0/N series as part 1. Require existing_total == 1 in both is_cover_patch_pair and cross-thread singleton leniency, and reject pairing a non-placeholder 1/1 patch with a multi-part 0/N cover letter in either arrival order. Fixes: 1e90a98 ("db: group single-patch submissions across author emails") Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Subtree maintainers send pull requests created with git request-pull -p under subjects such as [GIT pull] timers/vdso for v7.4-rc1. Because the message body includes a full branch diff, parse_email treated every inline pull request as a standalone 1/1 patchset. Detect leading [GIT pull] / [GIT PULL] / [git-pull] subject prefixes that carry no PATCH or RFC tag and mark those messages as non-patch emails so they are stored in message history without creating bogus patchsets. Keep bare [PULL M/N] series subjects untouched for projects such as QEMU where submaintainers post patch series under [PULL]. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Regex word boundaries in parse_subject_version matched the digits before a dot, turning dotted revision tags such as [patch V1.1 02/38] into v1 and stable target tags such as [PATCH v6.6] into patch revision v6 (and causing promote_reply_patch_subject to corrupt [PATCH v6.6] when injecting a reply version). Meanwhile extract_version_tag matched V1.1 inside [patch V1.1 02/38] and emitted a nonexistent LocalRef(v1.1) baseline candidate. Reject version tokens immediately preceded or followed by a dot in parse_subject_version and promote_reply_patch_subject while continuing to scan later tokens inside brackets (so [STABLE v6.6 v2] resolves to revision 2), and skip dotted v1.x / v2.x patch revision tokens inside non-stable bracket prefixes in extract_version_tag. Fixes: 0e62b71 ("fix: stricter subject version parsing to avoid false positives") Fixes: 7e5e3dc ("feat: improve baseline selection robustess and UX") Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
extract_files_from_diff previously recognized only diff --git a/<path> headers and returned an empty file list for patches formatted with quilt or plain unified diff (--- a/<path> / +++ b/<path> without a git diff header). Returning no touched files prevented MAINTAINERS subsystem baseline selection, maintainer section attribution, subsystem prompt loading, and ignored-file filtering for every quilt patchset. Extend extract_files_from_diff to extract sanitized repository-relative paths from standard unified diff header triples (--- / +++ immediately followed by @@ -) whenever a file section is not already introduced by diff --git, handling modified, added (/dev/null), deleted, timestamped, and .orig-prefixed headers without matching --- separators or hunk body lines. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Linux MAINTAINERS lists only <subsys>/core branches for most tip.git subsystems (such as sched/core, locking/core, irq/core, and timers/core) and omits a T: line on OBJTOOL (pointing to maintainer-tip.rst via P: instead). Regression fixes targeting <subsys>/urgent, objtool series targeting objtool/core or objtool/urgent, and cross-subsystem series based on tip/master failed to apply whenever mainline or <subsys>/core had diverged. Map objtool paths to tip.git objtool/core when tip.git is present in MAINTAINERS, pair tip.git <subsys>/core candidates with <subsys>/urgent (prioritizing urgent when the subject carries urgent), and include tip.git master as a fallback before linux-next without dropping sibling subsystem trees. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Authors frequently state a series baseline tag in the cover letter or changelog (for example "The series applies on top of v7.0-rc3" or "Rebase on v7.2-rc1") without repeating that tag in the subject, and occasionally submit stable backports under [PATCH stable backport] with an upstream commit marker in the body and no explicit X.Y branch in the subject. Without those hints, Sashiko fell through to moving subsystem and mainline tips where the series or already-merged upstream commit no longer applied. Extract explicit vX.Y[-rcN] baseline tags from non-quoted pre-diff body lines stating what the patch applies or is based on, and fall back to recently updated linux-*.y branches on the stable remote when a Linux patch declares an unversioned stable backport. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
tip-bot2@linutronix.de posts automated [tip: <branch>] single-commit notifications to linux-kernel and linux-tip-commits after patches already posted to LKML are merged into tip.git. Ingesting these bot notifications caused duplicate reviews of already-reviewed patches and frequent application failures on commits 2..N of multi-commit pushes whose parent commits are not yet on any baseline ref. Add tip-bot2@linutronix.de to defaults.ignored_emails in the Linux mailing list policy. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
rgushchin
force-pushed
the
fix/quilt-and-tip-patches
branch
from
November 11, 2026 22:10
e500666 to
b70e389
Compare
Member
Author
|
Resolved the
|
Sashiko review — v4✓ No issues found across 8 commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the patchset collection and baseline resolution gaps affecting
quilt mailandtip.gitmaintainer workflows (notably Peter Zijlstra and Thomas Gleixner submissions on LKML):References:-only series threading (src/patch.rs):quilt mailomitsIn-Reply-To:on follow-up patches1/N..N/N, placing the cover letter Message-ID only inReferences:with dot-separated Message-IDs that share nogit send-emailhyphen stem. Fall back to the final non-selfReferences:entry whenIn-Reply-To:is absent or empty (RFC 5322 section 3.6.4).src/db.rs): Requireexisting_total == 1inis_cover_patch_pairso standalone1/1patches posted in the thread of an incomplete0/N(N > 1) series do not merge into the multi-part series.[GIT pull]requests (src/patch.rs): Filter leading[GIT pull]/[GIT PULL]/[git-pull]subjects withoutPATCHorRFCtags out ofis_patch_or_coversogit request-pull -pemails are stored in message history without creating bogus1/1patchsets, while keeping bare[PULL M/N]series (used in QEMU) intact.src/patch.rs,src/baseline.rs): Prevent dot-adjacent version tokens ([patch V1.1 02/38],[PATCH v6.6]) from matching integer patch revisions inparse_subject_version/promote_reply_patch_subject, and skipv1.x/v2.xpatch revision tokens inside non-stable brackets inextract_version_tag.src/baseline.rs): Extendextract_files_from_diffto extract sanitized repository-relative paths from---/+++/@@ -header triples whendiff --githeaders are absent (quiltand plain unified diffs), restoringMAINTAINERStree heuristics, section attribution, and subsystem prompt selection.tip.gitbranch &objtoolcandidates (src/baseline.rs): Mapobjtoolpaths totip.gitobjtool/core, expandtip.git<subsys>/corecandidates with<subsys>/urgent(prioritized whenurgentappears in the subject), and appendtip/masterbeforelinux-nextwithout dropping sibling subsystem trees.src/baseline.rs): Extract explicit pre-diffapplies on/based on vX.Y[-rcN]tags from cover letters and changelogs, and query recently updatedstable/linux-*.ytracking branches when a Linux submission declares an unversioned stable backport ([PATCH stable ...]or leadingcommit <sha> upstream.).tip-bot2post-merge notifications (projects/linux/mailing_lists.toml): Addtip-bot2@linutronix.detodefaults.ignored_emailsso post-merge[tip: <branch>]commit notifications are not re-ingested as standalone1/1patchsets.Verification
make check-pr RANGE=origin/main..HEADandmake check-db-invariantssashiko review --project sashiko --agent origin/main..HEAD(status: clean, 0 findings)