Scripts: decode coverage sweeps as UTF-8 #2650

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

@⁠luckyteagirl on GitHub · 2026-11-26 05:04 UTC · original
luckyteagirl:codex/coverage-sweep-utf8 → main · +22 −1 · 2 files · 1 commits · open

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.
  • git diff --check passed. The patch applies cleanly alongside the separate atomic baseline change in PR #2645. PR #2099 wraps the same subprocess call for OS errors and may need a small rebase if merged first.

Regression run

  • Not applicable. This changes only the Python coverage script and its test.

Not tested

  • A real shader pack sweep, Rust workspace tests, GPU tests, and retail title smoke.

AI use

  • Codex (GPT-6.2 Sol) implemented and tested the change; Codex reviewed the patch and prepared this description.
**@⁠luckyteagirl** on GitHub · 2026-11-26 05:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/2650) `luckyteagirl:codex/coverage-sweep-utf8` → `main` · +22 −1 · 2 files · 1 commits · open 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. - `git diff --check` passed. The patch applies cleanly alongside the separate atomic baseline change in PR #2645. PR #2099 wraps the same subprocess call for OS errors and may need a small rebase if merged first. **Regression run** - Not applicable. This changes only the Python coverage script and its test. **Not tested** - A real shader pack sweep, Rust workspace tests, GPU tests, and retail title smoke. **AI use** - Codex (GPT-6.2 Sol) implemented and tested the change; Codex reviewed the patch and prepared this description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:14:35 +00:00
This pull request can be merged automatically.
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/2650/head:github-bot/gh-2650'
git switch 'github-bot/gh-2650'

Merge

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