Skip to content

fix(tools): report controller command file errors cleanly - #11360

Draft
arcwiser wants to merge 1 commit into
boykopovar:mainfrom
arcwiser:fix/pad-input-io-errors
Draft

arcwiser wants to merge 1 commit into
boykopovar:mainfrom
arcwiser:fix/pad-input-io-errors

Conversation

@arcwiser

Copy link
Copy Markdown
Contributor

What

Catch file I/O errors throughout controller command sequencing, temporary-file creation and atomic replacement in pad_input.py, reporting an argparse error instead of an uncaught traceback. Preserve the existing command and temporary-file cleanup on failure.

Draft because #6531 and its rebased follow-up #11312 overlap the missing-parent-directory symptom and modifies the same CLI function. This change additionally handles read, temporary-file and replacement failures; coordination is needed before marking it ready. #10206 and #10578 modify other behavior in the same tool.

Tested

Windows, Python 3.12, upstream base 204c6747d0a1cbaf932def3dea0778810cc3935e; published head 12a121f13ad4f80367e01a30e69a1aa65051486b.

No game, GPU, POSIX runtime or C++ build tested. Base freshness and overlap coordination remain to be resolved before ready-for-review.

Checklist

Overlap details

#11312 rebases #6531's path validation and output encoding changes and adds a read-permission regression expecting the raw exception. This branch instead reports read, temporary-file and replacement errors through argparse and tests all three failure stages. Combining the branches requires retaining its path/encoding changes, this broader error handling, and reconciling the differing unreadable-file test expectation. #10206 adds stream/entry-point changes and tests at the same insertion point. This draft is not ready to merge until the ordering and shared tests are coordinated. No dependencies declared yet.

@MarcZX10

Copy link
Copy Markdown
Contributor

I independently ran the exact-head tools/tests/test_pad_input.py from 12a121f13ad4f80367e01a30e69a1aa65051486b on this Linux host: 16/16 tests passed, including the new missing-directory case and injected read/temp-write/replace failures. The PR body already accurately leaves base/overlap coordination unresolved and keeps this as a draft. Its current head is one commit ahead of main; the only failing hosted check is conventions because the overlap/base-sync checklist item is intentionally unchecked. Please keep it draft until that checklist and the shared pad_input.py/test behavior are reconciled with the existing open work; no request to close any PR.

@github-actions

github-actions Bot commented Oct 26, 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
PR 10206 tools/pad_input.py
tools/tests/test_pad_input.py
PR 16097 tools/pad_input.py
tools/tests/test_pad_input.py
PR 16439 tools/pad_input.py
tools/tests/test_pad_input.py

This branch has not been deployed

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

Labels

needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants