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
{{ message }}
Repository navigation
Read saved coverage reports with JSON encoding detection - #2669
coverage_gate.py --run-json rejected saved sweep reports with a UTF-8 or UTF-16 byte-order mark. Pass the file bytes to Python's JSON decoder so it can recognize the encoding.
What is in it
Load saved sweep reports from bytes.
Exercise plain UTF-8, UTF-8 with a byte-order mark, and UTF-16 with a byte-order mark against the same baseline.
Tested
The new test passed for plain UTF-8 and failed for both BOM formats on main b49be183.
python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows with Python 3.11.
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. #2099 changes the --run-json error handling but still uses read_text(encoding="utf-8"), and #2650 is about decoding the sweep's stdout. json.loads(bytes) detects UTF-8 with a BOM and UTF-16/32, so a report saved by Windows PowerShell with > (UTF-16LE) now loads. The test covers utf-8, utf-8-sig and utf-16.
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.
coverage_gate.py --run-jsonrejected saved sweep reports with a UTF-8 or UTF-16 byte-order mark. Pass the file bytes to Python's JSON decoder so it can recognize the encoding.What is in it
Tested
b49be183.python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows with Python 3.11.unsupportedcounter required by open PR Scripts: reject invalid shader coverage counters #2536; the three encoding cases pass with that PR's coverage gate applied.git diff --checkpassed.Regression run
Not tested
AI use