Batch export can overwrite a DDS or input profile with its JSON manifest #3278
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3278
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@wish131400 on GitHub · 2026-11-28 04:56 UTC · original
At
240e0fb9c460f24d51683abe2d4cce2800b136c1, the batch exporter permits its JSON manifest path to name a DDS requested by the same batch.For example, a batch selecting index 0 with output directory
outand--manifest out/tex_00000.ddsfirst exports that DDS, then replaces it with JSON when it publishes the manifest. The resulting manifest still reports success and a checksum for the DDS bytes that were replaced. A failed or skipped export can also lose an older DDS that the worker deliberately preserved.The synthetic fixture in
tests/ttpf_batch_export_check.pycan reproduce this without a texture pool or decoder: useMockTtpfModule, request index 0, and setmanifest_pathto the generatedtex_00000.ddspath. Indices 1 and 2 exercise the failed/skipped paths. Test each with and without an existing DDS. The current code accepts all six collisions.Expected behavior: reject the conflicting destination before starting any worker or creating output files. A manifest with the same filename in a separate directory should remain valid, and its recorded checksum should match the exported DDS.
The same final manifest writer can replace an input supplied with
--historyor--calibrationwhen--manifestnames that file. Synthetic valid-profile controls reproduce both cases: the exporter reads the profile, succeeds, then replaces the input JSON object with its results array. These collisions should also be rejected before loading the tools or beginning an export.Environment: Windows 10 build 19045, Python 3.14. All input data in the regression is constructed by the test. Related batch-export tracking: #458.