audio_wav: fall back to decoder timing across Ogg sequence gaps #2460
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2460"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-27T11:09:46Z.
Claimed in the coordination issue as: AUDIO-WAV-DISCONTINUOUS-PAGE-TIMING
What and why
Only derive a WAV trim length from the final Ogg granule when the page numbers advance consecutively within the stream. On gaps and repeated numbers, return the existing decoder-timing fallback. Cover a valid stream, missing and repeated page numbers, and 32-bit rollover. The page sequence field is described in RFC 3533, section 6.
Tested
Windows, Python 3.14.7. The added regression failed on the parent and passed with this change.
python -I tests/test_audio_wav.pygit diff --checkpassed. Shared main baseline: 6,374 semantic tests passed across 500 files.GPUs tested: N/A (CPU-only).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T14:48:35Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_audio_wav -v -> 44 tests OK (4 skips), including the new decoder-timing fallback cases for Ogg sequence gaps. Not approving yet: the branch is 613 commits behind current main, so a merge would bring in unrelated history. Please rebase and re-run the suite.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T03:13:39Z.
#2460 | head
bddbf24ee8(merged cleanly with main02f71ccfe) |python -I tests/test_audio_wav.py| red on main: FAILED (failures=2, skipped=5) in 44 tests (seqs=(0, 2, 3)andseqs=(0, 1, 1)returned 960 instead of 0) | green on PR+main: Ran 44 tests, OK (skipped=5) | Windows 11, Python 3.12.10 | AI-assisted: yesDiff reviewed across both touched files (
(sequence + 1) & 0xffffffffchecks contiguous RFC 3533 page numbering including 32-bit rollover, andgit merge origin/mainat02f71ccfeapplies cleanly with zero conflicts). Also verified on mergedPR+main:python -I tests/test_awc_opus.py(61/61 OK),python -I tests/test_runner_calls_all_tests.py(3/3 OK),python -I tests/test_text_write_line_endings.py(3/3 OK),git diff --check, andscripts/check_no_game_data.py(clean).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:43:51Z.
Red/green: tests/test_audio_wav.py fails 2 assertions on main (explicit trim applied across Ogg page sequence gaps) and passes with the PR (cloud run on main
7daa4a4).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)