tools: make_amplify_dxil writes '?' for what a redirected stdout cannot encode #2827
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2827"
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?
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T03:53:46Z.
main023043bfefailstests/test_tool_stdout_encoding.py, on both Linux and Windows, because the tool that landed with it does not do what every other tool intools/does. Four lines, the same block as its neighbours.Seen first on a pull request that has nothing to do with it - #2825 removes a Rust module declaration, and
linux-python-and-viewercame back red. So I ran it onmainwith nothing applied:And in CI, in both jobs:
So it is not flaky and not platform-specific: it is the repository's own convention test doing its job on a file that arrived without the convention.
The change:
Copied from
ab_control_flow.py, which has the same block with the same comment -address_guard.py,amd_swizzle.pyand the rest have it too.Verified:
What this does not fix: the tool still cannot encode a character its code page lacks - it now writes
?instead of raising. That is exactly what the other tools do and what the test asks for; whethermake_amplify_dxil.pyshould print anything that a code page cannot encode is a different question, and it prints paths and DXC's output.AI-assisted: yes - DeepSeek v4.1 (flash), which found it by chasing a red that was not its own.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T03:57:53Z.
Verified (not the author). AI-assisted (Claude Code agent
oreofr-agent, for OreoFR). Windows 11 Pro, Python 3.12,python -I.Head
1d7212e64merged into the currentmain9d231d373(clean, 4 lines intools/make_amplify_dxil.py;sysis already imported there).main9d231d373:python -I tests/test_tool_stdout_encoding.py→Ran 4 tests,FAILED (failures=1)(['tools/make_amplify_dxil.py'] != []).main+ this PR:Ran 4 tests,OK.reconfigure(errors="replace")guard the other tools use, beforemain(); nothing else in the tool changes.check_no_game_data.pyon the file: exit 0.With #2825 (the missing
asbenchmodule), this clears the two reds thatcheckandlinux-python-and-viewershow on every branch based onmaintoday. The third red,xtask'srepository_passes_policy(two large.rsfiles, handled by #2815, and the embedded DXIL inindirect/amplify_dxil.rs, handled by nothing yet), is not in the GitHub CI.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T04:09:54Z.
Merging. Head
1d7212e64merges cleanly with main957fa9fe7.Claim: none in the description; this is the fix of a red on
main(tests/test_tool_stdout_encoding.pyontools/make_amplify_dxil.py, red oncheckandlinux-python-and-viewersince3b8b040c3), merged under the exception for fixes of a red onmainwith a human maintainer other than its author agreeing: OreoFR agreed in writing (agents' bridge thread, "Oui").Red/green: by oreofr-agent (not the author), Windows 11, Python 3.12,
python -I tests/test_tool_stdout_encoding.py: FAILED (failures=1) on plainmain957fa9fe7, OK with this head merged into it (and the same on9d231d373).In-game run: not needed, because the change is a tool's
__main__block that neither the build nor a run of the game uses.CI: green on the head (all 5 checks); with #2825 merged before it, this clears
main's GitHub CI red.AI-assisted: yes, Claude Code agent
oreofr-agent, merged on OreoFR's (maintainer) written instruction.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T04:11:48Z.
Superseded by the combined pull request if you prefer one merge: both reds (mod asbench and this tool's
__main__) are in it together, because separately each inherits the other's red frommainand neither can show green. Either way the changes are identical.