bink_index: validate frame offsets on request #2221

Closed
leonida/mandy
whoalin1 wants to merge 0 commits from bink-index-validate-frames into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

whoalin1 commented 2026-11-26 06:49:04 +00:00

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.

## 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

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)

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

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.

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

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.

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.
Sign in to join this conversation.
No description provided.