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

Merged
delysidemanYT1 merged 1 commit from upstream-pr/1310 into main 2026-11-28 08:03:02 +00:00
delysidemanYT1 commented 2026-11-24 21:40:50 +00:00 (Migrated from github.com)

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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480798775 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1310). Originally posted by [delysidemanYT1](https://github.com/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).
PierreEbele commented 2026-11-25 14:58:47 +00:00 (Migrated from github.com)

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166113145 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1310#issuecomment-7166113145). Originally posted by [PierreEbele](https://github.com/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
DadaCap commented 2026-11-28 08:03:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:03:05Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7236329479 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1310#issuecomment-7236329479). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T08:03:05Z. --- 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 reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1310
No description provided.