character_census: pass model dict in model_row, dedup mesh issues, trim paths, atomic writes (CHARACTER-CENSUS-ROW-AND-ATOMIC-IO) #1543
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1543
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/character-census-row-and-atomic-io"
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 successfully merged and closed
What changed
modelinstead of outputrowinmodel_row()(tools/character_census.py:model_row,_bones):model_row()previously passed the blank outputrowdictionary to_kind(),_bones(), and_skin_8(), causing top-levelIsFragment,HasBoneBindings,skin_8, andskin_influenceskeys in amodel.jsonto be silently ignored._bones()also avoids duplicating itsmodel/manifestcheck whenrow is model.tools/character_census.py:model_row):_mesh_count()runs up to three times (vertices, triangles, indices) over the samemesheslist, previously repeating identical"mesh N is not an object"and"mesh N index count is not a non-negative integer"issues on a single row.tools/character_census.py:_entry_path): strip surrounding whitespace from string/dict path entries and returnNonefor blank strings (""/" ") so blank entries are reported cleanly instead of resolved as filesystem paths.tools/character_census.py:write_csv,write_json,main): stage reports through sibling temp files with explicitnewline=, preserve permissions viafile_mode.published_mode, publish withreplace_retry.replace, enforceallow_nan=Falseon JSON output, clean up temp files on error, and catchValueErroralongsideOSErrorinmain().tests/test_character_census.py): added 4 synthetic regression tests covering every fix above.Claimed in the coordination issue as:
CHARACTER-CENSUS-ROW-AND-ATOMIC-IO(#14 reached GitHub's 2,500-comment cap with no successor coordination issue open yet; checked #14 and open PRs — 0 claims and 0 open PRs touchtools/character_census.py)How it was tested
python3 -I -W error tests/test_character_census.py: 27/27 passed (0 warnings).python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/character_census.py tests/test_character_census.py: passed.python3 -m compileall -q tools/character_census.py tests/test_character_census.py: passed.main:tools/character_census.py: all 4 new tests fail (FAILED (failures=3, errors=1)), all 23 baseline tests pass.Metadata
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 19 PRs (their tests, the tests importing the changed modules, the docs tests) on main 3ca0707: no new failure, Linux / Python 3.13.
AI-assisted (Claude Code, Claude Opus 5.5)