Scripts: keep Unicode separators inside coverage JSON lines #2643
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2653"
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:05:30Z.
The coverage gate selects the last JSON record with Python
splitlines(), which also treats Unicode NEL and line/paragraph separators as line breaks. XCL can include these characters in a shader program name inside one valid JSON record, causing the gate to parse a fragment and fail. Split only at physical LF boundaries so report strings stay intact.What is in it
split("\n"); the existing trim still handles CRLF output.Tested
b49be183, the new regression failed for all three separators (9 tests passed, 1 test failed with 3 JSON errors). On this branch, full Python script discovery passed 26/26 on Windows Python 3.11.9 and Ubuntu under WSL Python 3.14.4.git diff --checkpassed. This patch applies cleanly over the separate coverage baseline and UTF-8 decoding changes in PRs #2645 and #2650.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:19Z.
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:34:54Z.
Triage (#1607) – head
fe5fe6cNo open or merged PR changes how
sweep_jsonsplits lines; the other open coverage_gate.py PRs (#2650, #2669, #2202, #2536, #2099) touch decoding, validation or the baseline, not this.str.splitlines()also breaks on U+0085/U+2028/U+2029, which serde_json emits unescaped inside strings, so splitting on\nand stripping keeps the report line whole; the test covers all three with CRLF output. No problems found in the diff.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:05:15Z.
merge-check
base:
1c8b551475head:
fe5fe6c75amerge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/coverage_gate.pyandscripts/test_coverage_gate.py, +10/-1)build: not run (Tier 0 Python script diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_coverage_gate.py" -v-> 10 passed, 0 failed (base1c8b5514: 9 passed; newtest_unicode_line_separators_in_report_stringspassed with 3 subtests);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 (+10/-1). Switching
stdout.splitlines()tostdout.split("\n")insweep_json(scripts/coverage_gate.py:27-28, followed byline.strip()) prevents Python from breaking JSON lines at embedded Unicode separators (U+0085,U+2028,U+2029) while still handling CRLF line endings cleanly. The new test covers all three separators with CRLF output. No problems found.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.