Skip to content

check_argv_modes: a hung child is a recorded failure and a missing work dir is created, not a traceback - #9161

Open
OlaiFG7 wants to merge 1 commit into
ItsNotRexed:mainfrom
OlaiFG7:fix/check-argv-modes-timeout
Open

OlaiFG7 wants to merge 1 commit into
ItsNotRexed:mainfrom
OlaiFG7:fix/check-argv-modes-timeout

Conversation

@OlaiFG7

@OlaiFG7 OlaiFG7 commented Nov 23, 2026

Copy link
Copy Markdown

New BUILD item, claimed in #8868 (comment).

run() called subprocess.run(..., timeout=15) without handling TimeoutExpired, so one hung child aborted main() with a traceback and lost the remaining native/mapped pairs and the --report JSON; and --work-dir was resolved with resolve(strict=True), so a work folder that did not exist yet was a FileNotFoundError traceback. check_module_names.py already handles both. Now run() returns a recorded failure (exit_code: None, error: "child exceeded 15 seconds") that the comparison loop adds to that case's problems, so the other cases still run and the report is still written; main() creates the work folder (mkdir(parents=True, exist_ok=True)); a missing loader or fixtures folder is one parser.error("not found: ...") line instead of a traceback (strict=True is kept on both).

Depends on: none. #8626 edits this file for another topic (slot 25 fixtures); the diff here is small, so the rebase should be easy.

AI-assisted. Tested on Windows 11, Python 3.14.3, CPU only, no GPU, no game files (the script itself needs the native MSVC fixtures; the tests drive it with dummy loader/fixture files and a patched subprocess.run): tests/test_check_argv_modes.py 4 OK (new file; the two main() tests skip off Windows). On the unfixed code 3 of the 4 fail; the fourth is the control for a normal child. py_compile, scripts/check_no_game_data.py on the changed files and git diff --check are clean.

🤖 Generated with Claude Code

…rk dir is created, not a traceback

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

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux CPU review

What changed: check_argv_modes records a hung child (TimeoutExpired) as a failure, creates a missing work dir, and turns missing loader/fixtures into a usage error.

Checked: tests/test_check_argv_modes.py — 2 passed, 2 skipped (Windows-only main).

Looks correct; no game files.

@catminou4

Copy link
Copy Markdown

Tested on Apple M1 Max, macOS 27.2.1 arm64, Python 3.12.16: python -I tests/test_check_argv_modes.py → 4 tests OK (2 skipped). No game files. AI-assisted (Devin).

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified head f20c19bfc merged onto main (867d922f0) on native Windows 11 (10.0.26300.9974, Python 3.12.10):

  • python -I scripts/check_no_game_data.py on both changed files: clean (exit 0)
  • python -I -m unittest discover -s tests -p test_check_argv_modes.py -v: 4/4 passed

AI-assisted.

@thehollowedone

Copy link
Copy Markdown

Live child-process check of f20c19bf on native Windows x64, CPython 3.12.8, and MSVC 19.44.35230.

The unchanged check_argv_modes.py CLI created a missing nested work directory and wrote a JSON report with all 26 native/mapped pairs passing using the real loader and synthetic fixtures.

In a separate run, a temporary test wrapper substituted one sleeping Python process for the first mapped child. The PR code recorded the real 15-second timeout and exited 1 after writing all 26 report rows. Only that pair failed. The other 25 completed successfully using the real loader and fixtures.

The four stock unit tests also passed. Synthetic inputs only. AI-assisted.

@padhossein

Copy link
Copy Markdown
Contributor

AI-assisted independent verification of f20c19b. Both portable run() tests passed on Linux, including the hung-child result. The two main() integration cases require native Windows and were skipped.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants