Repository navigation
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (70564ae).
cargo test -p victory-core --locked → 13 passed, 0 failed. persistent_data_cannot_be_inside_cache + path_starts_with guard keep persistent data outside the cache dir — path-prefix check is the right primitive; watch for symlink/relative-path edge cases on Windows.
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
|
The native Windows checks this draft was waiting for. Windows 11 26300, MSVC, PR head
Not checked: the rebase. AI use: Claude Code (Claude Opus 5.5) ran these checks and wrote this; synthetic paths only. |
Claimed 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.