bink_index: validate frame offsets within each stored stream #305

Closed
Andretuta wants to merge 1 commit from upstream-pr/305 into main
Andretuta commented 2026-11-24 03:05:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T03:05:05Z.


Carried over from old PR 10040 by Tiller431 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10040, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
Tiller431: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Coordination claim

What and why

The movie indexer can inventory a stream from its header even when the frame table points outside that stream. Add --validate-frames to check the table before publishing a report. It checks the table size, masks the keyframe bit and requires strictly increasing frame starts inside the payload. Diagnostics identify the stream and the first failed check. Default CSV and JSON output stays compatible.

Tested

  • On Windows with Python 3.13, all 22 RPF archives matched the Xbox 1.0.2.1 manifest by size and SHA-256. Four contained indexed Bink 2 streams. All 683,552 frame offsets in 797 streams passed (787 revision n, 10 revision j). This measures table structure. No decoding was involved.
  • All 41 indexer tests and all 10 playback-tool tests passed. On the movie archive, default and validated runs also produced byte-identical CSV and JSON on stdout. The adjacent naming suite has one Windows path-format assertion failure, reproduced on the unmodified base.
  • Python compilation, the changed-file game-data check and git diff --check passed. The translator suite ran 6,046 tests in 459 files with SPIRV-Tools 2026.4. Two files failed, test_exec_computed and test_image_atomics_guard. All 49 failing subcase IDs matched independent runs on the unmodified base at d083a2c.

AI-assisted: yes (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465303204 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/305). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T03:05:05Z. --- > Carried over from **old PR 10040** by `Tiller431` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10040`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `Tiller431`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): [Coordination claim](https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116913175) ### What and why The movie indexer can inventory a stream from its header even when the frame table points outside that stream. Add `--validate-frames` to check the table before publishing a report. It checks the table size, masks the keyframe bit and requires strictly increasing frame starts inside the payload. Diagnostics identify the stream and the first failed check. Default CSV and JSON output stays compatible. ### Tested - On Windows with Python 3.13, all 22 RPF archives matched the Xbox 1.0.2.1 manifest by size and SHA-256. Four contained indexed Bink 2 streams. All **683,552 frame offsets in 797 streams** passed (787 revision n, 10 revision j). This measures table structure. No decoding was involved. - All 41 indexer tests and all 10 playback-tool tests passed. On the movie archive, default and validated runs also produced byte-identical CSV and JSON on stdout. The adjacent naming suite has one Windows path-format assertion failure, reproduced on the unmodified base. - Python compilation, the changed-file game-data check and `git diff --check` passed. The translator suite ran 6,046 tests in 459 files with SPIRV-Tools 2026.4. Two files failed, `test_exec_computed` and `test_image_atomics_guard`. All 49 failing subcase IDs matched independent runs on the unmodified base at `d083a2c`. AI-assisted: yes (Codex).
aslan2142 commented 2026-11-24 19:18:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-24T19:18:48Z.


This carry-over of old upstream PR 10040 has been taken over in #1022, so I'm closing this draft as #17 describes. The branch old-pr/10040 stays.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7141912832 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/305#issuecomment-7141912832). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-24T19:18:48Z. --- This carry-over of old upstream PR 10040 has been taken over in #1022, so I'm closing this draft as #17 describes. The branch `old-pr/10040` stays. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

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!305
No description provided.