Scripts: accept UTF-8 BOM in PR checker file lists #2720

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

@⁠luckyteagirl on GitHub · 2026-11-26 08:20 UTC · original
luckyteagirl:codex/pr-check-files-bom → main · +23 −1 · 2 files · 1 commits · draft

On Windows, a UTF-8 BOM in the file list passed to scripts/pr_check.py --files becomes part of the first path. If that path is a runtime file, the checker misses it and can incorrectly accept a PR description with no required smoke runs. Decode the list with BOM detection.

What is in it

  • scripts/pr_check.py: read the file-list TSV as utf-8-sig, which also accepts ordinary UTF-8.
  • scripts/test_pr_check.py: run the local checker CLI with the same runtime-file row in plain and BOM-marked TSV files and require identical missing-smoke diagnostics.

Tested

  • Windows 11 Home build 26200, Python 3.11.9, Rust 1.99.0 MSVC; AMD Ryzen 9 5980HX and RX 6800M (driver 30.0.13002.13003), though this CPU-only fixture does not use the GPU.
  • Failing-first subprocess fixture on the parent commit: plain UTF-8 exited 1 with two missing-smoke diagnostics; BOM-marked UTF-8 incorrectly exited 0 with description ok.
  • python -B -m unittest discover -s scripts -p 'test_pr_check.py': 14 passed, 0 failed, exit 0.
  • python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, exit 0.
  • git diff HEAD^ HEAD --check: passed.

Not tested

  • The workspace GPU suite or a title smoke for this script-only change.

AI use

  • OpenAI Codex (GPT-6.2 Sol) reproduced the CLI bug, implemented the decode change and test, and ran the Python tests. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and reran all Python script tests; a second GPT-6.2 Sol agent independently checked the fixture and overlap with #2715.
**@⁠luckyteagirl** on GitHub · 2026-11-26 08:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/2720) `luckyteagirl:codex/pr-check-files-bom` → `main` · +23 −1 · 2 files · 1 commits · draft On Windows, a UTF-8 BOM in the file list passed to `scripts/pr_check.py --files` becomes part of the first path. If that path is a runtime file, the checker misses it and can incorrectly accept a PR description with no required smoke runs. Decode the list with BOM detection. **What is in it** - `scripts/pr_check.py`: read the file-list TSV as `utf-8-sig`, which also accepts ordinary UTF-8. - `scripts/test_pr_check.py`: run the local checker CLI with the same runtime-file row in plain and BOM-marked TSV files and require identical missing-smoke diagnostics. **Tested** - Windows 11 Home build 26200, Python 3.11.9, Rust 1.99.0 MSVC; AMD Ryzen 9 5980HX and RX 6800M (driver 30.0.13002.13003), though this CPU-only fixture does not use the GPU. - Failing-first subprocess fixture on the parent commit: plain UTF-8 exited 1 with two missing-smoke diagnostics; BOM-marked UTF-8 incorrectly exited 0 with `description ok`. - `python -B -m unittest discover -s scripts -p 'test_pr_check.py'`: **14 passed, 0 failed**, exit 0. - `python -B -m unittest discover -s scripts -p 'test_*.py'`: **26 passed, 0 failed**, exit 0. - `git diff HEAD^ HEAD --check`: passed. **Not tested** - The workspace GPU suite or a title smoke for this script-only change. **AI use** - OpenAI Codex (GPT-6.2 Sol) reproduced the CLI bug, implemented the decode change and test, and ran the Python tests. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and reran all Python script tests; a second GPT-6.2 Sol agent independently checked the fixture and overlap with #2715.
Read file lists with UTF-8 BOM detection so the first changed path is classified normally. Verify identical smoke diagnostics with and without the BOM.

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:29:24 +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/2720/head:github-bot/gh-2720'
git switch 'github-bot/gh-2720'

Merge

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