Skip to content

awc_shorts: stabilize case-distinct bank ordering across workers - #5529

Open
Solthodox wants to merge 1 commit into
ItsNotRexed:mainfrom
Solthodox:draft/shorts-catalog-order
Open

Solthodox wants to merge 1 commit into
ItsNotRexed:mainfrom
Solthodox:draft/shorts-catalog-order

Conversation

@Solthodox

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue: new shorts-catalog-order item.

What and why

On case-sensitive filesystems, bank names such as Music and music can share a stream ID. Sorting only by lowercase bank name and stream ID made shorts.csv depend on worker completion order. Use exact bank spelling as the tie-breaker. Repeated IDs within one bank retain their channel order.

No dependency on #2900. Its pre-existing conflict with the base is in per-bank export code, not the catalog sort.

Tested

Linux x86_64, CPython 3.12.13, synthetic inputs; no GPU or driver test. Before the fix, two real workers collected in reverse order produced a different CSV from the serial run. After the fix both files matched byte-for-byte. python3.12 -I tests/test_awc_shorts.py: 14 passed.

AI-assisted: yes (Codex).

Checklist

  • No game data, keys, or decryption.
  • No shader translator rule changed; the translator contract checklist does not apply.

Break ties between distinct bank spellings without reordering duplicate IDs from a single bank.

Verified on Linux x86_64 with Python 3.12.13: python3.12 -I tests/test_awc_shorts.py (14 passed). Synthetic inputs; no game data or GPU test.
AI-assisted.

@kacper-serewis kacper-serewis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI-assisted independent review. At 167859f all 14 tests passed on case-sensitive WSL. For case-distinct synthetic banks sharing a repeated stream ID, forcing either worker completion order yielded the same CSV and four Ogg files as the serial run. Every row referenced the expected bank, file, channel count and packet.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review at head 167859f7c (draft; Windows 11).

Commands:

python -I -m pytest tests/test_awc_shorts.py -q
git diff --check 3faac557b..HEAD

Results: 13 passed, 1 skipped, 6 subtests; diff --check clean.

The sort key becomes (bank.lower(), bank, stream): exact spelling breaks case-only ties deterministically, while repeated IDs within one bank keep the existing stable channel order. The doc note and the regression (serial vs reverse worker order byte-identical) match the code.

Verdict: approve.

@JRamos1993

Copy link
Copy Markdown
Contributor

Tested 167859f7 merged onto main 511e3826 on Windows 11, CPython 3.14.3, CPU only: pass.

  • python -I tests/test_awc_shorts.py: 15 tests OK (skipped=2).
  • Negative control (tools/awc_shorts.py from main, the PR's tests kept): the tests still pass.
  • py_compile on the 2 changed Python files: OK; git diff --check: clean.

No game files. AI-assisted (Claude Code).

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested 167859f7 on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main 713a949b: pass

  • python -I tests/test_awc_shorts.py: Ran 16 tests, OK. With only the non-test files reverted to main: FAILED (failures=1), so the new tests exercise the change.
  • compileall and scripts/check_no_game_data.py on the changed files: clean.

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047.

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.

5 participants