mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #952] gbuffer_census, navmesh_cell_fit, root_spill_census: a wrong input is one ERROR line, not a traceback #990
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#990
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/952
Author: @barkodr
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/census-tools-wrong-input📝 Commits (1)
40f2414gbuffer_census, navmesh_cell_fit, root_spill_census: a wrong input is one ERROR line, not a traceback📊 Changes
6 files changed (+112 additions, -13 deletions)
View changed files
📝
tests/test_gbuffer_census.py(+27 -0)📝
tests/test_navmesh_cell_fit.py(+18 -0)📝
tests/test_root_spill_census.py(+33 -0)📝
tools/gbuffer_census.py(+11 -3)📝
tools/navmesh_cell_fit.py(+11 -6)📝
tools/root_spill_census.py(+12 -4)📄 Description
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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.