ci: handle UTF-8 failure list encoding (CI-FAILURE-LIST-ENCODING) #652
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!652
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/652/head"
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?
@promise-ssss on GitHub · 2026-11-24 11:01 UTC · original
promise-ssss:codex/ci-failure-list-encoding→main· +27 −8 · 2 files · 1 commits · merged 2026-11-24 14:37 UTCClaimed in the coordination issue as: CI-FAILURE-LIST-ENCODING (claim)
What and why
ci_expected_failures.pyreads failure lists as UTF-8 with an optional BOM. A BOM used to become part of the first test name and turn an expected failure into a CI error. Invalid UTF-8 now produces a one-line input diagnostic and exit status 2. The regression tests use synthetic lists.Tested
Windows 11 build 26300, Python 3.12.10.
python -I -B tests/test_ci_expected_failures.py— 14 passed. Both new tests failed against the original implementation.python -m compileall -q make_game.py scripts tools tests— passed with a temporary bytecode cache.python -I -B tests/test_text_write_line_endings.py— 3 passed.python -I -B scripts/check_no_game_data.py scripts/ci_expected_failures.py tests/test_ci_expected_failures.pyandgit diff --check— passed.python -I -B scripts/run_semantic_tests.py tests/semantic --jobs 12 --timeout 300— 465 files, 6,105 tests reported, 3 failing files.test_sopc_validationandtest_unary_f16_validationrequirespirv-asandspirv-val, which are missing on this machine.test_mutationsexceeded 300 seconds. A sequential retry also reached its 600-second limit.python -I -B tests/test_tool_stdout_encoding.py— the same baseline assertion fails fortools/exe_sha.pyandtools/pr_conflict_label.py.GPUs tested: n/a
AI-assisted: yes (OpenAI Codex)
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (Not applicable.)@kirigayakazima on GitHub · 2026-11-24 11:49 UTC · original
Reviewed on Windows 11 x64 (
Python 3.14.7, CPU only, synthetic failure lists only — no game files) against head commit979e899e652a38ac7dfb6b16e80107cd56dc05f4.Verdict: Looks good — switching to
utf-8-sigand catchingUnicodeDecodeErrorwith exit code2cleanly prevents a UTF-8 BOM from corrupting the first failure name and keeps malformed input distinct from unexpected test failures.Checks run locally
main(21625bca):git merge-tree --write-tree upstream/main HEADexited0;git diff --check upstream/main...HEADclean.python -I tests/test_ci_expected_failures.py -v: 14 tests, OK.python -I tests/test_ci_registration.py: 15 tests, OK.python -I tests/test_text_write_line_endings.py: 3 tests, OK.python -I scripts/check_no_game_data.py scripts/ci_expected_failures.py tests/test_ci_expected_failures.pyandpython -m compileall -q scripts tests: exit0.Additional Windows edge-case probes
b"\xef\xbb\xbfknown\r\nother\r\n"): exited0when both are expected (::warning::lines emitted cleanly).0cleanly on status0, and exited1withthe test runner exited with 8 without naming a failed teston status8(did not treat the BOM as a failed test name).2cleanly with a single-line'utf-8' codec can't decode...diagnostic onstderrand no traceback.b"\xef\xbb\xbfa\n\xef\xbb\xbfb\n"): as expected forutf-8-sig, only a leading BOM is stripped (matching the docstring's"and an optional BOM").python -I, CP936 here): non-CP936 paths (\u2603) in error diagnostics usestderr'sbackslashreplacecleanly (exit2, noUnicodeEncodeError), and non-CP936 test names onstdoutdegrade cleanly viasys.stdout.reconfigure(errors="replace").(Note regarding the two missing-SPIRV-Tools semantic test failures mentioned in the PR description: #676 proposes separating those optional
spirv-as/spirv-valchecks on machines without SPIRV-Tools installed.)AI-assisted: yes