OLD-10040: bink_index: validate frame offsets within each stored stream #1022

Open
github-bot wants to merge 1 commit from github-bot/gh-1022 into main AGit
Owner

@⁠klikso on GitHub · 2026-11-24 17:00 UTC · original
klikso:carry/old-10040-bink-index-validate → main · +146 −13 · 3 files · 1 commits · open

Claimed in the coordination issue as: OLD-10040

What and why

Carries forward old-pr/10040 (draft #305) rebased onto current main:

  • Validates frame offsets within each stored Bink video stream in tools/bink_index.py.
  • Updates documentation in docs/movies.md.
  • Adds regression unit tests in tests/test_bink_index.py.

Original commit preserved: Tiller431 <[email protected]>.

Tested

  • python -I tests/test_bink_index.py: 41/41 passed
  • python -I scripts/check_no_game_data.py tools/bink_index.py tests/test_bink_index.py docs/movies.md: passed (no game data)
  • python -I tests/test_text_write_line_endings.py: passed
  • python -m compileall -q make_game.py tools tests: clean

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed: n/a (no translator rule).
**@⁠klikso** on GitHub · 2026-11-24 17:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1022) `klikso:carry/old-10040-bink-index-validate` → `main` · +146 −13 · 3 files · 1 commits · open Claimed in the coordination issue as: OLD-10040 ### What and why Carries forward `old-pr/10040` (draft #305) rebased onto current `main`: - Validates frame offsets within each stored Bink video stream in `tools/bink_index.py`. - Updates documentation in `docs/movies.md`. - Adds regression unit tests in `tests/test_bink_index.py`. Original commit preserved: `Tiller431 <22901311+[email protected]>`. ### Tested - `python -I tests/test_bink_index.py`: 41/41 passed - `python -I scripts/check_no_game_data.py tools/bink_index.py tests/test_bink_index.py docs/movies.md`: passed (no game data) - `python -I tests/test_text_write_line_endings.py`: passed - `python -m compileall -q make_game.py tools tests`: clean GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (no translator rule).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:33:59 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 07:01 UTC · original

Reviewed 77df8717:
ran tests/test_bink_index.py in the sandbox (41 OK on PR; 34 OK on main, 46 errors with PR's tests on main),
test_bink_names/test_report_source_collision/test_csv_line_endings OK on both trees, doc tests OK, and
check_no_game_data.py clean. frame_index_error() matches the documented canonical Bink 2 layout and exits 2
before writing on bad tables or unsupported revisions. Non-blocking note: parse_header()'s pre-existing 0x2C
fallback for i/j/k/n is untracked; if strictness is ever wanted, refuse fallback layouts in a follow-up.
AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 07:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1022#issuecomment-7155399308) Reviewed 77df8717: ran `tests/test_bink_index.py` in the sandbox (41 OK on PR; 34 OK on main, 46 errors with PR's tests on main), `test_bink_names`/`test_report_source_collision`/`test_csv_line_endings` OK on both trees, doc tests OK, and `check_no_game_data.py` clean. `frame_index_error()` matches the documented canonical Bink 2 layout and exits 2 before writing on bad tables or unsupported revisions. Non-blocking note: `parse_header()`'s pre-existing `0x2C` fallback for `i/j/k/n` is untracked; if strictness is ever wanted, refuse fallback layouts in a follow-up. AI-assisted review. **Recommendation:** Merge
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1022/head:github-bot/gh-1022'
git switch 'github-bot/gh-1022'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1022'
git switch 'github-bot/gh-1022'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1022'
git switch 'github-bot/gh-1022'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1022'
git switch 'main'
git merge --squash 'github-bot/gh-1022'
git switch 'main'
git merge --ff-only 'github-bot/gh-1022'
git switch 'main'
git merge 'github-bot/gh-1022'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.