Skip to content

validate-pr: accept annotated backports and enable 7.3 validation - #699

Open
nirmoy wants to merge 1 commit into
NVIDIA:github-actionsfrom
nirmoy:fix/validate-pr-backports-7.3
Open

nirmoy wants to merge 1 commit into
NVIDIA:github-actionsfrom
nirmoy:fix/validate-pr-backports-7.3

Conversation

@nirmoy

@nirmoy nirmoy commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

SHA-referenced backports such as #696 and #697 contain the same edits as upstream but fail replay and adjacent-anchor validation because their surrounding kernel code differs. Allow a single (backported from commit …) reference with an immediately attached, nonblank backporter explanation to report noted when zero-context patch IDs and exact ordered removed/inserted lines match. This waives placement proof only; substantive edits, whitespace changes within the edit payload, file-mode changes, nonregular files, and mixed cherry-pick/backport provenance remain errors.

Ordinary cherry-picks stay strict. Upstream resolution, subject matching, and sign-off checks remain independently enforced. Lore-backed validation is unchanged.

Add 26.04_linux-nvidia-7.3-next to the PR Validation workflow branch list so PRs targeting it receive automatic Patchscan + PR lint checks after merge.

Validation:

Ambiguous repeated-line diff grouping still fails closed. Accepted noted entries require manual placement review; the fallback does not certify semantic equivalence.

@nirmoy nirmoy added the help wanted Extra attention is needed label Nov 9, 2026
@nirmoy

nirmoy commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

BaseOS Kernel Review

Tip

✅ Review passed

No issues found across the reviewed commits.

Findings: none

🔍 Review artifacts

📦 Build checks — 🔴 0/4 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

  • 🟢 PR Illustrated: ready
Review metadata
  • Reviewed head: 7172ed8e88b6
  • Overall status: build failed
  • Build checks: 0/4 passed

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@ianm-nv

ianm-nv commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Hi Nirmoy — I reproduced a case where the new noted fallback accepts a cherry-pick that fails patch-ID/replay validation.

get_upstream_commit_sha() gives (cherry picked from commit ...) priority, but the fallback only checks whether a (backported from commit ...) trailer appears anywhere in the same message. Starting with the new _build_annotated_backport_case() fixture, I added a cherry-pick trailer for the same upstream SHA and kept the backport trailer and annotation. The validator exited 0 with Patch-ID noted, although the local and upstream patch IDs differ. I expected the cherry-pick to remain a mismatch, as described in the commit message.

Could the fallback require that no cherry-pick trailer is present, and could we add this mixed-trailer case to the tests?

One related policy question: the fallback checks that both patch IDs exist, but does not compare their contents. I changed the fixture's payload to unrelated text; it also exited 0 as noted. Is noted intended to mean that a reviewer must manually verify the entire backport diff, even when the change is not equivalent with zero context?

A SHA-backed backport can carry identical changed lines yet fail replay
and adjacent-anchor checks because its parent has different neighboring
code. Allow an explicit explanation to waive placement proof while
preserving exact ordered edit payloads, matching zero-context patch IDs,
and unchanged regular-file modes.

Require one backported-from SHA trailer immediately followed by a
nonblank annotation, and reject mixed cherry-pick provenance from this
fallback. Keep resolution, subject, sign-off and ordinary cherry-pick
checks enforced. Report accepted adaptations as noted, not match.

Cover mixed provenance, changed payloads, whitespace inside string
literals, invalid patch IDs, file modes and annotation placement with
black-box regression tests. Enable the existing PR Validation workflow
for 26.04_linux-nvidia-7.3-next as well.

Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
@nirmoy
nirmoy force-pushed the fix/validate-pr-backports-7.3 branch from 0fbdea4 to 7172ed8 Compare November 9, 2026 16:40
@nirmoy

nirmoy commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks Ian. Updated the fix to reject mixed provenance and require matching zero-context patch IDs plus exact edit payloads, including whitespace. Added regression coverage; all 40 tests and CI pass.

noted now waives placement proof only, so placement still needs manual review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed pending_review_comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants