fix(tools): fetch each open pull request by the head commit the API reports #3427
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3427"
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 reyani-dev on 2026-10-11T10:14:08Z.
What
The PR overlap workflow has failed on every push to
mainsince 10:02 UTC today (last success 09:59). The step dies infetch:Open PR #3418 has no
refs/pull/3418/headon GitHub:git ls-remotelists onlyrefs/pull/3418/merge.fetchasks for every open PR'srefs/pull/N/headin one command, so a single missing ref fails the whole run, and no overlap report gets written for anyone.pr_overlap.py --branchfails locally the same way.open_prsalready reads each PR's head commit from the API (pr["sha"]).fetchnow fetches that commit (+<sha>:refs/pr/N) instead of the head ref. GitHub serves a commit that is reachable from the repository by its id: #3418's heada8e6c104fetches fine this way. The comparison then also uses exactly the commit the API reported, without a window where the ref has moved.FetchTestspins the refspecs.Tested
Windows 11, Python 3.12.6, on
main24cb0d24:tools/tests/test_*.pypasses. The newFetchTestscase fails withmain'spr_overlap.py.pr_overlap.py --out <dir>(the workflow's mode) writes reports for all 118 open PRs in 38 s;--branch HEADcompletes.main's script fails on both with the error above.check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T10:19:56Z.
I hit the same failure while checking #3392: the overlap workflow could not fetch
refs/pull/3418/head, so it did not produce a report. This change addresses that exact failure by fetching the head SHA already returned by the API, and using that same snapshot for the scan also avoids a ref moving between API lookup and fetch.I reviewed the full diff. The completed checks are green; macOS Intel registration and macOS relinker checks are still pending in the latest run. I do not see a remaining issue in this change.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T10:35:21Z.
Checked: the new
FetchTestscase fails withmain'spr_overlap.pyand passes here; ctest 13/13; fetching #3418's head commit (a8e6c104) by sha from the repository works, whilerefs/pull/3418/headdoes not exist. Merging.