Skip to content

awc_opus: preserve music channels with colliding stream IDs - #2456

Merged
MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
kirigayakazima:codex/awc-music-channel-output-collisions
Nov 28, 2026
Merged

MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
kirigayakazima:codex/awc-music-channel-output-collisions

Conversation

@kirigayakazima

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: AWC-MUSIC-CHANNEL-OUTPUT-COLLISIONS

Depends on: #2145 (textual conflict around the music output path; apply skip-existing to the allocated stem when combining).

What and why

The music path previously named every file for its numeric ID. A later music channel or standalone stream could overwrite an earlier channel, and the inventory collapsed matching rows. Reserve existing standalone names, assign numbered stems to colliding music channels in encounter order, and use the same naming rule in the inventory. A synthetic bank with three colliding IDs now keeps the three distinct payloads and three manifest entries.

Tested

Windows, Python 3.14.7. The added regression failed on the parent and passed with this change.

  • python -I tests/test_awc_manifest.py
  • python -I tests/test_awc_opus.py
  • Changed-path game-data scan and git diff --check passed. Shared main baseline: 6,374 semantic tests passed across 500 files.

GPUs tested: N/A (CPU-only).

AI-assisted: Yes.

Checklist

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.

@MSedgeMC MSedgeMC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on the PR branch: python3 -m unittest tests.test_awc_opus -v -> 61 tests OK, including the new music-channel collision cases. Not approving yet: the branch is 613 commits behind current main and shares tools/awc_opus.py with PR #2457, so a rebase is needed before reviewing the combined diff.

@zmasi

zmasi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

#2456 | head 6cd9392 (merged cleanly with main 6dfca64) | python -I tests/test_awc_manifest.py && python -I tests/test_awc_opus.py | red on main: test_awc_manifest FAILED (failures=1, skipped=2: ['00000030'] != ['00000030', '00000030~2', '00000030~3']) in 24 tests | green on PR+main: test_awc_manifest 24 tests OK (skipped=2); test_awc_opus 61 tests OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Diff reviewed across all 3 touched files (next_export_stem keeps standalone and colliding streamed-music stems aligned between awc_opus.py and awc_manifest.py, and combining #2457 + #2456 together onto main 6dfca6428 auto-merges tools/awc_opus.py with 0 conflicts and passes all 62 + 24 tests; note open draft #2145 still touches the neighbouring export_bank path as noted in Depends on). Also verified on merged PR+main: test_audio_wav.py (43/43 OK, skipped=5), test_runner_calls_all_tests.py (3/3 OK), test_text_write_line_endings.py (3/3 OK), compileall, git diff --check, and scripts/check_no_game_data.py (clean).

@MoonEyes

Copy link
Copy Markdown
Collaborator

Red/green: classified READY by oreo-lot3 (red on main b1619e0, green on head merged with main); head 6cd9392 unchanged since 2026-11-27, before that run.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

@MoonEyes
MoonEyes merged commit 0cda54c into ProjectLeonida:main Nov 28, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants