Shader checks: preserve subprocess diagnostics and validate probe output #1325
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1325"
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:53:39Z.
Claimed in the coordination issue as: GPU-CHECK-CLI-OUTPUT, GPU-CHECK-MESH-OUTPUT, GPU-CHECK-PROBE-JSON
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145499474
Reproduced all three failures on Windows before the change and verified all three afterward with synthetic subprocess output: invalid bytes in both streams for the ordinary and mesh paths, and JSON arrays/null plus a valid object for the capability probe. All 219 related unit tests and git diff --check passed. No GPU execution or game files. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:59:44Z.
Reviewed
dc64524: ran the three shader-check test files on the PR tree (87/64/6 OK) and main (88/68/6 OK); probes on both trees reproduce both fixed crashes — undecodable tool output kills main's check.run with an uncaught UnicodeDecodeError, and valid non-dict JSON in the probe answer makes main raise AttributeError at import; the PR keeps the log (\xNN escapes) and answers False (mesh path not run: no GPU). Non-blocking: the dict guard needs stdout contamination (the probe tool prints one ASCII JSON line), scripts/run_gpu_tests.py:364/379 keeps the same unguarded .get() (pre-existing, reproduced); a small regression test would pin the crashes. AI-assisted review.Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:39:52Z.
Verified by OreoFR
aa918e5d9+ PR headdc64524e4(merge --no-ff, no conflict)runtime/test/shaders/check.py:run()on a child writing cp1252-undecodable bytes to stdout and stderr with exit code 3, andbarycentric_fallback()with a probe answering a JSON array. Alsopython -I tests/test_shader_checks.py,tests/test_run_gpu_tests.py,tests/test_vk_subgroup_info.pyUnicodeDecodeErrorandrun()then raisesTypeError(exit code lost);barycentric_fallback()raisesAttributeErroron the listrun()returns 3 with the output kept (backslash-escaped);barycentric_fallback()returnsFalse. The three test files pass on both sides (88, 75, 57 tests)AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:12:22Z.
#1325 | head
dc64524e46(merged cleanly onto origin/main818d881b1f) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11)
runtime/test/shaders/check.py(errors="backslashreplace"onsubprocess.run(..., text=True)inbarycentric_fallback,run, andmesh_w64x_test, plusisinstance(answer, dict)guard on parsed JSON inbarycentric_fallback).python -I scripts/check_no_game_data.py runtime/test/shaders/check.pypassed (rc=0).cp1252preferred encoding,python -IwithoutPYTHONUTF8):origin/main818d881b1f):cp1252bytes (0x81,0x8d) on childstderrintocheck.run(...)raisedUnicodeDecodeError: 'charmap' codec can't decode byte 0x81insidesubprocess._readerthread, leavingr.stderr = Noneand crashingcheck.runwithTypeError: can only concatenate str (not "NoneType") to str.123) from the subgroup probe crashedcheck.barycentric_fallback()withAttributeError: 'int' object has no attribute 'get'.#1325 + origin/main):check.run(...)returned(1, 'diag:\\x81\\x8d\n')cleanly without losing diagnostics or crashing_readerthread.check.barycentric_fallback()on non-dict JSON (123) returnedFalsecleanly.python -I tests/test_shader_checks.py->88/88passed (OK,2.355s)python -I tests/test_run_gpu_tests.py->75/75passed (OK,3.021s)runtime/test/shaders/check.pyPR#1350(0conflicts).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T15:45:09Z.
Merged. Tested by @OreoFR on head
dc64524e4(RTX 4070 Laptop / Windows 11 (Python tool, CPU path)): Red on main: UnicodeDecodeError->TypeError in run(), AttributeError on non-dict JSON; green: returns 3 / False; 3 test f. Correction: no CI check run or commit status exists for this head, so CI did not validate it. My earlier sentence about red jobs was wrong. Thanks @delysidemanYT1!AI-assisted: yes