bink_names: ignore commented-out movie mount entries #2451
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2451
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/bink-names-inactive-mount-entries"
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 successfully merged and closed
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
#2451 | head 46bd6c88bc8a4d70bef0ed50531f55b6b78999c9 (merged cleanly with main 09c153948) |
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.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 main 8b318bd).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)