scripts/ab_cpu.py: reconfigure stdout like the other tools (main red after #3486) #3488

Merged
leonida/mandy
MoonEyes merged 1 commit from fix/ab-cpu-stdout into main 2026-12-04 18:36:16 +00:00

Pull request successfully merged and closed

Member

main has been red since #3486: tests/test_tool_stdout_encoding.py (test_every_main_block_reconfigures_stdout) flags scripts/ab_cpu.py, whose __main__ block did not call sys.stdout.reconfigure(errors="replace") like the other tools. One line added.

Tested: python -I tests/test_tool_stdout_encoding.py: 4 OK; python -I tests/test_ab_cpu.py: 7 OK; check_no_game_data clean. Spotted by OreoFR's agent.

AI-assisted: Claude Opus 5.5 (Claude Code). Merged on Moon's written authorization (two maintainers); main is red, so this is the fix.

🤖 Generated with Claude Code

main has been red since #3486: `tests/test_tool_stdout_encoding.py` (`test_every_main_block_reconfigures_stdout`) flags `scripts/ab_cpu.py`, whose `__main__` block did not call `sys.stdout.reconfigure(errors="replace")` like the other tools. One line added. Tested: `python -I tests/test_tool_stdout_encoding.py`: 4 OK; `python -I tests/test_ab_cpu.py`: 7 OK; check_no_game_data clean. Spotted by OreoFR's agent. AI-assisted: Claude Opus 5.5 (Claude Code). Merged on Moon's written authorization (two maintainers); main is red, so this is the fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tests/test_tool_stdout_encoding.py requires every tool's __main__ block to
call sys.stdout.reconfigure(errors="replace").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.