tooling: reject TTPF manifest paths that overwrite DDS or profile inputs #3279
No reviewers
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!3279
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3277"
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:58 UTC · original
wish131400:tooling/ttpf-output-collisions→main· +110 −1 · 3 files · 1 commits · merged 2026-11-28 05:04 UTCThe batch exporter's final JSON manifest write can replace a requested DDS or an input history/calibration profile. For example, selecting index 0 with
--manifest out/tex_00000.dds -o outreports a successful export and then replaces the DDS with JSON, leaving the reported DDS checksum stale. A failed/skipped export can also lose a previously preserved DDS.Fixes #3278.
Reject manifest collisions with input profiles before loading the decoder tools, and with the selected DDS destinations before creating the output directory or starting workers. Reuse the existing resolved-path/file-identity comparison. The separate-directory control permits the same filename and verifies the exported bytes against the manifest checksum.
Validation on Windows 10, Python 3.14, based on
240e0fb9c460f24d51683abe2d4cce2800b136c1:python -B tests/ttpf_batch_export_check.py: 15 passed, 1 optional local integration test skipped.python -B tests/ttpf_batch_export_cli_check.py: 9 passed.git diff --checkpassed.The regressions use generated files and the existing mocked exporter. They do not require or include texture assets and do not establish image-decoding correctness. Refs #458.
@R0Y00 on GitHub · 2026-11-28 05:04 UTC · original · approved these changes
Independent review of
b60ed5ab. The guards reuse the resolved-path/file-identity check. Profiles are protected before the tools load, and requested DDS destinations are protected before directory creation or worker launch, including exports that would fail or skip. The separate-directory control preserves the DDS and matches its manifest checksum.On Windows,
python -B tests/ttpf_batch_export_check.pyreported 15 passes and one optional integration skip.python -B tests/ttpf_batch_export_cli_check.pypassed 9/9, and the docs-link check passed.