bink_names: reject duplicate stream locations before assigning names #2452
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!2452
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/bink-names-duplicate-stream-locations"
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-DUPLICATE-STREAM-LOCATIONS
What and why
Two index rows for one source and byte offset could assign separate names to the same physical movie. Check adjacent sorted, normalized stream locations and reject duplicates before publishing output. The regression covers a repeated offset across distinct sources (valid), slash variants within one source (duplicate) and preservation of a previous report.
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 duplicate_stream_locationspython -I tests/test_bink_index.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
#2452 | head 921212bc71c0cf1ad9f28ec9633fbf59e84318af (merged cleanly with main 6dfca6428) |
python -I tests/test_bink_names.py| red on main:-k test_duplicate_stream_locations_are_not_named_twiceFAILED (failures=1:0 != 1) | green on PR+main: Ran 37 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yesDiff reviewed across both touched files (
load_streamsnormalizes slashes, sorts by(source, offset), and rejects adjacent duplicate(source, offset)entries before writing--out;git merge origin/mainat6dfca6428applies cleanly, including#1792's Windows error-path fix so all 37/37 tests pass on Windows). Also verified on mergedPR+main:test_bink_index.py(34/34 OK),test_runner_calls_all_tests.py(3/3 OK),test_text_write_line_endings.py(3/3 OK),compileall,git diff --check, andscripts/check_no_game_data.py(clean).Red/green: tests/test_bink_names.py fails 1 assertion on main (duplicate stream locations get two 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)