Repository navigation
leonida_tui's log names its newline; import_call_sites and world_drawable_lookup/verify guard stdout (lint tests red on main) - #7046
Conversation
tests/test_text_write_line_endings.py flagged the log file ItsNotRexed#1797 added to tools/leonida_tui.py (opened without newline=, so CRLF on Windows), and tests/test_tool_stdout_encoding.py flagged import_call_sites.py, world_drawable_lookup.py and world_drawable_verify.py, added today without the stdout reconfigure guard the other tools carry. f64_omod_probe.py (ItsNotRexed#6597) and bvh_slot_check.py (ItsNotRexed#6508) already have PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No blocking correctness issues found in the four-file diff. The changes correctly apply the repository’s text-output conventions, and the 35 targeted tests pass on Windows with CPython 3.13. The repository-wide lint suites still have two pre-existing failures outside this diff, detailed below.
The guards are appropriately confined to The replacement policy is intentionally lossy for human-readable stdout: an unrepresentable character may appear as Verification required no game files. The supplied Windows 11 / CPython 3.13 verification reports these checks passing:
Independent reruns with CPython 3.13.14 also passed the four targeted suites, compilation, help invocation, and game-data check. The targeted suites cover TUI logging and console behavior, synthetic PE import analysis, drawable candidate filtering, and verification joins and bounds checks. The raw-byte newline and CP1252 replacement checks described above also passed. The additional repository-wide checks remain red:
Both offending sites exist unchanged in the parent commit. Neither failure identifies a remaining violation in these four changed files. The targeted tests also do not establish subprocess-level coverage of every new entry-point guard; the encoding behavior check and repository-wide static guard check provide complementary evidence. A full green lint result should not be claimed for this revision. The diff complies with the project’s restrictions: it adds no game data or game-derived fixtures, introduces no keys, decryption or protection workarounds, and adds no online-service access. It follows the fix-don’t-disable rule by correcting output behavior while preserving validation and lint enforcement. No shader-translator rule or runtime contract changes, GPU/driver testing, or MSVC/Ninja build are needed for this Python-only change. AI-assisted. |
Claimed in the coordination issue: #6750 (comment)
What and why
Two repository-wide lint tests are red on
main(cb168f46) because of files merged today:tests/test_text_write_line_endings.pyflagstools/leonida_tui.py:753: the run log Speed up make_game by overlapping stages and showing progress. #1797 added is opened in text mode withoutnewline=, so it is CRLF on Windows. It now opens withnewline="\n"(CONTRIBUTING.md's rule for a file a tool writes).tests/test_tool_stdout_encoding.pyflagstools/import_call_sites.py,tools/world_drawable_lookup.pyandtools/world_drawable_verify.py, whose__main__blocks lack thesys.stdout.reconfigure(errors="replace")guard. Each gets the same guard and comment as the other tools (e.g.tools/bvh_index.py).Left to the PRs that already fix them:
tools/f64_omod_probe.py:268(#6597) andtools/bvh_slot_check.py(#6508). With those two, both tests pass.Tested
tests/test_text_write_line_endings.pyandtests/test_tool_stdout_encoding.py: only the two items above remain (they listed 2 and 4 onmain).tests/test_leonida_tui.py,test_import_call_sites.py,test_world_drawable_lookup.py,test_world_drawable_verify.py: pass.compileallandgit diff --checkclean.AI-assisted: yes (Claude Code).
🤖 Generated with Claude Code