awc_shorts: refuse catalog paths that collide with inputs #2219

Closed
whoalin1 wants to merge 1 commit from upstream-pr/2219 into main
whoalin1 commented 2026-11-26 06:43:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T06:43:25Z.


Summary

  • refuse to write shorts.csv when that catalog path is also an input bank
  • refuse a bank export directory that collides with the catalog path
  • check both before creating or overwriting any output, and add regressions that the input bytes remain intact

Item: AWC-SHORTS-CATALOG-NO-CLOBBER

This carries forward the still-uncarried fix in old-pr/9927, originally written by neoisg8, reapplied and verified on current main.

Tests

Under the local machine coordination lock:

  • control: both new collision regressions fail on the unpatched tool because it exits 0
  • fixed: python -I tests/test_awc_shorts.py — 18 tests, OK (1 existing platform skip)
  • python -m compileall -q tools/awc_shorts.py tests/test_awc_shorts.py — pass
  • git diff --cached --check — pass

No game files or GPU.

AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5505332764 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2219). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-26T06:43:25Z. --- ## Summary - refuse to write `shorts.csv` when that catalog path is also an input bank - refuse a bank export directory that collides with the catalog path - check both before creating or overwriting any output, and add regressions that the input bytes remain intact Item: AWC-SHORTS-CATALOG-NO-CLOBBER This carries forward the still-uncarried fix in old-pr/9927, originally written by neoisg8, reapplied and verified on current main. ## Tests Under the local machine coordination lock: - control: both new collision regressions fail on the unpatched tool because it exits 0 - fixed: `python -I tests/test_awc_shorts.py` — 18 tests, OK (1 existing platform skip) - `python -m compileall -q tools/awc_shorts.py tests/test_awc_shorts.py` — pass - `git diff --cached --check` — pass No game files or GPU. AI-assisted with Devin.
DeadlyChirp commented 2026-11-26 10:02:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:02:22Z.


Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_awc_shorts.py: 17 passed, 1 skipped, 6 subtests passed. The skip is "input volume does not support case-distinct files", expected on NTFS.

(AI-assisted test run; output checked by hand.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7188825553 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2219#issuecomment-7188825553). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-11-26T10:02:22Z. --- Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_awc_shorts.py`: 17 passed, 1 skipped, 6 subtests passed. The skip is "input volume does not support case-distinct files", expected on NTFS. (AI-assisted test run; output checked by hand.)
real-rusher commented 2026-11-26 10:06:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:06:21Z.


Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_awc_shorts.py: 18 tests OK. The PR's test file against main's tools/awc_shorts.py: 2 failures, so the new tests fail on main and pass with the fix. compileall clean.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7188914313 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2219#issuecomment-7188914313). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T10:06:21Z. --- Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_awc_shorts.py: 18 tests OK. The PR's test file against main's tools/awc_shorts.py: 2 failures, so the new tests fail on main and pass with the fix. compileall clean. AI-assisted: yes (Claude Code)
DadaCap commented 2026-11-28 07:38:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T07:38:30Z.


Thanks for this! Closing it as a duplicate of #934 after a maintainer check that compared the two diffs commit by commit, not just the titles.

This pull request is an exact copy of #934 (the same diff, line for line), which is older. Keeping #934 so the fix lands once.

If you think something here is not covered by #934, say so and we'll reopen it.

AI-assisted (Claude Code), posted for DadaCap (maintainer).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7236070115 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2219#issuecomment-7236070115). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T07:38:30Z. --- Thanks for this! Closing it as a duplicate of #934 after a maintainer check that compared the two diffs commit by commit, not just the titles. This pull request is an exact copy of #934 (the same diff, line for line), which is older. Keeping #934 so the fix lands once. If you think something here is not covered by #934, say so and we'll reopen it. _AI-assisted (Claude Code), posted for DadaCap (maintainer)._

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2219
No description provided.