feat(tools): show pr_overlap's progress while it lists, fetches, probes and merges #10988
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10988"
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 MarcZX10 on 2026-10-25T12:27:10Z.
What
tools/pr_overlap.py, which AGENTS.md asks to run with--branchbefore opening a pull request, prints nothing until its report. With about 1,300 open pull requests a--branchrun takes 54 to 81 s on Linux (75 to 81 s on currentmain, 54 to 55 s with #9539), and #9539 measured 27 minutes on Windows before its fix, so a run looks stuck.This writes progress lines to stderr, leaving the report on stdout unchanged:
The count is reported once the pull requests are listed, the fetch after each batch of 100 heads, and the probe of #9539 and the merges into the base every 100 pull requests and at the end. A run without
--branchreports its merges the same way.This builds on #9539, which adds the probe step, so it depends on it. The first four commits are #9539's, by DavidSamir, applied unchanged on current
mainwith their authorship kept; the five commits after them are this pull request's (two changes, each followed by its test, and the test registration). Once #9539 is merged, rebasing drops its commits from this branch.Tested
Linux x86-64, Python 3.11: every
tools/tests/test_pr_overlap*.pysuite passes, including the newtest_pr_overlap_progress.py(fetch batches of 99, 199 and 250 of 250 heads, a run without pull requests, probe lines with 4, 8 and 10 related pull requests out of 250, and merge lines at 100 and 150 of 150). The new tests fail before the corresponding commits. A realpython3 tools/pr_overlap.py --branch marc/feat-pr-overlap-progress --repo boykopovar/AnyPS5run took 61 s, printed the lines above and the same kind of report as before; its only conflict is #9539, which this branch contains.python3 tools/check_conventions.py --base upstream/main --head HEADandgit diff --check upstream/mainpass. Windows and macOS were not run.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 thepoppfish on 2026-10-25T14:33:06Z.
Review: COMMENTED
Windows validation of exact head
a9051f9aacb223183846c2d124b1db88f057dedc, with the progress-only delta reviewed against dependency-only parent16b8bed6d6767a46550312b4d87cbeb6405d5fad. I found no actionable defect in that delta. This is a comment review: the inherited #9539 rename omission remains on this head, so these results do not approve the combined branch.Windows 11 build 26200, Python 3.14.7, native Git for Windows:
python -m unittest discover -s tools/tests -p 'test_pr_overlap*.py' -v: 85 methods, 80 passed, 5 skipped, 23.162 s. Skips are three Linux shell-workflow cases, the shell-script fake-gh subdirectory fixture, and a POSIX filename fixture. They remain skips; the separate native CLI fixture below adds Windows coverage.pr_overlap_progress;ctest --test-dir <build> -R '^pr_overlap_progress$' -Vpasses 1/1 in 0.68 s (five Python methods, 0.009 s; total CTest time 0.72 s). No C++ product build or full CTest run was performed for this review.--out, an empty PR list, and a failed fetch. All paired stdout bytes and all four generated report files match; the nonempty UTF-8 path report also matches between root and nested invocation. The failure case preserves the old error and nonzero exit without reporting a successful fetch. A further streaming run reads the first stderr progress line while the process is still running, then produces the same stdout report.gh apiis replaced by a compiled native fixture reader. They use four synthetic PRs, no network and no GitHub credentials. This is neither a live GitHub scan nor a large-repository performance measurement. No speed claim is made.python tools/check_conventions.py --base origin/mainand whitespace checks pass; the source worktree stays clean.Dependency qualification: I replayed the three regressions already published by veosett in the #9539 follow-up, copying only its test hunk into scratch and keeping this head's production code unchanged. As expected, the older-file/base-rename and implicit-directory-move cases still fail; the surviving-directory filtering case passes (3 methods, 2 assertion failures, 1 pass, zero errors, 11.847 s). This is the existing dependency defect, not a new progress finding. I did not apply or certify the proposed production repair. If that repair is adopted, its two-argument
probeand three-item return also need carrying into this PR's enumerated probe loop and fake-probe test before rerunning the suite.Replay the native Windows CLI parity and streaming fixture
Save the two files below together in a scratch directory. With Python, GCC and native Git available, run:
The checkout must contain dependency-only commit
16b8bed6d6767a46550312b4d87cbeb6405d5fad. The fixture asserts the exact head, creates/removes its own temporary repository, and writes result JSON/stdout/stderr beside itself. It does not edit the checkout or contact GitHub. Compilation here used GCC 16.2.0-6 UCRT. The native shim avoids Windows shell/shebang assumptions in the skipped committed fixture.FakeGh.c:probe_cli.py:No Linux/macOS runtime, hosted CI, game, GPU or whole-product validation is claimed. AI-assisted review and fixture: yes (OpenAI Codex).
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-26T18:50:11Z.
Review: CHANGES_REQUESTED
Reviewed
a9051f9aacb223183846c2d124b1db88f057dedc. Changes requested for a reproduced conflict-detection regression.[P2]
tools/pr_overlap.py,probe/related: retain candidates affected by base-branch renames. Start withold.txt, rename it torenamed.txton main, and edit its first line in the reviewed branch. An older PR changes that same line underold.txt. Its clean merge onto main relocates the edit, and a full scan correctly detects the line-1 conflict onrenamed.txt.The new three-dot probe sees only
old.txt, discards the candidate and reports no overlap. I reproduced this with real Git histories on the exact head; the comparison base retains the conflict. A raw merge-base path list is not a conservative substitute for the merged-tree paths.Please account for base-branch renames or retain uncertain candidates, and add this older-base case to the optimized-versus-full equivalence tests.
Validation: Windows/Python 3.11. The eight added branch-scan/progress tests pass. The separate rename reproduction is the decisive failing behavior; no timing or full-repository performance claim.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-27T03:24:00Z.
Review: APPROVED
Reviewed
642caa0e558d4547975d171cedf88f1efb605010. Approve: the updated prefilter retains candidates whose existing paths disappeared from the base, and the submitted rename and deletion cases cover the prior finding.An independent real-Git rename history now reports the same conflict in the optimized and full scans. The same control against the previously reviewed head loses that conflict, demonstrating the correction. A separate reused-path history also matched, although that case does not exercise rename detection because Git treated the old path as a replacement.
Windows, Python 3.11.9: 82 passed, 5 skipped, 87 total across the overlap suites. Hosted relinker jobs on Windows, Linux and both macOS architectures ran the branch-scan and progress tests on merges containing this head; product jobs were skipped. ASan ran its targeted TLS coverage, not these overlap tests.
This review covers the pinned branch, including its #9539 dependency; preserve the correction when resolving the dependency and landing order. No whole-product or performance validation is claimed.
Pull request closed