feat(tools): label pull requests whose merge would not change main #14044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14044"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-31T16:59:53Z.
What
An hourly job that labels an open pull request
already in mainand comments once, when merging it would not changemain. It never closes anything. The label goes away by itself once merging would changemainagain.A pull request is flagged only when both of these hold:
potentialMergeCommit) has the same tree as themaincommit it was made on. That means the merge added nothing.main, or every file the pull request touches, including renames' old paths, has the same blob in that commit and in the currentmain. In that case the old result still holds today.If anything is unknown, the pull request is not flagged. That covers no test merge (conflicts), more than 100 touched files, or a file that is new, deleted or changed since. This doesn't guess from titles, exports or overlap; it only uses GitHub's merge result and blob IDs.
It costs about 34 GraphQL pages for the current ~1,700 open pull requests, plus 2 requests per candidate.
Tested
tools/tests/test_pr_unchanged.py: 25 tests, all passing. They cover candidate detection, a merge tested on current or oldermain, a changed or added file, the file limit, mode-only and file-type changes, the comment retry, path quoting in the query, the label added and removed, a single comment, dry run, that nothing is ever closed, GraphQL errors and pagination.tools/check_conventions.pypasses.ghagainst all 1,696 open pull requests on 2026-10-31:main, 1,183 on an older one, and 299 had none.main.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T17:16:07Z.
Review: APPROVED
Reviewed — looks good
The exact-head review found no substantiated blocking issue; the focused Python checks and relevant hosted checks passed.
What I ran
Reviewed head
fb65d39962b045bcc70f2de50c23d421ae1ead52against base474030e58424fefdb65e5df9f3820810fbb4553c; the merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or compilation of AnyPS5 was run.The Python syntax and focused test commands ran from an archive of the exact PR head. The stack check reports the PR head merged cleanly into the stated base.
Results
test_pr_unchanged.pyRaw local check output
Hosted CI status output for the reviewed head
Negative control
test_pr_unchanged.pyUnedited negative-control error
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
tools/pr_test_quality.pywas absent from its checked-out head directory.