bink_index: validate frame offsets on request #2221

Closed
github-bot wants to merge 1 commit from github-bot/gh-2221 into main AGit
Owner

@⁠whoalin1 on GitHub · 2026-11-26 06:49 UTC · original
whoalin1:bink-index-validate-frames → main · +146 −13 · 3 files · 1 commits · closed without merging

Summary

  • add --validate-frames to check each indexed Bink 2 stream's frame-offset table
  • reject unsupported revisions, truncated tables, offsets outside the stored stream, and non-increasing offsets before writing a report
  • preserve the existing inventory output when validation succeeds
  • document the check and the original whole-archive measurement

Item: BINK-INDEX-VALIDATE-FRAMES

This carries forward the still-uncarried fix in old-pr/10040, originally written by Tiller431, reapplied and verified on current main. The original measurement covered 683,552 frame offsets across 797 indexed streams in the 22 manifest-matching archives; this PR does not include or require any game data.

Tests

Under the local machine coordination lock:

  • control: the new synthetic validation tests fail on the unpatched indexer because frame_index_error does not exist
  • fixed: python -I tests/test_bink_index.py — 41 tests, OK
  • python -m compileall -q tools/bink_index.py tests/test_bink_index.py — pass
  • git diff --cached --check — pass

No game files or GPU.

AI-assisted with Devin.

**@⁠whoalin1** on GitHub · 2026-11-26 06:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2221) `whoalin1:bink-index-validate-frames` → `main` · +146 −13 · 3 files · 1 commits · closed without merging ## Summary - add `--validate-frames` to check each indexed Bink 2 stream's frame-offset table - reject unsupported revisions, truncated tables, offsets outside the stored stream, and non-increasing offsets before writing a report - preserve the existing inventory output when validation succeeds - document the check and the original whole-archive measurement Item: BINK-INDEX-VALIDATE-FRAMES This carries forward the still-uncarried fix in old-pr/10040, originally written by Tiller431, reapplied and verified on current main. The original measurement covered 683,552 frame offsets across 797 indexed streams in the 22 manifest-matching archives; this PR does not include or require any game data. ## Tests Under the local machine coordination lock: - control: the new synthetic validation tests fail on the unpatched indexer because `frame_index_error` does not exist - fixed: `python -I tests/test_bink_index.py` — 41 tests, OK - `python -m compileall -q tools/bink_index.py tests/test_bink_index.py` — pass - `git diff --cached --check` — pass No game files or GPU. AI-assisted with Devin.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:22:44 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:06 UTC · original

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_bink_index.py: 41 tests OK. The PR's test file against main's tools/bink_index.py: 46 errors, so the new tests fail on main and pass with the change. All tests/test_docs_*.py pass with the docs/movies.md change. compileall clean.

Note for review: the older open #1022 (OLD-10040, "bink_index: validate frame offsets within each stored stream") covers the same topic, so only one of the two should land.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7188920139) Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_bink_index.py: 41 tests OK. The PR's test file against main's tools/bink_index.py: 46 errors, so the new tests fail on main and pass with the change. All tests/test_docs_*.py pass with the docs/movies.md change. compileall clean. Note for review: the older open #1022 (OLD-10040, "bink_index: validate frame offsets within each stored stream") covers the same topic, so only one of the two should land. AI-assisted: yes (Claude Code)
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-26 13:05 UTC · original

Thanks for the overlap check. I agree only one of this and #1022 should land. This branch is open as the tested candidate, with regression coverage and the matching docs update; I am happy to close or reshape it if the maintainers prefer the older #1022. AI-assisted with Devin.

**@⁠whoalin1** on GitHub · 2026-11-26 13:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7192867123) Thanks for the overlap check. I agree only one of this and #1022 should land. This branch is open as the tested candidate, with regression coverage and the matching docs update; I am happy to close or reshape it if the maintainers prefer the older #1022. AI-assisted with Devin.
github-bot closed this pull request 2026-11-26 13:33:28 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-26 13:28 UTC · original

Closing in favor of the older #1022. On inspection #1022 already carries forward the same OLD-10040 fix with regression tests, docs, and a positive independent review, so keeping this duplicate open only adds review noise. Thanks to real-rusher for calling out the overlap.

**@⁠whoalin1** on GitHub · 2026-11-26 13:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7193404321) Closing in favor of the older #1022. On inspection #1022 already carries forward the same OLD-10040 fix with regression tests, docs, and a positive independent review, so keeping this duplicate open only adds review noise. Thanks to real-rusher for calling out the overlap.

Pull request closed

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