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.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Dec 1, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head cfc5192

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.

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

Labels

stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants