bink_index: validate frame offsets within each stored stream #305

Closed
github-bot wants to merge 1 commit from gh-pr/305/head into gh-pr/305/base
Owner

@⁠Andretuta on GitHub · 2026-11-24 03:05 UTC · original
ubiquitarianism:old-pr/10040 → main · +146 −13 · 3 files · 1 commits · closed without merging

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

**@⁠Andretuta** on GitHub · 2026-11-24 03:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/305) `ubiquitarianism:old-pr/10040` → `main` · +146 −13 · 3 files · 1 commits · closed without merging > 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:52:42 +00:00
github-bot closed this pull request 2026-11-26 08:52:42 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 19:18 UTC · original

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

**@⁠aslan2142** on GitHub · 2026-11-24 19:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/305#issuecomment-7141912832) 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

This discussion has been locked. Commenting is limited to contributors.
No description provided.