Repository navigation
fix(tools): report pr_overlap output errors without traceback - #26707
Merged
oneandonlydean merged 1 commit intoNov 24, 2026
Merged
Conversation
Creating the --out directory or writing a report could raise an uncaught OSError. Handle those filesystem errors in write_reports and exit with the same pr_overlap diagnostic used by the CLI for other errors. Cover the failure with a test that points --out at an existing file and mocks the GitHub and Git operations. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
kripotker
approved these changes
Nov 24, 2026
kripotker
left a comment
Contributor
There was a problem hiding this comment.
Review: fix(tools): report pr_overlap output errors without traceback
Approve.
What I checked
write_reportsnow turns anOSErrorfrommkdirorwrite_textintoSystemExit("pr_overlap: ..."). Its only caller ismain()(tools/pr_overlap.py:1128). ASystemExitwith a message exits with status 1, so thepr-overlap.ymlstep (--out "$out") still fails on a write error, just without the traceback. No failure is hidden.from Nonedrops the chained traceback but keeps theOSErrortext, which names the path.
What I ran
Windows 11, Python 3.14, PR head 0eb1170:
python3 tools/tests/test_pr_overlap_errors.py
python3 tools/tests/test_pr_overlap_encoding.py
python3 tools/check_conventions.py
- Both test files: OK. The encoding test calls
write_reportsdirectly. - With
main'spr_overlap.py, the newtest_output_path_that_is_a_file_reports_an_error_without_tracebackerrors, so it covers the change. check_conventions.py:All conventions checks passed.
AI-assisted: yes (Claude Code).
12 tasks done
|
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.
|
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Report filesystem failures from
--outwith the existingpr_overlapCLI diagnostic. An existing file passed as the output directory now produces a one-line error and status 1. The handler is inwrite_reports, leaving the branch-mode changes in #21678 free to merge independently.Tested
WSL Ubuntu 24.04, Python 3.12.3 and Git 2.43.0. Ran all
test_pr_overlap*.pymodules separately, as CTest does. The branch passed 239 tests andmainpassed 238. Both skipped three workflow cases becausejqwas unavailable. The error-reporting module also passed 17 tests on Windows 11 (Python 3.14.5, Git 2.56.1) and skipped one symlink case. The new regression reproducedFileExistsErrorwith the upstream script and passed with the branch and with the combined tree from a clean trial merge with #21678 (ca8762f3d0). Conventions andgit diff --checkpassed. The branch overlap checker found no confirmed conflicts across 2,503 open PRs and left four comparisons unresolved because their heads already conflict withmain. Comparing trial merge trees with and without this change confirmed identical conflict paths and unchanged conflict markers for #19961, #20964, #24016 and #26109. In each case the only added difference was thewrite_reportspatch.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)