batch_glb: catch colliding output names before conversion #1750
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1750"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-25T11:14:16Z.
Claimed in the coordination issue as: BATCH-GLB-OUTPUT-NAME-COLLISION
What and why
The converter drops the final OBJ extension when naming the output. On a source that contains both
car.objandcar.OBJ, both workers therefore publishcar.glb. The old summary counted two successful exports. The batch now checks potentially colliding stems before starting any workers. It tests similar names in a temporary directory on the output volume, so distinct output spellings remain available where the filesystem supports them.Tested
On the baseline the duplicate-stem regression completed conversion instead of raising. On the branch it identifies both inputs, preserves an existing GLB, and leaves an unrelated output untouched. A second test checks case-distinct stems against the local volume. On Windows the test simulates the case-sensitive source directory listing.
python -I tests/test_batch_glb.pypassed all 18 tests on this branch (Windows, Python 3.14.7).git diff --checkand the repository game-data scan of all changed paths passed.bcaa13dapassed 6,287 semantic tests across 488 files.GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:19:56Z.
Review: COMMENTED
Independent check at "
c50c856b". Windows: all 18 batch tests passed. I ran the name check separately on a case-insensitive Windows directory and a case-sensitive local Linux filesystem under WSL. car.obj plus car.OBJ was rejected on both. car.obj plus CAR.OBJ was rejected only on the insensitive directory. Both probes left the original directory entry intact.AI-assisted review and CPU-only testing with synthetic inputs.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T11:38:18Z.
#1750 | head
c50c856bba(merged cleanly with main4a54aedcb) |python -I tests/test_batch_glb.py| red on main:FAILED (failures=2)(ValueErrornot raised on colliding stems or Windows NTFS case-insensitive volume aliasing) | green on PR+main:18 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_check_output_namesandbatch_convertintools/batch_glb.py(grouping normalized stems and probing exclusive file creation in a temporary subdirectory onout_dirbefore converting so colliding OBJ inputs fail up front without touching existing GLB outputs; directly exercised the Windows NTFS case-insensitive volume path intest_case_distinct_outputs_follow_the_destination_volume). Also verified clean merge (0conflicts) and combined execution with #1752 (20 tests OK; note a trivialimport-block context overlap intools/batch_glb.pyif merged alongside #1751), plustests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T03:13:56Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main
c8bf0e7b6, PR head780c38390: red 2 failures / green 22 OKpython3.12 -I tests/test_batch_glb.py(22 tests):git merge-tree).test_colliding_stems_leave_all_outputs_untouched,test_case_distinct_outputs_follow_the_destination_volume.git merge --no-ff): 22/22 OK, skipped 0. On this case-insensitive APFS volume the second test takes its "same GLB" branch.test_glb_inspect45 OK (1 skipped, Windows write protection),test_report_paths26 OK (1 skipped, needs Windows case sensitivity)._check_output_namesprobes name collisions in a temp dir insideout_dirbefore any write (out_diralready exists viamakedirs; a collision exits 2 through the existingexcept ValueError). Minor: the NFD/upper/casefold double normalisation is redundant but harmless. No game data.Verdict: READY
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-29T03:37:26Z.
Merging, thank you @kirigayakazima! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/1750#issuecomment-7249921773), and it still merges cleanly.
AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.