Repository navigation
tools: missing inputs are one ERROR line and exit 2 in five more tools - #6701
Conversation
|
Tested 1e8665e on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files): fail, the PR breaks the existing What I ran:
The failure:
Edge cases I ran by hand (empty folder or a non-PE file made by hand):
Nits, none blocking:
Overlap with other open PRs that put the same guard in the same tools:
AI-assisted (Claude Code). |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
Five tools (d3d12_guid_sites.py, gamedata_blobs.py, navmesh_cell_fit.py, psin_psch.py, root_spill_census.py) now check that their input path exists and return a clear exit-2 error instead of a traceback. The missing-input exit-code test list is extended to cover them.
Why merge
Missing inputs are routine CLI mistakes, and a consistent ERROR: cannot read ... with exit 2 keeps batch runs predictable. The shared test ensures each tool maintains that contract.
Verdict: Approve
SummaryFive tools ( Why mergeMissing inputs are routine CLI mistakes, and a consistent Verdict: Approve |
…Rexed#6701 ItsNotRexed#6701 made gamedata_blobs report a missing target as one "ERROR: cannot read ..." line with exit 2; this test still expected the older "error:" line and exit 1. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgEAspvdc9tB3AHyEa2Ef8
|
Post-merge heads-up from a routine first-arrival sweep against main dde82f2: your ERROR-line/exit-2 convention change did not reach tools/gamedata_blobs.py — the tool prints "ERROR: cannot read ..." with return 2 at :365, but tests/test_gamedata_blobs.py BadCarveIndexTest.test_missing_file_names_what_is_wrong (:290) still expects "error:" + exit 1. Reproduced on clean main: Ran 7, FAILED (failures=1). One-line fix either direction — update the test's expectations or keep the tool's message aligned — main has been red on this file since 22037f7 landed. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Claimed in the coordination issue as: #6603 (comment)
Five tools regressed (or never had) the BUILD-1046 contract: a nonexistent positional input must be one
ERROR:line and exit 2.tools/d3d12_guid_sites.pyFileNotFoundErrortraceback, exit 1tools/gamedata_blobs.pyerror: <path>: no such file or folder, exit 1tools/navmesh_cell_fit.pynavmesh_decode._scan_rpf, exit 1tools/psin_psch.pyerror: <path>, exit 1tools/root_spill_census.pyFileNotFoundErrortraceback, exit 1Each now checks the input exists before doing any work and prints
ERROR: cannot read <path>: ..., exit 2.tests/test_missing_input_exit_codes.pygains the five tools (it runs every listed tool with a nonexistent path and asserts exit 2, exactly oneERROR:line naming the path, no traceback).Tested:
python -I tests/test_missing_input_exit_codes.py-> 2 tests OK (17 tools);compileallclean;git diff --checkclean. Two commits (fixes, test list). No game data.AI-assisted.