bink_index: validate frame offsets on request #2221

Closed
whoalin1 wants to merge 1 commit from upstream-pr/2221 into main
whoalin1 commented 2026-11-26 06:49:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T06:49:04Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5505394542 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2221). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-26T06:49:04Z. --- ## 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.
real-rusher commented 2026-11-26 10:06:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:06:37Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7188920139 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7188920139). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T10:06:37Z. --- 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)
whoalin1 commented 2026-11-26 13:05:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T13:05:42Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7192867123 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7192867123). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-26T13:05:42Z. --- 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 commented 2026-11-26 13:28:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T13:28:39Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7193404321 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2221#issuecomment-7193404321). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-26T13:28:39Z. --- 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

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