Skip to content

Read saved coverage reports with JSON encoding detection - #2669

Open
luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/coverage-saved-json-bom
Open

luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/coverage-saved-json-bom

Conversation

@luckyteagirl

@luckyteagirl luckyteagirl commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

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
luckyteagirl marked this pull request as ready for review November 26, 2026 05:45
@luckyteagirl
luckyteagirl force-pushed the codex/coverage-saved-json-bom branch from 5000985 to 06e6c86 Compare November 26, 2026 06:06
rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
@github-actions

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 Nov 30, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 06e6c86

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.

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