mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1500] dstorage_census: a wrong input is one ERROR line, not a traceback (DSTORAGE-CENSUS-WRONG-INPUT) #1529
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#1529
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/1500
Author: @levi2m
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/dstorage-census-wrong-input📝 Commits (1)
a5fbe68dstorage_census: a wrong input is one ERROR line, not a traceback (DSTORAGE-CENSUS-WRONG-INPUT)📊 Changes
2 files changed (+133 additions, -8 deletions)
View changed files
➕
tests/test_dstorage_census.py(+87 -0)📝
tools/dstorage_census.py(+46 -8)📄 Description
Claimed in the coordination issue as: DSTORAGE-CENSUS-WRONG-INPUT (claim)
Depends on: none
Fixes: none
What and why
tools/dstorage_census.pystopped with a Python traceback on a wrong input:FileNotFoundError) or is a folder (IsADirectoryError);[rt] ds-requestline with a missing field (KeyError: 'dest') or a malformed number (ValueErrorfromint(..., 16)), for example a trace cut off mid-line.Each is now one
ERROR:line on stderr and exit code 2, likerecomp_census(#1088). The census loop is unchanged:census()wraps it and turns aKeyError/ValueErrorinto aTraceErrorthat names the line number and the field.main()is split out of the__main__block so it can be tested; output and exit code 0 for a good trace are unchanged.Found by running every
tools/*.pyagainst a missing path, an empty file, a junk file and a folder. The other tools that traceback in that sweep (gbuffer_census,navmesh_cell_fit,root_spill_census) are covered by #952, so they are left alone.Tested
python -I tests/test_dstorage_census.py: 7 tests OK (new file: a good trace, missing field, malformed number, missing path, folder, truncated line, exit 0 on a good trace). With the old tool the same file fails 5 of 7.python -m compileall -q tools tests,tests/test_text_write_line_endings.py,tests/test_docs_cli_flags.py,tests/test_docs_links.py,tests/test_tool_stdout_encoding.py: OK.scripts/check_no_game_data.pyon both files: clean. Traces in the test are built by hand; no game files, no GPU.GPUs tested: n/a (CPU-only tool and test)
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.