GPU-RUNNER-OUTPUT-DECODE: keep diagnostics with undecodable bytes #1310

Merged
leonida/mandy
delysidemanYT1 merged 1 commit from gpu-runner-output-decode into main 2026-11-28 08:03:02 +00:00

Pull request successfully merged and closed

delysidemanYT1 commented 2026-11-24 21:40:50 +00:00

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).

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).
PierreEbele commented 2026-11-25 14:58:47 +00:00

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

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
DadaCap commented 2026-11-28 08:03:05 +00:00

Merged into main (merge commit 7734dc8e4), 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.

Merged into `main` (merge commit 7734dc8e4), 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._
Sign in to join this conversation.
No description provided.