fix(core): keep persistent data outside the cache #1789
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1789
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1789"
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?
@dereoalex on GitHub · 2026-11-24 22:38 UTC · original
dereoalex:fix/keep-saves-out-of-cache→main· +99 −2 · 4 files · 2 commits · draftClaimed in the coordination thread.
Problem and fix
Effective configuration could place persistent data at or below the disposable cache. A synthetic probe with
VICTORY_DATA_DIRset to a child ofVICTORY_CACHE_DIRsuccessfully created the data subdirectory there. Clearing that cache could delete persistent storage.Validate the two configured paths after environment and file precedence has been applied, using the existing path resolver. Reject equal and nested data paths with an actionable error. The new tests cover an environment override and an adjacent directory with a similar name. This addresses configured overlap, complementary to the default-path changes in #708.
On Windows, canonicalization retains the spelling of path components that do not yet exist, so the original case-sensitive component check could miss a data path beneath a differently cased cache alias. The follow-up compares Windows components using case-insensitive UTF-16 ordinal comparison and adds a Windows-only regression fixture with a missing cache directory and a non-ASCII case alias. The check conservatively rejects case aliases even in Windows directories configured as case-sensitive.
Validation
cargo +1.98.1 test --offline --locked -p victory-core persistent_data_cannot_be_inside_cachefailed on the base as expected.cargo +1.98.1 test --offline --locked -p victory-corepassed all 13 tests on the candidate.cargo +1.98.1 clippy --offline --locked -p victory-core --all-targets -- -D warningspassed.cargo +1.98.1 clippy --offline --locked -p victory-core --all-targets --target x86_64-pc-windows-msvc -- -D warningspassed under Linux and type-checked the Windows-only regression test.cargo +1.98.1 xtask policypassed for all 174 tracked files.git diff --checkpassed.Draft pending the native Windows checks. The Linux workspace baseline fails with
victory-gpuE0425, tracked in #523. The Windows-only regression test was cross-checked and has not yet been run natively. All fixtures were synthetic.AI-assisted. An independent reviewer approved the original guard and its Windows follow-up.
@Marvisak on GitHub · 2026-11-25 01:36 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-core/src/config.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
@AgneyaK on GitHub · 2026-11-25 06:17 UTC · original
The native Windows checks this draft was waiting for. Windows 11 26300, MSVC, PR head
d09311e7(on its base70564ae, because it conflicts withmain):cargo test -p victory-core --locked: 14 passed, 0 failed, including the Windows-onlypersistent_data_cannot_use_a_case_alias_of_a_missing_cache(non-ASCIICachÉ/caché).config.rs:persistent_data_cannot_be_inside_cacheand the case-alias test fail, andadjacent_data_and_cache_directories_are_allowedpasses (12 passed, 2 failed).cargo clippy -p victory-core --all-targets --locked -- -D warnings: clean.resolvecanonicalises the existing ancestor, so both sides get the same\?\prefix.mklink /J alias cache, data =alias\saves). Also rejected, because canonicalisation follows the junction.Not checked: the rebase.
mainchangedconfig.rsby +20/−1 since70564ae, which is the conflict the triage names.AI use: Claude Code (Claude Opus 5.5) ran these checks and wrote this; synthetic paths only.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.