mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #2301] runtime/test/check_argv_modes.py: harden preflight, child errors, Win env strip, atomic report #2305
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2305
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2301
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/check-argv-modes-safety📝 Commits (1)
f311011runtime/test/check_argv_modes.py: add argv/preflight/timeout/env/atomic-report guards and unit tests📊 Changes
2 files changed (+228 additions, -9 deletions)
View changed files
📝
runtime/test/check_argv_modes.py(+95 -9)➕
tests/test_check_argv_modes.py(+133 -0)📄 Description
Claimed in the coordination issue as: CHECK-ARGV-MODES-ARGV-TIMEOUT-WIN-ENV-AND-ATOMIC-REPORT (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7192863145)
What and why
argv=Nonesupport tomain(argv=None) -> intinruntime/test/check_argv_modes.py.(subprocess.TimeoutExpired, OSError)inrun()so timed-out or missing child launches return structured error rows instead of aborting the suite with a traceback._strip_env_keys()soLEONIDA_GAME_DIRandLEONIDA_ARGV_SEQUENCEare removed case-insensitively on Windows (os.name == "nt")._preflight_paths()validating--loader,--fixtures,--work-dir, and--report(non-empty, non-trailing-separator, non-directory/symlink-dir, valid ancestors) upfront with argparse exit code2._write_report_atomic()to publish--reportvia sibling temp file, UTF-8newline="\n",fsync, POSIX mode preservation, and transient WindowsPermissionErrorretry.tests/test_check_argv_modes.py(cross-platform with mocked Windows helpers).Tested
python -I tests/test_check_argv_modes.py -v: 4 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails with 10 errors).python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q runtime/test/check_argv_modes.py tests/test_check_argv_modes.py, andgit diff --cached --check: passed.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.