fix(victory): create cache/pipelines in warm on a clean cache (#497) #507

Merged
Lewandox merged 1 commit from upstream-pr/507 into main 2026-11-27 15:42:18 +00:00
Lewandox commented 2026-11-27 14:50:21 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by Lewandox on 2026-11-27T14:50:21Z.


Change

Fix victory warm failing on a clean first-run cache with Error: The system cannot find the path specified. (os error 3) (ERROR_PATH_NOT_FOUND), which aborts anyxboxx-launcher (== Warming the shader cache == → == finished, exit code 1 ==) and anyxboxx run --warm / --precompile before the game ever runs:

  • In third_party/victory/apps/victory/src/warm.rs, folder() previously called cfg.cache_subdir("shaders")?.with_file_name("pipelines"), creating <cache>/shaders while leaving <cache>/pipelines non-existent on a fresh machine where no game run has recorded pipelines yet.
  • Opening <cache>/pipelines/warm-done.txt with OpenOptions::open then failed with Windows os error 3 (ERROR_PATH_NOT_FOUND), with no path context attached to the io::Error.
  • Create both shaders and pipelines via cfg.cache_subdir(...) (which also enforces ensure_outside_repo) and attach path context when opening warm-done.txt, slow-pipelines.txt and warm-bad.txt.

Linked issue: Fixes #497

Verification

cargo +stable-x86_64-pc-windows-gnu test --manifest-path third_party/victory/Cargo.toml -p victory warm::tests → 9 passed; 0 failed
cargo +stable-x86_64-pc-windows-gnu run --manifest-path third_party/victory/Cargo.toml -p xtask -- policy → policy ok
python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed!

Oracle and test data

  • Reproduction: on a fresh Config whose cache_dir does not yet exist, cfg.cache_subdir("shaders")?.with_file_name("pipelines") leaves <cache>/pipelines absent and OpenOptions::open(dir.join("warm-done.txt")) returns The system cannot find the path specified. (os error 3) on Windows.
  • Failure case without this change: warm::tests::clean_first_run_creates_both_shaders_and_pipelines_cache_dirs fails with os error 3.

Checklist

  • The PR covers a single reviewable behaviour.
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: unchanged (test_readme_sync.py checks it).
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: none used here.
  • Code taken from another project: none.

AI assistance: diagnosed, implemented and verified with AI coding assistance.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5528597825 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/507). Originally posted by [Lewandox](https://github.com/Lewandox) on 2026-11-27T14:50:21Z. --- ## Change Fix `victory warm` failing on a clean first-run cache with `Error: The system cannot find the path specified. (os error 3)` (`ERROR_PATH_NOT_FOUND`), which aborts `anyxboxx-launcher` (`== Warming the shader cache ==` → `== finished, exit code 1 ==`) and `anyxboxx run --warm` / `--precompile` before the game ever runs: - In `third_party/victory/apps/victory/src/warm.rs`, `folder()` previously called `cfg.cache_subdir("shaders")?.with_file_name("pipelines")`, creating `<cache>/shaders` while leaving `<cache>/pipelines` non-existent on a fresh machine where no game run has recorded pipelines yet. - Opening `<cache>/pipelines/warm-done.txt` with `OpenOptions::open` then failed with Windows `os error 3` (`ERROR_PATH_NOT_FOUND`), with no path context attached to the `io::Error`. - Create both `shaders` and `pipelines` via `cfg.cache_subdir(...)` (which also enforces `ensure_outside_repo`) and attach path context when opening `warm-done.txt`, `slow-pipelines.txt` and `warm-bad.txt`. Linked issue: Fixes #497 ## Verification ``` cargo +stable-x86_64-pc-windows-gnu test --manifest-path third_party/victory/Cargo.toml -p victory warm::tests → 9 passed; 0 failed cargo +stable-x86_64-pc-windows-gnu run --manifest-path third_party/victory/Cargo.toml -p xtask -- policy → policy ok python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed! ``` ## Oracle and test data - Reproduction: on a fresh `Config` whose `cache_dir` does not yet exist, `cfg.cache_subdir("shaders")?.with_file_name("pipelines")` leaves `<cache>/pipelines` absent and `OpenOptions::open(dir.join("warm-done.txt"))` returns `The system cannot find the path specified. (os error 3)` on Windows. - Failure case without this change: `warm::tests::clean_first_run_creates_both_shaders_and_pipelines_cache_dirs` fails with `os error 3`. ## Checklist - [x] The PR covers a single reviewable behaviour. - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: unchanged (`test_readme_sync.py` checks it). - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: none used here. - [x] Code taken from another project: none. AI assistance: diagnosed, implemented and verified with AI coding assistance.
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
LooperSalty/AnyXboxX!507
No description provided.