bink_names: ignore commented-out movie mount entries #2451

Merged
kirigayakazima merged 1 commit from upstream-pr/2451 into main 2026-11-28 19:43:05 +00:00
kirigayakazima commented 2026-11-27 10:34:35 +00:00 (Migrated from github.com)

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_entries
  • python -I tests/test_gamedata_xml.py
  • Changed-path no-game-data scan and git diff --check passed.
  • Full Windows Bink naming suite has one pre-existing failure, 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

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5525152693 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2451). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-27T10:34:35Z. --- Claimed in the coordination issue as: [BINK-NAMES-INACTIVE-MOUNT-ENTRIES](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7215934316) ### 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_entries` - `python -I tests/test_gamedata_xml.py` - Changed-path no-game-data scan and `git diff --check` passed. - Full Windows Bink naming suite has one pre-existing failure, `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](https://github.com/ubiquitarianism/leonida/actions/runs/45977772928/job/140433726198). GPUs tested: N/A (CPU-only synthetic tests). AI-assisted: Yes. ### Checklist - [x] Based on current main and merges cleanly with the tested base. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract table: N/A.
MSedgeMC commented 2026-11-27 15:02:09 +00:00 (Migrated from github.com)

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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6090052931 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2451#pullrequestreview-6090052931). Originally posted by [MSedgeMC](https://github.com/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.
zmasi commented 2026-11-28 06:52:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T06:52:17Z.


#2451 | head 46bd6c88bc (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) and 37 tests OK (full suite) | Windows 11, Python 3.12.10 | AI-assisted: yes

Audited read_mount_lists in tools/bink_names.py (gamedata_xml.COMMENT_MARKUP.sub(b" ", data) before LIST_ENTRY.findall), and verified both PR + main (09c153948) and a combined main + #2451 + #2452 merge: git merge (ort) auto-merged tools/bink_names.py and tests/test_bink_names.py with zero conflicts (38 tests OK in tests/test_bink_names.py, 34 tests OK in tests/test_bink_index.py, 14 tests OK (skipped=1) in tests/test_gamedata_xml.py). Also passed tests/test_text_write_line_endings.py (3 OK), tests/test_runner_calls_all_tests.py (3 OK), and scripts/check_no_game_data.py.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7235569552 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2451#issuecomment-7235569552). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T06:52:17Z. --- #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`) and `37 tests OK` (full suite) | Windows 11, Python 3.12.10 | AI-assisted: yes Audited `read_mount_lists` in `tools/bink_names.py` (`gamedata_xml.COMMENT_MARKUP.sub(b" ", data)` before `LIST_ENTRY.findall`), and verified both `PR + main` (`09c153948`) and a combined `main + #2451 + #2452` merge: `git merge` (`ort`) auto-merged `tools/bink_names.py` and `tests/test_bink_names.py` with zero conflicts (`38 tests OK` in `tests/test_bink_names.py`, `34 tests OK` in `tests/test_bink_index.py`, `14 tests OK (skipped=1)` in `tests/test_gamedata_xml.py`). Also passed `tests/test_text_write_line_endings.py` (`3 OK`), `tests/test_runner_calls_all_tests.py` (`3 OK`), and `scripts/check_no_game_data.py`.
MoonEyes commented 2026-11-28 19:43:03 +00:00 (Migrated from github.com)

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 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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244752909 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2451#issuecomment-7244752909). Originally posted by [MoonEyes](https://github.com/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 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)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2451
No description provided.