Repository navigation
Conversation
|
Tested b321bfe on Arch Linux, Python 3.14.10, CPU only: new test_probe_rejects_stream_truncated_after_scan passes (base tool invokes ffprobe on the short copy; fixed tool raises before it). File runs 32/33 — the 1 failure (test_a_single_named_file… expects the no-KB2 message) reproduces identically on a pristine base worktree: pre-existing #6917/#6925 wording drift, untouched by this one-line PR. No game files. AI-assisted. |
|
Independent Windows check at
The new regression covers the truncated-after-scan path and does not call |
devnull34
left a comment
There was a problem hiding this comment.
Verified: test_probe_rejects_stream_truncated_after_scan passes cleanly. Raising OSError when reading reaches EOF before stream copying finishes prevents partial/truncated stream files from leaking into probing. (Note: pre-existing line 411 failure on test_a_single_named_file_that_is_not_a_stream_or_rpf_is_refused is present on main due to the '(KB2)' substring change).
sds-228
left a comment
There was a problem hiding this comment.
Re-reviewed at the current head. A stream that shrinks after scanning now fails before ffprobe and removes the staged copy.
CPU-only verification: the new truncation test fails on the pre-change tool and passes here; the full file is 32/33 with one diagnostic-wording failure that is present on the parent too. Compile and no-game-data checks are clean.
AI-assisted (OpenCode).
|
Tested
AI-assisted review. |
If the source shrank between indexing and probing, the copy loop returned a partial stream to ffprobe. A probe that only needed the header could still report success. The copy now fails at premature EOF, removes the temporary file, and records the probe as failed.
The regression test writes and indexes a hand-built Bink header with synthetic payload, truncates the file by one byte, and verifies ffprobe is never called and staging is cleaned up.
Claimed in #7496, comment 7108083704.
Tested on Linux with Python 3.14.8, CPU only:
python3 -I tests/test_bink_index.py TestHeader TestScanAndWritepassed all 17 tests.python3 -I tests/test_bink_index.pypassed 32 of 33 tests. The diagnostic-wording failure also reproduces on the base commit and is covered by bink_index: one wording for both not-a-stream guards; repair the two tests #6917/#6925 left red #7092.python3 -I -m compileall -q make_game.py tools testspython3 -I scripts/check_no_game_data.py tools/bink_index.py tests/test_bink_index.pygit diff --checkAI-assisted with OpenAI Codex.