native_pso_hashes: guard stdout like every other tool #948

Merged
leonida/mandy
barkodr merged 1 commit from fix/native-pso-stdout into main 2026-11-24 17:05:28 +00:00

Pull request successfully merged and closed

barkodr commented 2026-11-24 15:37:02 +00:00

Claimed in the coordination issue as: claiming: tools/native_pso_hashes.py has no stdout errors="replace" guard (added in 62a9588), so test_tool_stdout_encoding fails on main. Tools only. AI-assisted.

What and why

tools/native_pso_hashes.py was the only tool whose __main__ block did not set errors="replace" on stdout, so tests/test_tool_stdout_encoding.py failed on main. It now starts its __main__ block with the same guard as the other tools. Bram's 116de82f6 already fixed --help, so this pull request is only the stdout guard.

Tested

On macOS 26.6.2 with Python 3.12.16 and on Ubuntu 26.04 (WSL2) with Python 3.14.4, from the checkout root with python -I: tests/test_native_pso_hashes.py, tests/test_tool_stdout_encoding.py, tests/test_tool_startup.py, tests/test_text_write_line_endings.py and tests/test_docs_python_deps.py all pass on both. test_tool_stdout_encoding.py fails on main with only tools/native_pso_hashes.py listed and passes on this branch.

GPUs tested: none (no GPU code changed)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
Claimed in the coordination issue as: claiming: tools/native_pso_hashes.py has no stdout errors="replace" guard (added in 62a9588), so test_tool_stdout_encoding fails on main. Tools only. AI-assisted. ### What and why `tools/native_pso_hashes.py` was the only tool whose `__main__` block did not set `errors="replace"` on stdout, so `tests/test_tool_stdout_encoding.py` failed on `main`. It now starts its `__main__` block with the same guard as the other tools. Bram's 116de82f6 already fixed `--help`, so this pull request is only the stdout guard. ### Tested On macOS 26.6.2 with Python 3.12.16 and on Ubuntu 26.04 (WSL2) with Python 3.14.4, from the checkout root with `python -I`: `tests/test_native_pso_hashes.py`, `tests/test_tool_stdout_encoding.py`, `tests/test_tool_startup.py`, `tests/test_text_write_line_endings.py` and `tests/test_docs_python_deps.py` all pass on both. `test_tool_stdout_encoding.py` fails on `main` with only `tools/native_pso_hashes.py` listed and passes on this branch. GPUs tested: none (no GPU code changed) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
Poussistar commented 2026-11-24 15:58:55 +00:00

Independent check on Linux (4 vCPU, CPython 3.14.7): the diff applied to a clean worktree at main a28927849.

  • without the diff, python -I tests/test_tool_stdout_encoding.py → First extra element 0: 'tools/native_pso_hashes.py', Ran 4 tests … FAILED (failures=1)
  • with the diff, the same command → Ran 4 tests in 0.341s … OK

tools/native_pso_hashes.py is the only program that guard still lists, so this pull request turns that repository-wide red green. tests/test_native_pso_hashes.py and tests/test_text_write_line_endings.py also pass at this head. No game files, no GPU needed.

Independent check on Linux (4 vCPU, CPython 3.14.7): the diff applied to a clean worktree at `main` `a28927849`. - without the diff, `python -I tests/test_tool_stdout_encoding.py` → `First extra element 0: 'tools/native_pso_hashes.py'`, `Ran 4 tests … FAILED (failures=1)` - with the diff, the same command → `Ran 4 tests in 0.341s … OK` `tools/native_pso_hashes.py` is the only program that guard still lists, so this pull request turns that repository-wide red green. `tests/test_native_pso_hashes.py` and `tests/test_text_write_line_endings.py` also pass at this head. No game files, no GPU needed.
Sign in to join this conversation.
No description provided.