Skip to content

awc_shorts: reject banks that share an export folder - #6775

Merged
shayderrr merged 2 commits into
ItsNotRexed:mainfrom
Solthodox:fix/shorts-bank-destination-collision
Nov 23, 2026
Merged

shayderrr merged 2 commits into
ItsNotRexed:mainfrom
Solthodox:fix/shorts-bank-destination-collision

Conversation

@Solthodox

@Solthodox Solthodox commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: four media-tool items on #6603, awc_shorts item.

What and why

On a case-sensitive input volume, clip.awc and clip.AWC are two banks but both export under clip/. With different synthetic packets under one ID the old CLI succeeded: its two CSV rows referred to the same .ogg, containing only one recording. Check the destination directories with the same path_key used by awc_opus before scheduling jobs. An ambiguous run now identifies both input paths without updating clips or the catalog. Distinct output folders keep their existing names.

Tested

AI-assisted: yes.

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here. All fixtures were synthetic.
  • Translator-rule contract: not applicable; no translator changes.

Check destination directories before starting workers so two banks cannot overwrite a clip and share one catalog path.
@kapitche

Copy link
Copy Markdown
Contributor

Tested fa1dbfb merged with main 1cc6e3c on Linux/Python 3.12.16: pass

Commands (fresh worktree of upstream/main with the PR head merged, ~/src/Leonida/.venv/bin/python -I tests/<file>):

  • tests/test_awc_shorts.py -> Ran 14 tests, OK (new test ran, not skipped: this ext4 volume is case-sensitive, so clip.awc and clip.AWC coexist)
  • tests/test_report_paths.py, test_awc_manifest.py, test_awc_markers.py, test_awc_names.py, test_awc_opus.py, test_runner_calls_all_tests.py: all exit 0

Negative control: git checkout upstream/main -- tools/awc_shorts.py (new test kept) -> test_bank_extensions_cannot_collapse_two_banks_into_one_export fails for jobs=1 and as a whole (failures=2); restoring the PR file makes it pass.

Diff read: the check runs before any clip or catalog write and returns 2, the test confirms the output folder only holds the pre-existing shorts.csv with unchanged bytes. The test skips on case-insensitive volumes (Windows/macOS defaults), so the guard is only exercised on case-sensitive filesystems; I did not run it on Windows.

@tikD1337

Copy link
Copy Markdown
Contributor

Tested fa1dbfbb0 on Windows 11 Home (Build 26200 x64), Python 3.13.0: pass

  • git diff --check HEAD~1..HEAD: clean
  • python -I -m compileall -q make_game.py tools scripts tests: exit 0
  • python -I make_game.py --help: exit 0
  • python -I tests/test_awc_shorts.py -v: 14/14 OK (0.765s, 1 skipped as expected on case-insensitive volume)
  • python -I scripts/check_no_game_data.py: clean, exit 0

AI-assisted. No game files.

@shayderrr shayderrr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary
tools/awc_shorts.py::main records each bank's output directory under its path_key and refuses the run when two banks map to one folder, identifying both inputs before any clip or catalog write; docs/awc_shorts.md and test_bank_extensions_cannot_collapse_two_banks_into_one_export cover it.

Why merge
Prevents clip.awc and clip.AWC from silently exporting two recordings into one .ogg on case-sensitive volumes. Test-backed correctness fix for the media tool.

Verdict: Approve

@shayderrr

Copy link
Copy Markdown
Collaborator

Summary
tools/awc_shorts.py::main records each bank's output directory under its path_key and refuses the run when two banks map to one folder, identifying both inputs before any clip or catalog write; docs/awc_shorts.md and test_bank_extensions_cannot_collapse_two_banks_into_one_export cover it.

Why merge
Prevents clip.awc and clip.AWC from silently exporting two recordings into one .ogg on case-sensitive volumes. Test-backed correctness fix for the media tool.

Verdict: Approve

@shayderrr
shayderrr merged commit 28a35da into ItsNotRexed:main Nov 23, 2026
0 of 2 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