patchscan: distinguish E: (verification errors) from W: (missing fixes)#368
patchscan: distinguish E: (verification errors) from W: (missing fixes)#368nirmoy wants to merge 1 commit into
Conversation
|
Tested all three paths against the fork (nirmoy/NV-Kernels) with the fix applied:
The |
|
I don't have an issue with this change. However, why did the script think the "PCI/AER: Replace PCIEAER_CXL symbol with CXL_RAS" reference was an upstream SHA? Shouldn't it only consider those that have a pick tag? |
|
When I run Jacob's patchscan on Jiandi's CXL branch it did not flag anything for that patch: |
Previously, both E: (upstream commit-message mismatch) and W: (missing Fixes: patch) set fixes_found=true, causing the "Missing Fixes Detected" comment to appear even when no Fixes: patches were missing. PR NVIDIA#342 triggered exactly this: a SAUCE config commit referencing an upstream SHA with a different title caused E: output, but All fixes: was empty. Replace the two separate if-blocks (which could overwrite each other via GITHUB_OUTPUT) with a single mutually-exclusive chain: W: / "Fixes for" → fixes_found=true (missing Fixes: patches) E: / non-zero rc → fixes_found=error (upstream verification failure) neither → fixes_found=false (all-clear) Update the "error" PR comment title and body to explain this is typically a false positive from SAUCE commits that reference upstream SHAs in their message body with a different title. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
323edb6 to
dbd7b00
Compare
|
The fight #356 beweeen claude abd copilot must have forced claude to modify the Jacob's script. Checking.. |
You're correct — the original script does exactly that. The The fix applied in this PR adds re.finditer(r"(?:from commit|^[Uu]pstream commit) ([a-fA-F0-9]+)", msg, re.MULTILINE)With this fix — Claude |
|
Superseded by a new PR that also adds 26.04_linux-nvidia support. |
Summary
E:(upstream commit-message mismatch) andW:(missingFixes:patch) both setfixes_found=true, so the:warning: Missing Fixes Detectedcomment appeared even whenAll fixes:was empty and no patches were actually missing.ifblocks both wrote toGITHUB_OUTPUTfor the same variable; the second write (true/false) always overwrote the first (error).[Uu]pstream commitregex inget_src_commit_strs()matchedupstream commit <sha>embedded in prose (e.g. "was removed by upstream commit d18f1b7"), not just as a backport trailer. Jacob's original script uses onlyfrom commit, which correctly ignores such prose references.ifblocks with a single mutually-exclusiveif/elif/elsechain:W:/Fixes for→fixes_found=true→ "Missing Fixes Detected" commentE:/ non-zero exit →fixes_found=error→ "Upstream Verification Error" commentfixes_found=false→ all-clear comment[Uu]pstream committo line start withre.MULTILINEso it only matches as a standalone trailer, not in prose.Triggered by PR #342, where commit
ad33ca9f(a SAUCE config commit) hadupstream commit d18f1b7beadfin its description prose — not a backport marker — causing a spurious failure.Test plan
E:errors — should post:x: Upstream Verification Errorcomment and fail the checkFixes:patches still posts:warning: Missing Fixes Detected:white_check_mark: No Missing Fixesad33ca9f-style prose reference (upstream commit Xnot at line start) is no longer matchedTested on nirmoy/NV-Kernels fork — see comments below for details.
🤖 Generated with Claude Code