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

Open
github-bot wants to merge 1 commit from github-bot/gh-1310 into main AGit
Owner

@⁠delysidemanYT1 on GitHub · 2026-11-24 21:40 UTC · original
delysidemanYT1:gpu-runner-output-decode → main · +3 −1 · 1 files · 1 commits · open

Claimed in the coordination issue as: GPU-RUNNER-OUTPUT-DECODE
Claim: #14

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

**@⁠delysidemanYT1** on GitHub · 2026-11-24 21:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1310) `delysidemanYT1:gpu-runner-output-decode` → `main` · +3 −1 · 1 files · 1 commits · open Claimed in the coordination issue as: GPU-RUNNER-OUTPUT-DECODE Claim: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:46:56 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:58 UTC · original

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

**@⁠PierreEbele** on GitHub · 2026-11-25 14:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1310#issuecomment-7166113145) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1310/head:github-bot/gh-1310'
git switch 'github-bot/gh-1310'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1310'
git switch 'github-bot/gh-1310'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1310'
git switch 'github-bot/gh-1310'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1310'
git switch 'main'
git merge --squash 'github-bot/gh-1310'
git switch 'main'
git merge --ff-only 'github-bot/gh-1310'
git switch 'main'
git merge 'github-bot/gh-1310'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.