Read saved coverage reports with JSON encoding detection #2659
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2669"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:41:12Z.
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 #2536; the three encoding cases pass with that PR's coverage gate applied.git diff --checkpassed.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:43:03Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:38:38Z.
Triage (#1607) – head
06e6c86No open or merged PR makes the same change. #2099 changes the
--run-jsonerror handling but still usesread_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.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:01:01Z.
merge-check
base:
1c8b551475head:
06e6c86d16merge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/coverage_gate.pyandscripts/test_coverage_saved_report.py, +28/-1)build: not run (Tier 0 Python script diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_coverage_saved_report.py" -v-> 1 passed, 0 failed (3 subtests coveringutf-8,utf-8-sig,utf-16; new test file);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pyon Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+28/-1). Passing
args.run_json.read_bytes()tojson.loads(scripts/coverage_gate.py:64) lets Python's JSON decoder detect UTF-8, UTF-8 with BOM, and UTF-16/UTF-32 (including files saved by Windows PowerShell redirection) without breaking plain UTF-8 inputs. Clean and minimal.performance: none (offline script in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.