mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1853] [MERGED] tools/ab_control_flow: handle UTF-8-SIG/CRLF inputs, subprocess encoding and atomic outcomes.tsv #1865
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1865
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1853
Author: @kirigayakazima
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/ab-control-flow-safety📝 Commits (1)
3a84ae7tools/ab_control_flow: handle UTF-8-SIG/CRLF inputs, subprocess encoding and atomic outcomes.tsv📊 Changes
2 files changed (+128 additions, -11 deletions)
View changed files
📝
tests/test_ab_control_flow.py(+90 -0)📝
tools/ab_control_flow.py(+38 -11)📄 Description
Claimed in the coordination issue as: AB-CONTROL-FLOW-CRLF-BOM-AND-ATOMIC-TSV (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163364385)
What and why
--namesandindex.jsonintools/ab_control_flow.pywithencoding="utf-8-sig"and parse--nameslines viasplitlines()+.strip()so UTF-8 BOMs and Windows CRLF endings do not corrupt shader names.outcomes.tsvatomically inwrite_outcomes()(tempfile.mkstempbesideos.path.realpath(...),os.fsync,published_mode, andreplace_retry.replace), preserving any existing file and cleaning up staging files on failure.encoding="utf-8", errors="replace"tosubprocess.run(..., capture_output=True, text=True)inrender_targets()andmain()for safe decoding underpython -I.tests/test_ab_control_flow.py.Tested
python -I tests/test_ab_control_flow.py -v->Ran 70 tests in 1.849s,OK (skipped=1)(Windows skipschmod 000test).upstream/main(98c2f777) baseline worktree with updatedtests/test_ab_control_flow.py->Ran 70 tests in 1.733s,FAILED (failures=2, errors=2, skipped=1).python -I tests/test_ci_registration.py->Ran 16 tests in 7.338s,OK.python -I tests/test_text_write_line_endings.py->Ran 3 tests in 14.354s,OK.python -I scripts/check_no_game_data.py tools/ab_control_flow.py tests/test_ab_control_flow.py,python -I -m compileall -q tools/ab_control_flow.py tests/test_ab_control_flow.py, andgit diff --check-> exit0.GPUs tested: n/a (CPU/stdlib Python tests on Windows 11 x64)
AI-assisted: yes
Checklist
needs rebase).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.