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

Open
github-bot wants to merge 1 commit from github-bot/gh-3542 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 15:52 UTC · original
andrewpozdnakov7-jpg:codex2/warm-up-input-roots → main · +50 −1 · 2 files · 1 commits · open

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 15:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/3542) `andrewpozdnakov7-jpg:codex2/warm-up-input-roots` → `main` · +50 −1 · 2 files · 1 commits · open ## 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://git.gtahub.st/github/Marvisak--VIctory/issues/1633). AI-assisted with Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 16:00:30 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 15:56 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 15:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7222659917) 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.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 16:15 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 16:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7223043472) 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.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-27 17:36 UTC · original

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.
**@⁠cloph-dsp** on GitHub · 2026-11-27 17:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/3542#issuecomment-7224589430) 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 can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3542/head:github-bot/gh-3542'
git switch 'github-bot/gh-3542'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3542'
git switch 'github-bot/gh-3542'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3542'
git switch 'github-bot/gh-3542'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3542'
git switch 'main'
git merge --squash 'github-bot/gh-3542'
git switch 'main'
git merge --ff-only 'github-bot/gh-3542'
git switch 'main'
git merge 'github-bot/gh-3542'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3542
No description provided.