CLI: add resumable pipeline preload #3532

Open
tharun-37 wants to merge 2 commits from upstream-pr/3532 into main
tharun-37 commented 2026-11-27 15:14:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-27T15:14:12Z.


Adds victory preload, an unattended wrapper around the existing offline warm-up.

translate --cache --pipelines already saves completed pipelines as it goes. preload runs that command in a child process and, after a failed child, starts a fresh one that resumes from the saved library. It stops after two consecutive attempts with no new pipeline keys, so a deterministic compile failure cannot loop forever.

  • --jobs is forwarded to the existing translator.
  • --attempts defaults to 16.
  • README documents the command beside the existing warm-up example.
  • Unit tests cover the saved key-list format and the progress/stagnation logic; they use synthetic data only.

Verification:

  • cargo clippy --workspace --all-targets --locked -- -D warnings passes.
  • cargo test -p victory --bin victory --locked: 19 passed, 0 failed.
  • cargo test --workspace --locked: the same 3 pre-existing victory-gpu failures remain (228 passed, 3 failed, 1 ignored in that crate).

Claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7221697255

AI-assisted (OpenCode).

Co-authored-by: andrewpozdnakov7-jpg [email protected]

<!-- greyfinch-sync:Marvisak/VIctory:issue:5528948216 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3532). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-27T15:14:12Z. --- Adds `victory preload`, an unattended wrapper around the existing offline warm-up. `translate --cache --pipelines` already saves completed pipelines as it goes. `preload` runs that command in a child process and, after a failed child, starts a fresh one that resumes from the saved library. It stops after two consecutive attempts with no new pipeline keys, so a deterministic compile failure cannot loop forever. - `--jobs` is forwarded to the existing translator. - `--attempts` defaults to 16. - README documents the command beside the existing warm-up example. - Unit tests cover the saved key-list format and the progress/stagnation logic; they use synthetic data only. Verification: - `cargo clippy --workspace --all-targets --locked -- -D warnings` passes. - `cargo test -p victory --bin victory --locked`: 19 passed, 0 failed. - `cargo test --workspace --locked`: the same 3 pre-existing `victory-gpu` failures remain (228 passed, 3 failed, 1 ignored in that crate). Claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7221697255 AI-assisted (OpenCode). Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
andrewpozdnakov7-jpg commented 2026-11-27 15:33:07 +00:00 (Migrated from github.com)

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


On Windows 10 (19045.6456, Rust 1.98.1 MSVC), the frame-clock test on cfafc80 failed in 5 of 20 fresh processes. Three failed at the same zero-timeout assertion as the first CI job. The frame.rs source is identical to main 63bcca4.

I merged current #3532 8d37394 and #2877 8616219 in ed88d18, preserving both original histories. All three frame tests passed in each of 20 fresh processes. Strict GPU Clippy in both feature configurations and the asset policy passed. The current #3532 CI job is already green.

On the exact 8d37394 head, all 24 app tests passed. I also ran the actual preload command under an isolated configuration. Empty synthetic input finished on the first attempt, zero attempts started no child, one allowed attempt stopped after one failure, and a three-attempt budget stopped after two consecutive failures with no new keys. These checks cover the supervisor and child startup. They do not exercise a real driver crash or saved GPU pipeline recovery.

The next step is review of #3532 and #2877. If you reuse this integration, please retain the original Git authors for both PRs. If folding my integration work into another commit, please use Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222195391 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3532#issuecomment-7222195391). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T15:33:07Z. --- On Windows 10 (19045.6456, Rust 1.98.1 MSVC), the frame-clock test on `cfafc80` failed in 5 of 20 fresh processes. Three failed at the same zero-timeout assertion as the [first CI job](https://github.com/Marvisak/VIctory/actions/runs/46023084382/job/140587421867). The `frame.rs` source is identical to main `63bcca4`. I merged current #3532 `8d37394` and #2877 `8616219` in [`ed88d18`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/ed88d18cbac96f3f44d5f69febe89643e1658965), preserving both original histories. All three frame tests passed in each of 20 fresh processes. Strict GPU Clippy in both feature configurations and the asset policy passed. The [current #3532 CI job](https://github.com/Marvisak/VIctory/actions/runs/46024955830/job/140593837990) is already green. On the exact `8d37394` head, all 24 app tests passed. I also ran the actual `preload` command under an isolated configuration. Empty synthetic input finished on the first attempt, zero attempts started no child, one allowed attempt stopped after one failure, and a three-attempt budget stopped after two consecutive failures with no new keys. These checks cover the supervisor and child startup. They do not exercise a real driver crash or saved GPU pipeline recovery. The next step is review of #3532 and #2877. If you reuse this integration, please retain the original Git authors for both PRs. If folding my integration work into another commit, please use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted with Codex.
tharun-37 commented 2026-11-27 15:48:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-27T15:48:13Z.


Thanks for isolating it. Agreed: the frame-clock failure is unrelated to this PR (frame.rs is unchanged here), and the current #3532 CI is green. I’ll keep #3532 scoped to resumable preload and leave #2877 as the place for the deterministic virtual clock; no integration or rebase needed here.

AI-assisted (OpenCode).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222500421 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3532#issuecomment-7222500421). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-27T15:48:13Z. --- Thanks for isolating it. Agreed: the frame-clock failure is unrelated to this PR (`frame.rs` is unchanged here), and the current #3532 CI is green. I’ll keep #3532 scoped to resumable preload and leave #2877 as the place for the deterministic virtual clock; no integration or rebase needed here. AI-assisted (OpenCode).
cloph-dsp commented 2026-11-27 15:48:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T15:48:28Z.


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

  • PR head: 8d37394fe227ec9b9dbe9c9de5402b2b018e8eac, merge base 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • Command: cargo test --locked -p victory --bin victory -- preload::tests::progress_counts_keys_without_a_trailing_newline --exact --test-threads=1 --quiet
  • Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 19 filtered out, exit 0.
  • Negative control: git grep -F -c progress_counts_keys_without_a_trailing_newline 63bcca43 -- . → exit 1 / 0 hits; present on PR head.
  • git diff --check 63bcca43 HEAD → exit 0.
  • Caveat: only the named synthetic CLI test was replayed; no real prebuild supervisor run and no full crate suite.
  • 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:7222505430 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3532#issuecomment-7222505430). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T15:48:28Z. --- Independent CPU-only verification on Windows / Rust 1.100.0 / MSVC. - PR head: `8d37394fe227ec9b9dbe9c9de5402b2b018e8eac`, merge base `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - Command: `cargo test --locked -p victory --bin victory -- preload::tests::progress_counts_keys_without_a_trailing_newline --exact --test-threads=1 --quiet` - Result: `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 19 filtered out`, exit 0. - Negative control: `git grep -F -c progress_counts_keys_without_a_trailing_newline 63bcca43 -- .` → exit 1 / 0 hits; present on PR head. - `git diff --check 63bcca43 HEAD` → exit 0. - Caveat: only the named synthetic CLI test was replayed; no real prebuild supervisor run and no full crate suite. - 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/3532:upstream-pr/3532'
git switch 'upstream-pr/3532'

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