Skip to content

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

Open
andrewpozdnakov7-jpg wants to merge 1 commit into
Marvisak:mainfrom
andrewpozdnakov7-jpg:codex2/warm-up-input-roots
Open

andrewpozdnakov7-jpg wants to merge 1 commit into
Marvisak:mainfrom
andrewpozdnakov7-jpg:codex2/warm-up-input-roots

Conversation

@andrewpozdnakov7-jpg

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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 <andrewpozdnakov7-jpg@users.noreply.github.com> if folding it into another commit.

AI-assisted with Codex.

@andrewpozdnakov7-jpg

Copy link
Copy Markdown
Contributor Author

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.

@cloph-dsp

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants