Commit Graph

21 Commits

Author SHA1 Message Date
2948cf3e49 awc_shorts: refuse a catalog collision before creating the output folder
Review follow-up from #934: the bank export directory check ran after
os.makedirs, so a refused run left an empty output folder. Both
collision checks now run first, and a test checks that out/ is not
created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:47:43 +01:00
92c713e762 Merge commit 'refs/pr-all/934' into carry/934
# Conflicts:
#	tests/test_awc_shorts.py
2026-12-02 10:47:42 +01:00
dc4c32ac9d awc_shorts: refuse a catalog destination that aliases an input bank
ools/awc_shorts.py previously published <out>/shorts.csv without
checking whether the catalog path collided with an input bank. When
an input was named shorts.csv or exported into a directory of that
name, publishing the catalog replaced the source input file with CSV
output and exited 0.

Verify upfront using same_report_path() that <out>/shorts.csv does
not alias any input bank or bank export destination directory, refusing
the collision with error diagnostic and exit code 2 before creating
directories or exporting clips.

Add regression tests covering input bank and directory export collisions.

AI-assisted: yes.
(cherry picked from commit 2496beffe5)
2026-11-24 10:03:06 -05:00
33b40294a7 awc_shorts: restore write mode before unlink on replace failure and publish mode on Windows (AWC-SHORTS-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
2026-11-24 16:45:24 +03:00
3145425da3 awc_shorts: stage shorts.csv with replace_retry so a write failure keeps the previous catalog
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 23:10:16 +01:00
7541333a08 awc_shorts: name a missing source as typed, not through repr() (EGEN-AWC-SHORTS-PATHREPR) (#6647)
Squash-merged after diff review of PR #6647
2026-11-23 11:07:04 -06:00
55ba30c2ae Report directory scan failures in AWC shorts export (#6664)
Squash-merged after diff review of PR #6664
2026-11-23 11:02:28 -06:00
28a35da41d awc_shorts: reject banks that share an export folder (#6775)
Squash-merged after diff review of PR #6775 - awc_shorts: reject banks that share an export folder
2026-11-23 09:56:30 -06:00
51931245d5 docs: point 15 more tools at their --help usage line (#5535)
Squash-merged after review of PR #5535 - docs: point 15 more tools at their --help usage line
2026-11-23 08:09:32 -06:00
0036be36e8 Merge upstream main into codex/awc-shorts-duplicate-channels 2026-11-22 21:04:44 +01:00
4e50e3a54f fix(assets): preserve duplicate short audio channels
A streamed-music bank can reuse a channel ID. Shared filenames then overwrite an earlier clip and leave both catalog rows pointing to the last stream.
2026-11-22 19:30:28 +01:00
ec9a99c69e tools: a process pool gets at most 61 workers on Windows
Windows waits on a pool's workers with WaitForMultipleObjects, which takes
at most 64 handles. With --jobs 62 or more, awc_opus.py, awc_shorts.py,
world_lights_paths.py and world_build.py stopped with "ValueError:
max_workers must be <= 61" (ProcessPoolExecutor), and anim_clips.py
(multiprocessing.Pool) printed "ValueError: need at most 63 handles" from
a helper thread and never returned: 62 workers were killed after 60 s where
61 finish in 0.8 s (Windows 11, Python 3.12.5).

awc_opus.py and awc_shorts.py default --jobs to half the CPU count, and
make_game.py hands its own --jobs to awc_opus.py, so a machine with 124
logical CPUs reached this with no option given.

tools/pool_workers.py holds the limit, and the five pools are created with
process_workers(jobs): unchanged elsewhere, 61 at most on Windows. The
job count is lowered rather than refused so that a build with a large
--jobs keeps running. world_census.py, which refuses --jobs above 61, is
not changed.

tests/test_pool_workers.py runs each tool's own code: with the limit
patched in and a recording pool (every platform), the audio tools from the
command line with --jobs 62, and the real pool with 62 jobs on Windows.
8 of its 10 tests fail on the tools as they were.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:54:49 -05:00
89cf18645e Merge pull request #1428 from Dominik 2026-11-22 06:38:01 -05:00
f698bf2206 tools: a path outside the console's code page no longer crashes a tool's output
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").

tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:27:00 +00:00
a3e207d1e9 awc_shorts.py: preserve the clip catalog after I/O failures 2026-11-22 12:15:41 +01:00
5ac4a5436e Merge pull request #1168 from Tayar 2026-11-22 03:14:20 -05:00
8bf86f19af awc_shorts: reject nonpositive worker counts 2026-11-22 04:51:07 -03:00
5451bf28eb awc_shorts: a truncated bank is skipped, not a struct.error traceback
parse_awc raises struct.error on a bank shorter than its header claims.
awc_shorts caught ValueError, OSError and IndexError around each bank but
not struct.error, so one truncated bank ended the run with a traceback and
shorts.csv was never written. It is reported and skipped like the other
malformed banks now, in the serial and the pool path, as awc_manifest and
awc_opus already do.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 14:12:22 +07:00
b8f15fac5f awc_shorts.py: a missing source or a NaN duration bound fails before export
A source path that did not exist printed a skip line, exited 0 and replaced an
existing shorts.csv with a header-only file. A NaN --min-seconds or
--max-seconds passed the range check (every NaN comparison is false), so the
run exited 0 with every clip filtered out.

Both are now one-line errors with exit 2, checked before the output folder is
created. Two regression tests in tests/test_awc_shorts.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:11:58 +01:00
0d6e7d70a3 awc_shorts.py: preserve nested bank paths in clip exports 2026-11-22 00:16:36 +01:00
58ebeccef0 Tools: export short streamed-music idents by duration 2026-11-21 22:05:28 +00:00