Skip to content

stage_timeline: set errors='replace' on stdout like the other tools (TOOL-STAGE-TIMELINE-STDOUT) - #2111

Closed
Tauwni wants to merge 1 commit into
ProjectLeonida:mainfrom
Tauwni:fix/stage-timeline-stdout
Closed

Tauwni wants to merge 1 commit into
ProjectLeonida:mainfrom
Tauwni:fix/stage-timeline-stdout

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #1608 (comment)

What and why

tests/test_tool_stdout_encoding.py fails on main for three tools whose __main__ block doesn't set errors='replace' on stdout. Under python -I, a redirected stdout is the strict ANSI code page on Windows, so one character it can't encode ends the tool. #1673 handles tools/compute_heap_layout_census.py and #1837 tools/game_run_summary.py. This PR handles the third, tools/stage_timeline.py (from ba626820e), with the same guarded sys.stdout.reconfigure(errors="replace") the other tools use.

Tested

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • No translator rule.

🤖 Generated with Claude Code

tests/test_tool_stdout_encoding.py fails on main for tools/stage_timeline.py
(from ba62682): under python -I a redirected stdout is the strict ANSI code
page on Windows, so a non-ASCII title string would end the tool. The other two
tools that test lists are handled by ProjectLeonida#1673 and ProjectLeonida#1837.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tauwni

Tauwni commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing: main already has this change. 4b10cbe91 ("game_run_summary, stage_timeline: set errors="replace" on stdout") sets it in tools/stage_timeline.py, so this branch no longer differs from main. tests/test_tool_stdout_encoding.py passes on main a73a57e13.

AI-assisted (Claude Code).

@Tauwni Tauwni closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant