GPU-RUNNER-OUTPUT-DECODE: keep diagnostics with undecodable bytes #1310
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1310"
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 delysidemanYT1 on 2026-11-24T21:40:50Z.
Claimed in the coordination issue as: GPU-RUNNER-OUTPUT-DECODE
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145221122
Use backslashreplace with the existing host encoding for captured GPU runner subprocess output. Undecodable bytes are shown as escapes, and the process exit code and surrounding stdout/stderr stay available for the result and diagnostic.
Verified on Windows with a synthetic child that emits invalid UTF-8 bytes to both streams and exits 7. Before the fix, the pipe readers failed and the runner raised TypeError. After the fix, it retains code 7 and both messages. Normal ASCII dump parsing also passed, along with all 95 GPU runner unit tests and git diff --check. No GPU execution or game files. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:58:47Z.
Reviewed
aaf5926: ran the runner tests on the PR tree (64/6/87 OK) and current main (68/6/88 OK); a probe on both trees reproduces the fix — a tool printing undecodable bytes makes main's run_cmd raise an uncaught UnicodeDecodeError (suite dies, exit status lost) while the PR keeps rc 3 and the log with \xNN escapes. No finding in the change. Non-blocking: scripts/run_gpu_tests.py:366/381 still raise an uncaught AttributeError on valid non-dict JSON (pre-existing on main, reproduced), and no test exercises the real decode path, so a small regression test would pin it. AI-assisted review.Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:03:05Z.
Merged into
main(merge commit7734dc8e4), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
aaf592672).AI-assisted (Claude Code), posted for DadaCap.