translate: refuse VICTORY_FAIL_DUMP and VICTORY_DUMP_MATCH folders inside the repo too #264

Open
sharan104 wants to merge 1 commit from upstream-pr/264 into main
sharan104 commented 2026-11-26 13:35:47 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by sharan104 on 2026-11-26T13:35:47Z.


translate::run refuses a VICTORY_EMIT_DUMP folder inside the source tree (rule #1, docs/asset-policy.md). But two other switches write the title's containers as .cdxil too, and neither was checked:

  • VICTORY_FAIL_DUMP=<dir>: the first containers of each failure reason
  • VICTORY_DUMP_MATCH=<dir>;<text>|…: the containers whose line matches

With a relative folder, or one pointing into the checkout, the game-derived files landed in the repository. It's the same kind of gap as #33.

Fix: a new dumps_outside_repo(env) checks all three folders at the start of run, reading VICTORY_DUMP_MATCH the same way translate does (the part before ;). It replaces the single VICTORY_EMIT_DUMP check.

Test: every_dump_folder_inside_repo_is_refused takes the environment as a closure instead of setting real variables, so it can't race other tests. For each of the three switches, it checks that a folder in the repo is refused and a temp folder is accepted. It fails before the change and passes after it (10 runs out of 10).

Results:

  • cargo test -p victory --locked passes.
  • cargo clippy -p victory --all-targets --locked --no-deps -- -D warnings is clean, with and without --all-features.

🤖 Generated with Claude Code

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6627820875 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/264). Originally posted by [sharan104](https://github.com/sharan104) on 2026-11-26T13:35:47Z. --- `translate::run` refuses a `VICTORY_EMIT_DUMP` folder inside the source tree (rule #1, `docs/asset-policy.md`). But two other switches write the title's containers as `.cdxil` too, and neither was checked: - `VICTORY_FAIL_DUMP=<dir>`: the first containers of each failure reason - `VICTORY_DUMP_MATCH=<dir>;<text>|…`: the containers whose line matches With a relative folder, or one pointing into the checkout, the game-derived files landed in the repository. It's the same kind of gap as #33. **Fix:** a new `dumps_outside_repo(env)` checks all three folders at the start of `run`, reading `VICTORY_DUMP_MATCH` the same way `translate` does (the part before `;`). It replaces the single `VICTORY_EMIT_DUMP` check. **Test:** `every_dump_folder_inside_repo_is_refused` takes the environment as a closure instead of setting real variables, so it can't race other tests. For each of the three switches, it checks that a folder in the repo is refused and a temp folder is accepted. It fails before the change and passes after it (10 runs out of 10). **Results:** - `cargo test -p victory --locked` passes. - `cargo clippy -p victory --all-targets --locked --no-deps -- -D warnings` is clean, with and without `--all-features`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/264:upstream-pr/264'
git switch 'upstream-pr/264'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/264'
git switch 'upstream-pr/264'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/264'
git switch 'upstream-pr/264'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/264'
git switch 'main'
git merge --squash 'upstream-pr/264'
git switch 'main'
git merge --ff-only 'upstream-pr/264'
git switch 'main'
git merge 'upstream-pr/264'
git push origin 'main'
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
avatarmanz/VIctory-7900XTX!264
No description provided.