bink_names: ignore commented-out movie mount entries #2451
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2451"
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 ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-27T10:34:35Z.
Claimed in the coordination issue as: BINK-NAMES-INACTIVE-MOUNT-ENTRIES
What and why
Movie-looking filenames in XML comments could enter the ordered list and shift subsequent stream assignments. Mask comments, CDATA and processing instructions with the lexical matcher already used by gamedata_xml before looking for filename elements. The regression puts a phantom movie between two active ones and checks each kind of non-element markup.
Tested
Windows, Python 3.14.7. The regression reproduced on the parent and passed with the change.
python -I tests/test_bink_names.py -k inactive_mount_entriespython -I tests/test_gamedata_xml.pygit diff --checkpassed.test_unreadable_mount_directory_preserves_the_report, due to the escaped separators in the rendered PermissionError. Reproduced on the unmodified base.The integrated checkout passed 6,374 semantic tests across 500 files. CI's macOS job failed in the calibrated-texture replacement test, as it did on the unchanged main baseline.
GPUs tested: N/A (CPU-only synthetic tests).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:02:09Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_bink_names -v -> 37 tests OK, including the new commented-out movie-mount cases. Not approving yet: the branch is 606 commits behind current main and overlaps tests/test_bink_names.py with PR #2452, so both need rebasing onto main before a final diff can be reviewed.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T06:52:17Z.
#2451 | head
46bd6c88bc(merged cleanly with main09c153948) |python -I tests/test_bink_names.py -k test_inactive_mount_entries_do_not_shift_names && python -I tests/test_bink_names.py| red on main:FAILED (failures=3)(['A.bk2', 'B.bk2', 'C.bk2'] != ['A.bk2', 'C.bk2']across XML comment, CDATA, and PI cases) | green on PR+main:1 test OK(-k) and37 tests OK(full suite) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
read_mount_listsintools/bink_names.py(gamedata_xml.COMMENT_MARKUP.sub(b" ", data)beforeLIST_ENTRY.findall), and verified bothPR + main(09c153948) and a combinedmain + #2451 + #2452merge:git merge(ort) auto-mergedtools/bink_names.pyandtests/test_bink_names.pywith zero conflicts (38 tests OKintests/test_bink_names.py,34 tests OKintests/test_bink_index.py,14 tests OK (skipped=1)intests/test_gamedata_xml.py). Also passedtests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:43:03Z.
Red/green: tests/test_bink_names.py fails 3 subtests on main (commented, CDATA and PI movie entries shift names) and passes with the PR (cloud run on main
7daa4a4, re-run on Windows against main8b318bd).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)