warm: name the missing known-shaders.bin instead of exiting 0 silently #137

Manually merged
github merged 1 commit from github-bot/gh-136 into main 2026-12-05 17:43:23 +00:00 AGit
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 17:16 UTC · original
SovietBearz0r:warm-missing-shaders-error → main · +54 −0 · 2 files · 1 commits · merged 2026-12-05 17:40 UTC

Warm used to exit 0 silently when known-shaders.bin could not be opened: the persistent worker's WarmWorker::open failure did std::process::exit(0), so the parent saw no result and reported "0 made, 0 failed", retrying every pipeline invisibly (the RDNA3 fork's issue #12 — a cache with only known-pipelines.bin copied in).

Fix

known::shaders_file(dir) opens (only) the file and returns its path + error; warm::run checks it after selection and before any worker starts, bailing with an error naming known-shaders.bin, known-pipelines.bin and VICTORY_PIPELINE_BOOK=1 (copy them together). An empty known-shaders.bin deliberately takes the existing path.

Verification

  • cargo test -p victory --bin victory: 120 passed, 1 ignored (incl. a_missing_shaders_file_is_named_with_what_to_do); cargo test -p victory-gpu --lib pipeline::known: 8 passed.
  • Manual: binary run against a temp cache with only known-pipelines.bin → exit 1 with the named error, no warm-done.txt (previously the silent "0 made" path).
  • cargo check -p victory, cargo xtask policy (439 files), clippy: clean for changed files.
  • Follow-up noted by the source: warm --these one-shot still silently no-ops if the shaders file is unopenable.

Source: ReVictory-RDNA3 PR #29.

**@⁠SovietBearz0r** on GitHub · 2026-12-05 17:16 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/136) `SovietBearz0r:warm-missing-shaders-error` → `main` · +54 −0 · 2 files · 1 commits · merged 2026-12-05 17:40 UTC Warm used to exit 0 silently when `known-shaders.bin` could not be opened: the persistent worker's `WarmWorker::open` failure did `std::process::exit(0)`, so the parent saw no result and reported "0 made, 0 failed", retrying every pipeline invisibly (the RDNA3 fork's issue #12 — a cache with only `known-pipelines.bin` copied in). ## Fix `known::shaders_file(dir)` opens (only) the file and returns its path + error; `warm::run` checks it after selection and **before any worker starts**, bailing with an error naming `known-shaders.bin`, `known-pipelines.bin` and `VICTORY_PIPELINE_BOOK=1` (copy them together). An *empty* `known-shaders.bin` deliberately takes the existing path. ## Verification - `cargo test -p victory --bin victory`: **120 passed, 1 ignored** (incl. `a_missing_shaders_file_is_named_with_what_to_do`); `cargo test -p victory-gpu --lib pipeline::known`: 8 passed. - Manual: binary run against a temp cache with only `known-pipelines.bin` → exit 1 with the named error, no `warm-done.txt` (previously the silent "0 made" path). - `cargo check -p victory`, `cargo xtask policy` (439 files), clippy: clean for changed files. - Follow-up noted by the source: `warm --these` one-shot still silently no-ops if the shaders file is unopenable. Source: ReVictory-RDNA3 PR #29.
known-pipelines.bin copied in without known-shaders.bin beside it made
every worker end at once and silently: the persistent one exited 0 without
opening it, the parent saw no result, took the first pipeline as the
suspect and retried it alone, and the one-shot worker also exited 0, so
each pipeline left the queue with neither counter touched. The warm then
printed "0 made (0 have no host pipeline, 0 ended their process)" and
never wrote warm-done.txt.

warm now opens known-shaders.bin before it starts any worker and stops
with an error that names the file and says both are written by runs with
VICTORY_PIPELINE_BOOK=1. It only checks that the file opens: an empty one
still takes the existing path, which warm_bad relies on.

Ported from ReVictory-RDNA3 PR #29 (VGLALALA/ReVictory-RDNA3).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:18:34 +00:00
github manually merged commit 26385fdeca into main 2026-12-05 17:43:23 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.