Skip to content

ci(build): accept merged pull requests in the relinker author check - #5585

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
nikowolf123:ci/build-relinker-gate-merged-prs
Oct 15, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
nikowolf123:ci/build-relinker-gate-merged-prs

Conversation

@nikowolf123

@nikowolf123 nikowolf123 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

The eligibility job in .github/workflows/build.yml enables the relinker matrix for a pull request only when repos.listCommits({ sha: 'main', author: <login>, per_page: 1 }) returns a commit. CONTRIBUTING.md says the matrix runs automatically "if its author already has a commit in main". The author filter misses authors whose commits in main it does not match to their login, so their pull requests skip the relinker although they have merged pull requests.

Two pull requests where this happened, both open on 2026-10-13. Both change paths the gate lists, so the author check is what skipped them:

Why the filter misses them:

  • Commit 84d851b is in main, and GET repos/boykopovar/AnyPS5/commits/84d851bf8 reports author login Dextroid17 with a users.noreply.github.com address. commits?sha=main&author=Dextroid17 returns 0 commits, and the same request with that noreply address as author returns 1.
  • For each of the 26 authors in the table below I read the commits of up to three of their merged pull requests with GET repos/boykopovar/AnyPS5/pulls/<n>/commits. For 18 authors at least one of these commits is linked to their own login, and each such commit has a users.noreply.github.com address, as for Dextroid17. That address alone does not hide a commit: listCommits finds the commits of 0xRickx, which use one too. For 5, among them Mouad-Scriptz-0 (feat(libSceNpAuth): return the signed-out error from sceNpAuthGetAuthorizedAppCode #4218), they are not linked to any account. For 3, among them mrzacarias (feat(libSceRudp): implement sceRudpGetStatus #2359), they are linked only to other accounts.

Both queries, run with gh api on 2026-10-13 between 23:22 and 23:32 UTC:

  • listCommits is GET repos/boykopovar/AnyPS5/commits?sha=main&author=<login>&per_page=1, counted by the length of the result.
  • The search is GET search/issues with q=repo:boykopovar/AnyPS5 is:pr is:merged base:main author:<login> and per_page=1. The table shows total_count. incomplete_results was false for every login.

At 23:22 UTC the 721 open pull requests into main had 203 authors. listCommits returned 0 for 89 of them, and the search found merged pull requests for 26 of those 89:

Login listCommits Merged PRs
AaravMehta-07 0 5
ahir061 0 6
arcwiser 0 4
babyhuey 0 44
billythemenace2 0 1
David-cmrg 0 4
Dextroid17 0 12
fdfawef324 0 8
freshstart2066-create 0 1
gdrosa 0 1
ivica00 0 5
Mouad-Scriptz-0 0 6
mrzacarias 0 2
Nesyth 0 3
Nixitov 0 6
overlordxrz-source 0 15
p3n1cillin 0 9
ps54all 0 2
rebelittle 0 1
Silverash-i8 0 1
simonbronk 0 1
SP4C3B4R-8 0 10
SynnZer0 0 2
Tamalero 0 2
veosett 0 1
xXPBSXx 0 16

115 of the open pull requests are by these authors. 25 of those change a path the relinker gate lists, checked against the file paths gh pr list --json files returns. On 24 of the 25 the relinker check of the latest head is skipped; #1614 has no build checks.

Change, in the eligibility script:

  • The relinker paths are checked first. The author checks run only for a pull_request run whose files match, so other pull requests make neither request. A dispatch run still enables the relinker on the paths alone.
  • listCommits stays as the first check.
  • When it finds no commit, the script runs the search pr-intake.yml uses, repo:<owner>/<repo> is:pr is:merged base:main author:<login>. A total_count above 0 enables the relinker.
  • Incomplete results do not count; pr-intake.yml rejects them too. The search API has its own limit: gh api rate_limit shows 30 requests per minute for search. A failed search or incomplete results skip the relinker with a core.warning, and the job continues instead of failing.
  • The summary now reads skipped: no relinker file changed, or no commit or merged pull request in main was found for the author.

CONTRIBUTING.md is unchanged. An author with a pull request merged into main has a commit in main, which is what it says.

pr.author_association would need no extra request, but it cannot replace either check. In the open pull request list at 23:48 UTC it was CONTRIBUTOR for the 18 authors whose commits are linked to their login and NONE for the other 8. It was also NONE for 3 authors whose commits listCommits finds (sherySJ, thuanquang, nabilfp).

Neither check finds an author whose only commit in main came through someone else's pull request. Swastik-51 has 9f06176 in main through #4395 and no merged pull request. Their open #4767 changes no relinker path.

#5228 also edits this script: it moves the path checks into a select helper and keeps the author check as it is. The two conflict in build.yml, so whichever is merged second needs a rebase.

Tested

New tools/tests/test_build_eligibility.py, registered as ctest build_eligibility next to the other tools/tests scripts:

  • It takes the gate step's script: | block from build.yml and runs it in node as an async function of github, context and core, the way github-script calls it.
  • github is a mock that records the listCommits and search calls. core records the outputs, warnings and summary.
  • It skips when node is not on PATH. The runner-images README maps ubuntu-latest, windows-latest and macos-latest to Ubuntu 24.04, Windows Server 2025 with VS 2026, and macOS 26 arm64, and their image READMEs list Node.js 22.23.3, 22.23.3 and 24.20.0.

The seven cases:

  • An author with a commit in main runs the relinker without a search.
  • An author with only merged pull requests runs it, after a search with the exact query above.
  • An author with neither skips it, with no warning and the new summary text.
  • A search that throws a 403 skips it with one warning, and the other outputs are still set.
  • Incomplete results with total_count 3 skip it with one warning.
  • A pull request that changes only a write watch file makes no author request and still enables write watch.
  • A dispatch run enables the relinker without author requests, and skips it when only README.md changed.

Results, on main at d167000:

  • Windows 11, Python 3.15.0, node v24.21.0: python -I tools/tests/test_build_eligibility.py runs 7 tests and they pass.
  • With main's build.yml and the same test file, 5 of the 7 fail. The commit case and the dispatch case pass.
  • Windows 11 with WinLibs GCC 15.2.0 and CMake 4.3.1: cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON registers build_eligibility. ctest --test-dir build-relinker -R '^(build_eligibility|conventions_ci_gate)$' runs both: 7 and 10 tests, all pass.
  • WSL2 Ubuntu with g++ 15.2.0, CMake 4.2.3, Python 3.14.4 and no node: the same configure, then cmake --build build-relinker --parallel 4 and ctest --test-dir build-relinker --output-on-failure --timeout 120 -j 4. 156 of 156 tests pass, and build_eligibility reports its 7 tests skipped.

Also:

  • build.yml parses with PyYAML 6.0.3, and the script value it gives for the gate step equals the text the test extracts.
  • main's tools/check_conventions.py passes, including --title and --body.

Not run on Actions with the search path. listCommits returns 1 for my login, so this pull request's own run takes the first check only.

Rebase (2026-10-14)

Rebased onto main at 5a6ad0e. Since d167000, #5801 runs the checks of each pull request in a loop so that a dispatch can build up to 8, #5807 ends the run early when the pull request is already closed, #5822 moves the Linux job to a self-hosted runner, and #5839 limits its build and test parallelism to one. The change is the same: the paths are checked first, and the author checks run after the loop, only in a pull_request run, which has one pull request. pr now exists only inside the loop, so the login comes from context.payload.pull_request.user.login, and the test's payload has a user.login. The early return for a closed pull request comes before any author request, and the Linux job depends on full, which this does not change.

On the rebased head 8232380:

  • Windows 11, Python 3.15.0, node v24.21.0: the test runs 7 tests and they pass. With main's build.yml 5 of them fail, and the commit and dispatch cases pass. A scratch variant of the harness shows the same results as main for a closed pull request (no outputs, no author request) and for a dispatch of two pull requests (relinker from their paths alone).
  • WinLibs CMake 4.3.1: the relinker-only configure registers build_eligibility, tools/check_test_registration.py build-relinker passes, and ctest -R '^(build_eligibility|conventions_ci_gate|test_registration)$' passes.
  • WSL2 Ubuntu with the versions above: relinker-only build and ctest -j 4, 164 of 164 pass, build_eligibility skipped without node.
  • build.yml parses with PyYAML 6.0.3 and the gate script equals the extracted text. main's tools/check_conventions.py passes with --title and --body.

The two queries again on 2026-10-14 between 13:44 and 13:46 UTC: listCommits still returns 0 for 25 of the 26 logins in the table, Dextroid17 and AaravMehta-07 included after their merges. xXPBSXx now returns 1, for 79e1621, merged through #4796 at 02:37 UTC. The search finds 1 to 48 merged pull requests for each of the 25, with complete results.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes. Written with Claude Code; I reviewed every line and ran the tests above.

🤖 Generated with Claude Code

@MarcZX10

Copy link
Copy Markdown
Contributor

I checked the overlap with #5228 by merging the two published heads with git merge-tree. Each head is individually clean against its base, but merging #5228 (958231f0) and this PR (62c9a341) directly produces a content conflict in .github/workflows/build.yml in the eligibility gate. Since #5228 adds push/manual path selection and matrix outputs while this PR changes the author eligibility fallback, please coordinate the merge order or stack/rebase one on the other so both behaviors survive; the combined workflow should then rerun the eligibility tests.

@github-actions github-actions Bot added build ci .github needs rebase Conflicts with main, rebase needed labels Oct 14, 2026
@nikowolf123
nikowolf123 force-pushed the ci/build-relinker-gate-merged-prs branch from 62c9a34 to 8232380 Compare October 14, 2026 13:56
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 14, 2026
@adriadam10 adriadam10 self-assigned this Oct 15, 2026
The eligibility job enabled the relinker matrix for a pull request only
when repos.listCommits on main with the author's login returned a
commit. That filter misses authors whose commits in main are not
matched to their login. On 2026-10-13 it found no commit for 26 authors
of open pull requests who have 1 to 44 pull requests merged into main,
so their pull requests skip the relinker, against CONTRIBUTING.md ("if
its author already has a commit in main").

When listCommits finds nothing, the job now also searches for the
author's merged pull requests into main, with the query pr-intake.yml
uses. Incomplete search results count as none. A failed search, such as
the search API's own rate limit, skips the relinker with a warning
instead of failing the job. Both requests now run only when the pull
request changes a relinker file, so other pull requests make neither.

test_build_eligibility.py runs the step's script in node with a mocked
github object and skips when node is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased onto current main (#5228 had restructured the eligibility script): the author check now runs after select(...), only for a pull_request run whose files match, and the summary text is the new one. build_eligibility passes (7/7) and fails 5/7 against main's build.yml; build and ctest are green apart from agc_driver_tessellation, which segfaults on main too. Checked the listCommits-then-search fallback, the incomplete/failed-search warning path and the dispatch path; merging once CI is green.

@adriadam10
adriadam10 force-pushed the ci/build-relinker-gate-merged-prs branch from 8232380 to b9c91c8 Compare October 15, 2026 11:33
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
#674 CMakeLists.txt
#1835 CMakeLists.txt
#3891 CMakeLists.txt
#4156 CMakeLists.txt
#4396 CMakeLists.txt
#4397 CMakeLists.txt
#4422 CMakeLists.txt
#4423 CMakeLists.txt
#4424 CMakeLists.txt
#4520 CMakeLists.txt
#4521 CMakeLists.txt
#4522 CMakeLists.txt
#4523 CMakeLists.txt
#4566 CMakeLists.txt
#4599 CMakeLists.txt
#4718 CMakeLists.txt
#4740 CMakeLists.txt
#4749 CMakeLists.txt
#4760 CMakeLists.txt
#4813 CMakeLists.txt
#5021 CMakeLists.txt
#5835 CMakeLists.txt
#6044 .github/workflows/build.yml
CMakeLists.txt
#6067 CMakeLists.txt

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants