Repository navigation
gbuffer_census, navmesh_cell_fit, root_spill_census: a wrong input is one ERROR line, not a traceback - #952
Conversation
KernelSmoker
left a comment
There was a problem hiding this comment.
Verified on exact head 40f2414d47df58ad0dd578edf41d085ced0ada55. Focused Linux tests passed: test_gbuffer_census.py 4/4, test_navmesh_cell_fit.py 5/5, test_root_spill_census.py 21/21, test_tool_startup.py 2/2, test_text_write_line_endings.py 3/3, and test_docs_python_deps.py 3/3 (38 total). Python compile, check_no_game_data.py, and git diff --check passed. Synthetic wrong inputs only; no game data/GPU. The reported unrelated test_tool_stdout_encoding.py failure was not treated as part of this change and was not independently rerun.
|
Tested on Windows 11, Python 3.14.6, head 40f2414.
Merging current main conflicts only in AI-assisted (Claude Code) |
aslan2142
left a comment
There was a problem hiding this comment.
Reviewed against current main: normalizing wrong-input handling to a single ERROR line in tools/gbuffer_census.py, tools/navmesh_cell_fit.py, and tools/root_spill_census.py looks good, but this branch currently conflicts with main. Please rebase onto current main so CI runs cleanly.
(AI-assisted review.)
… one ERROR line, not a traceback
40f2414 to
51f94c8
Compare
|
Rebased onto current Local Linux verification (synthetic inputs, no game data):
|
Claimed in the coordination issue as: claiming: tools/gbuffer_census.py, navmesh_cell_fit.py and root_spill_census.py stop with a traceback on a wrong input (a file for the carve folder, a non-RPF archive, a non-UTF-8 index); print one ERROR line and exit 2 like the other tools. Tools only. AI-assisted.
What and why
tools/gbuffer_census.pygiven a file instead of ashader_carvefolder stopped withNotADirectoryError, and itsmain()never returned an exit code.tools/navmesh_cell_fit.pygiven a file that is not an RPF archive raised the rightValueErrormessage, but as a traceback.tools/root_spill_census.pygiven a JSON index that is not UTF-8, or a folder, stopped withUnicodeDecodeErrororIsADirectoryError.All three now follow
tools/navmesh_nodes.py:except (OSError, ValueError)printsERROR: ...and exits 2.Tested
On macOS 26.6.2 with Python 3.12.16, from the checkout root with
python -I:tests/test_gbuffer_census.py,tests/test_navmesh_cell_fit.py,tests/test_root_spill_census.py,tests/test_tool_startup.py,tests/test_text_write_line_endings.pyandtests/test_docs_python_deps.pypass. On Ubuntu 26.04 (WSL2) with Python 3.14.4 the first five of those pass;test_docs_python_deps.pywas not run there. Each new wrong-input test fails against the tool onmainand passes with the fix. Not run on real game files; the normal output is unchanged.tests/test_tool_stdout_encoding.pyfails on this branch as it does onmain, on both systems, listing onlytools/native_pso_hashes.py, which this pull request does not touch.GPUs tested: none (no GPU code changed)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.