Skip to content

Scripts: decode coverage sweeps as UTF-8 - #2650

Open
luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/coverage-sweep-utf8
Open

luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/coverage-sweep-utf8

Conversation

@luckyteagirl

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant