CLI: fail shader warm-up on missing input roots #3542

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3542 into main
andrewpozdnakov7-jpg commented 2026-11-27 15:52:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T15:52:51Z.


Problem

On main 63bcca4, shader warm-up returns success for a missing input and creates an empty cache. With --pipelines it also reports there is nothing to prebuild. This makes a mistyped path look like completed launch preparation to callers such as #3532.

Change

Check the selected roots before opening the shader cache. The error identifies the input that could not be accessed. The same check covers explicit paths and configured defaults. #517 handles the ordinary scan commands.

Verification

On Windows 10 22H2 (19045.6456), with synthetic inputs:

Case Main Patched
Missing explicit path, with and without --pipelines Exit 0, cache created Exit 1, no cache created
Missing configured path Exit 0, cache created Exit 1, no cache created
Existing empty directory, with and without --pipelines Exit 0 Exit 0

The CLI regression includes a readable file followed by a missing path. All 19 app tests, strict app Clippy in both feature configurations and the asset policy passed. The local combination with #3532 8d37394 and #517 d8cd94a passed all 26 app tests. Its actual preload --attempts 1 returned 1 for the missing input and 0 for the empty directory.

Coordination claim. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5529458482 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3542). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T15:52:51Z. --- ## Problem On main `63bcca4`, shader warm-up returns success for a missing input and creates an empty cache. With `--pipelines` it also reports there is nothing to prebuild. This makes a mistyped path look like completed launch preparation to callers such as #3532. ## Change Check the selected roots before opening the shader cache. The error identifies the input that could not be accessed. The same check covers explicit paths and configured defaults. #517 handles the ordinary scan commands. ## Verification On Windows 10 22H2 (19045.6456), with synthetic inputs: | Case | Main | Patched | | --- | --- | --- | | Missing explicit path, with and without `--pipelines` | Exit 0, cache created | Exit 1, no cache created | | Missing configured path | Exit 0, cache created | Exit 1, no cache created | | Existing empty directory, with and without `--pipelines` | Exit 0 | Exit 0 | The CLI regression includes a readable file followed by a missing path. All 19 app tests, strict app Clippy in both feature configurations and the asset policy passed. The local combination with #3532 `8d37394` and #517 `d8cd94a` passed all 26 app tests. Its actual `preload --attempts 1` returned 1 for the missing input and 0 for the empty directory. [Coordination claim](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7222423504). AI-assisted with Codex.
andrewpozdnakov7-jpg commented 2026-11-27 15:56:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T15:56:12Z.


The Windows CI job passed on exact head 6b3747c. The synthetic command-line checks cover explicit missing paths, configured missing paths, and existing empty directories. A missing root now names the input and exits 1 before cache setup. The local combination with #3532 and #517 also verified that preload propagates that failure and still succeeds for the empty-directory control.

Ready for maintainer review. If you reuse the patch, please retain the Git author on cherry-pick or rebase, or use Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it into another commit.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222659917 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7222659917). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T15:56:12Z. --- The [Windows CI job](https://github.com/Marvisak/VIctory/actions/runs/46028789686/job/140606951519) passed on exact head `6b3747c`. The synthetic command-line checks cover explicit missing paths, configured missing paths, and existing empty directories. A missing root now names the input and exits 1 before cache setup. The local combination with #3532 and #517 also verified that `preload` propagates that failure and still succeeds for the empty-directory control. Ready for maintainer review. If you reuse the patch, please retain the Git author on cherry-pick or rebase, or use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it into another commit. AI-assisted with Codex.
andrewpozdnakov7-jpg commented 2026-11-27 16:15:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T16:15:24Z.


I checked #3542 with the #3521 database-hash selection and #2787 warm-key shortcut. Combined branch 4a78b17 retains all three PR histories and merges cleanly with 63bcca4.

I passed a synthetic A/B shader pack and its database with a nonexistent root between them. With --cache --pipelines --jobs 8 and key diagnostics enabled, 0fc3158 returned 0 and created both the cache and key report. The combined branch returned 1, named the missing root, and created neither. With valid roots on app-local WARP 1.0.22, seeding A and then adding B saved both expected keys. The next run recognized all three records as warm, including the fallback record that uses A.

All 20 CLI tests and 16 victory-game tests passed. Strict Clippy for the three affected crates and asset policy passed.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7223043472 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7223043472). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T16:15:24Z. --- I checked #3542 with the #3521 database-hash selection and #2787 warm-key shortcut. [Combined branch `4a78b17`](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/review/warm-input-validation-and-prebuild-keys) retains all three PR histories and merges cleanly with `63bcca4`. I passed a synthetic A/B shader pack and its database with a nonexistent root between them. With `--cache --pipelines --jobs 8` and key diagnostics enabled, `0fc3158` returned 0 and created both the cache and key report. The combined branch returned 1, named the missing root, and created neither. With valid roots on app-local WARP 1.0.22, seeding A and then adding B saved both expected keys. The next run recognized all three records as warm, including the fallback record that uses A. All 20 CLI tests and 16 `victory-game` tests passed. Strict Clippy for the three affected crates and asset policy passed.
cloph-dsp commented 2026-11-27 17:36:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T17:36:17Z.


Independent CPU-only verification on Windows / Rust 1.100.0 / MSVC.

  • PR head: 6b3747c7006c8a463b0e9d51a573d213f0aa3cbb, merge base 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • Command: cargo test --locked -p victory --test translate -- warm_up_rejects_missing_input_before_creating_cache --exact --test-threads=1 --quiet
  • Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out, exit 0.
  • Negative control: git grep -F -c warm_up_rejects_missing_input_before_creating_cache 63bcca43 -- . → exit 1 / 0 hits (test genuinely new); present on PR head.
  • git diff --check 63bcca43 HEAD → exit 0.
  • Caveat: only the named synthetic integration test was replayed; full suite and real translation runs were not exercised.
  • GPU/driver: N/A (CPU-only test). No game data, assets, extracted shaders or DRM involved.
  • AI-assisted: Hy4 flash.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7224589430 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7224589430). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T17:36:17Z. --- Independent CPU-only verification on Windows / Rust 1.100.0 / MSVC. - PR head: `6b3747c7006c8a463b0e9d51a573d213f0aa3cbb`, merge base `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - Command: `cargo test --locked -p victory --test translate -- warm_up_rejects_missing_input_before_creating_cache --exact --test-threads=1 --quiet` - Result: `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out`, exit 0. - Negative control: `git grep -F -c warm_up_rejects_missing_input_before_creating_cache 63bcca43 -- .` → exit 1 / 0 hits (test genuinely new); present on PR head. - `git diff --check 63bcca43 HEAD` → exit 0. - Caveat: only the named synthetic integration test was replayed; full suite and real translation runs were not exercised. - GPU/driver: N/A (CPU-only test). No game data, assets, extracted shaders or DRM involved. - AI-assisted: Hy4 flash.
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/3542:upstream-pr/3542'
git switch 'upstream-pr/3542'

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/3542'
git switch 'upstream-pr/3542'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3542'
git switch 'upstream-pr/3542'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3542'
git switch 'main'
git merge --squash 'upstream-pr/3542'
git switch 'main'
git merge --ff-only 'upstream-pr/3542'
git switch 'main'
git merge 'upstream-pr/3542'
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
Marvisak/VIctory!3542
No description provided.