You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The direct coverage gate decodes XCL's redirected output with the Windows process locale. XCL writes UTF-8, so a shader name containing characters that are invalid in a local code page can raise UnicodeDecodeError before the gate reads the JSON report. Decode the sweep output as UTF-8 explicitly.
What is in it
Pass encoding="utf-8" to the live sweep subprocess.
Add a regression using UTF-8 output with Ł under a simulated CP1252 default.
Tested
On current main b49be183, the new regression raised UnicodeDecodeError (9 passed, 1 error in the coverage gate tests). On this branch, full Python script discovery passed 26/26 on Windows.
A Windows check with an existing debug xcl.exe, a nonexistent Ł.rpf, and CP1252 reproduced the old traceback. The fixed gate returned exit 2 and printed the Unicode path in the diagnostic without a decoding traceback. This was an error-path check, not a real shader sweep.
Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
No open or merged PR makes the same change. #2653 (Unicode line separators in sweep_json) and #2669 (--run-json read as bytes) fix other decoding paths of coverage_gate.py; #2253 is about empty sweeps.
No problems found in the diff: the mocked subprocess.run decodes with cp1252 unless encoding is passed, so the test would fail without the fix.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
staleNo activity for 3 days; closed 4 days later unless something happens
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The direct coverage gate decodes XCL's redirected output with the Windows process locale. XCL writes UTF-8, so a shader name containing characters that are invalid in a local code page can raise
UnicodeDecodeErrorbefore the gate reads the JSON report. Decode the sweep output as UTF-8 explicitly.What is in it
encoding="utf-8"to the live sweep subprocess.Łunder a simulated CP1252 default.Tested
b49be183, the new regression raisedUnicodeDecodeError(9 passed, 1 error in the coverage gate tests). On this branch, full Python script discovery passed 26/26 on Windows.xcl.exe, a nonexistentŁ.rpf, and CP1252 reproduced the old traceback. The fixed gate returned exit 2 and printed the Unicode path in the diagnostic without a decoding traceback. This was an error-path check, not a real shader sweep.git diff --checkpassed. The patch applies cleanly alongside the separate atomic baseline change in PR Scripts: replace coverage baselines atomically #2645. PR Scripts: harden coverage_gate CLI argument validation and error paths #2099 wraps the same subprocess call for OS errors and may need a small rebase if merged first.Regression run
Not tested
AI use