Read saved coverage reports with JSON encoding detection #2669

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

@⁠luckyteagirl on GitHub · 2026-11-26 05:41 UTC · original
luckyteagirl:codex/coverage-saved-json-bom → main · +28 −1 · 2 files · 1 commits · open

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.
  • The saved-report fixture includes the unsupported counter required by open PR #2536; the three encoding cases pass with that PR's coverage gate applied.
  • The combined source tree of #2536, #2650, #2653, and this amended head merged cleanly; its coverage tests passed 20/20.
  • git diff --check passed.

Regression run

  • Not applicable. The change affects only saved-report loading in a Python script.

Not tested

  • A live sweep, Rust/GPU tests, or a retail title run. The test uses saved synthetic reports.

AI use

  • Codex (GPT-6.2 Sol) implemented the change and test, verified behavior against main, and drafted this description.
**@⁠luckyteagirl** on GitHub · 2026-11-26 05:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2669) `luckyteagirl:codex/coverage-saved-json-bom` → `main` · +28 −1 · 2 files · 1 commits · open `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. - The saved-report fixture includes the `unsupported` counter required by open PR #2536; the three encoding cases pass with that PR's coverage gate applied. - The combined source tree of #2536, #2650, #2653, and this amended head merged cleanly; its coverage tests passed 20/20. - `git diff --check` passed. **Regression run** - Not applicable. The change affects only saved-report loading in a Python script. **Not tested** - A live sweep, Rust/GPU tests, or a retail title run. The test uses saved synthetic reports. **AI use** - Codex (GPT-6.2 Sol) implemented the change and test, verified behavior against main, and drafted this description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:15:04 +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/2669/head:github-bot/gh-2669'
git switch 'github-bot/gh-2669'

Merge

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