pipeline: keep stale warm-bad.txt entries in runtime until warm-done.txt confirms them #387

Open
github-bot wants to merge 1 commit from github-bot/gh-387 into a-publier AGit
Owner

@⁠BlueCatsz on GitHub · 2026-11-26 23:26 UTC · original
BlueCatsz:fix/runtime-warm-bad-require-warm-done → a-publier · +172 −47 · 5 files · 1 commits · open

Follow-up to #294 (suggested by @⁠adrianmjim in this post-merge review comment).

Why

In #294, both victory warm and the running title (crates/victory-gpu/src/pipeline/make.rs) switched to known::parse_bad_keys, which drops warm-bad.txt entries as soon as known::fingerprint() changes (for example after a driver update, TRANSLATOR_VERSION bump, or shader switch change).

  • For victory warm, retrying stale entries immediately is safe because compilations run in isolated child processes with a 180 s hang timeout (apps/victory/src/warm.rs).
  • For a running title (make.rs), compilations run in-process with no compile timeout and the VEH crash guard (make.rs::compiler_crashed) only catches access violations below 0x10000. Dropping stale warm-bad.txt entries in the title before victory warm has re-tested them risks repeating 180 s hangs (hung for 180 s) or unguarded compiler crashes in-game.

What changed

  1. crates/victory-gpu/src/pipeline/known.rs:
    • Added WARM_DONE_FILE = "warm-done.txt" and parse_done_keys (reused by apps/victory/src/warm.rs).
    • Extracted shared parse_bad_line used by both parse_bad_keys (victory warm, unchanged behavior) and new parse_runtime_bad_keys.
    • parse_runtime_bad_keys(bad_text, done_text, fingerprint) keeps stale-fingerprint entries (fp != fingerprint) quarantined in the title until warm-done.txt contains <fingerprint> <key> under the current fingerprint. Current-fingerprint entries and legacy/manual bare-key entries remain quarantined unconditionally (even if warm-done.txt also lists the key).
    • Added unit test runtime_bad_keys_keep_stale_entries_until_warm_done_confirms_them.
  2. crates/victory-gpu/src/pipeline/make.rs:
    • bad_keys now calls known::parse_runtime_bad_keys using warm-bad.txt and warm-done.txt, preserving the lazy early exit when VICTORY_WARM_BAD=0 or warm-bad.txt is empty/missing (without eagerly calling known::fingerprint()).
  3. apps/victory/src/warm.rs & apps/victory/src/main.rs:
    • Reused known::WARM_DONE_FILE and known::parse_done_keys in warm::run and updated victory warm --help to explain that victory warm retries stale warm-bad.txt entries automatically and the title clears them once warm-done.txt records them under the new fingerprint.
  4. apps/victory/tests/warm_bad.rs:
    • Extended warm_bad_fingerprint_override_again_and_help to verify warm --help mentions warm-done.txt and that after rotating the fingerprint (VICTORY_WAVE_WIDE=0), parse_runtime_bad_keys keeps the stale tagged key quarantined before victory warm runs and clears it once victory warm writes warm-done.txt (while keeping legacy bare-key entries quarantined).

Tradeoff: Users who never run victory warm and only rely on runtime VEH catches keep stale entries quarantined across driver/translator updates until they run victory warm or set VICTORY_WARM_BAD=0 (matching pre-#294 runtime behavior).

Verification

  • Local offline (x86_64-unknown-linux-gnu):
    • cargo --offline test -p xtask: 9 passed, 0 failed (policy::tests::repository_passes_policy, switches::documented_switches_are_read).
    • git diff --check: clean.
  • Full stock windows-latest fork CI (Run 45909509717, unmodified .github/workflows/ci.yml):
    • Clippy (--workspace --all-targets --locked -- -D warnings, Default & --all-features): passed (0 warnings).
    • Default tests (cargo test --workspace --locked): passed — victory (25 unit + 2 census + 3 translate_host_wave + 1 warm_bad), victory-gpu (397 passed, 0 failed, 34 ignored, including bad_keys_expire_with_fingerprint_and_skip_comments, runtime_bad_keys_keep_stale_entries_until_warm_done_confirms_them, and a_pipeline_on_the_bad_list_is_not_compiled), xtask (9 passed).
    • Diagnostics tests (cargo test --workspace --all-features --locked -- --test-threads=1): passed — victory (26 unit + 2 + 3 + 1 warm_bad), victory-gpu (446 passed, 0 failed, 34 ignored), xtask (9 passed).
  • Test scope / limitations: Synthetic unit and CLI/subprocess tests only; zero game files/assets; not tested against a live title.

AI Use

Prepared with AI assistance (Antigravity) and verified against the unit, CLI, and full workspace CI checks above.

**@⁠BlueCatsz** on GitHub · 2026-11-26 23:26 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/387) `BlueCatsz:fix/runtime-warm-bad-require-warm-done` → `a-publier` · +172 −47 · 5 files · 1 commits · open Follow-up to #294 (suggested by @⁠adrianmjim in [this post-merge review comment](https://git.gtahub.st/github/Belobug--VIctory-Belobug-AMD/pulls/294)). ## Why In #294, both `victory warm` and the running title (`crates/victory-gpu/src/pipeline/make.rs`) switched to `known::parse_bad_keys`, which drops `warm-bad.txt` entries as soon as `known::fingerprint()` changes (for example after a driver update, `TRANSLATOR_VERSION` bump, or shader switch change). - For `victory warm`, retrying stale entries immediately is safe because compilations run in isolated child processes with a 180 s hang timeout (`apps/victory/src/warm.rs`). - For a running title (`make.rs`), compilations run in-process with no compile timeout and the VEH crash guard (`make.rs::compiler_crashed`) only catches access violations below `0x10000`. Dropping stale `warm-bad.txt` entries in the title before `victory warm` has re-tested them risks repeating 180 s hangs (`hung for 180 s`) or unguarded compiler crashes in-game. ## What changed 1. **`crates/victory-gpu/src/pipeline/known.rs`:** - Added `WARM_DONE_FILE = "warm-done.txt"` and `parse_done_keys` (reused by `apps/victory/src/warm.rs`). - Extracted shared `parse_bad_line` used by both `parse_bad_keys` (`victory warm`, unchanged behavior) and new `parse_runtime_bad_keys`. - `parse_runtime_bad_keys(bad_text, done_text, fingerprint)` keeps stale-fingerprint entries (`fp != fingerprint`) quarantined in the title until `warm-done.txt` contains `<fingerprint> <key>` under the current fingerprint. Current-fingerprint entries and legacy/manual bare-key entries remain quarantined unconditionally (even if `warm-done.txt` also lists the key). - Added unit test `runtime_bad_keys_keep_stale_entries_until_warm_done_confirms_them`. 2. **`crates/victory-gpu/src/pipeline/make.rs`:** - `bad_keys` now calls `known::parse_runtime_bad_keys` using `warm-bad.txt` and `warm-done.txt`, preserving the lazy early exit when `VICTORY_WARM_BAD=0` or `warm-bad.txt` is empty/missing (without eagerly calling `known::fingerprint()`). 3. **`apps/victory/src/warm.rs` & `apps/victory/src/main.rs`:** - Reused `known::WARM_DONE_FILE` and `known::parse_done_keys` in `warm::run` and updated `victory warm --help` to explain that `victory warm` retries stale `warm-bad.txt` entries automatically and the title clears them once `warm-done.txt` records them under the new fingerprint. 4. **`apps/victory/tests/warm_bad.rs`:** - Extended `warm_bad_fingerprint_override_again_and_help` to verify `warm --help` mentions `warm-done.txt` and that after rotating the fingerprint (`VICTORY_WAVE_WIDE=0`), `parse_runtime_bad_keys` keeps the stale tagged key quarantined before `victory warm` runs and clears it once `victory warm` writes `warm-done.txt` (while keeping legacy bare-key entries quarantined). **Tradeoff:** Users who never run `victory warm` and only rely on runtime VEH catches keep stale entries quarantined across driver/translator updates until they run `victory warm` or set `VICTORY_WARM_BAD=0` (matching pre-#294 runtime behavior). ## Verification - **Local offline (`x86_64-unknown-linux-gnu`):** - `cargo --offline test -p xtask`: **9 passed, 0 failed** (`policy::tests::repository_passes_policy`, `switches::documented_switches_are_read`). - `git diff --check`: clean. - **Full stock `windows-latest` fork CI ([Run 45909509717](https://github.com/BlueCatsz/VIctory-Belobug-AMD/actions/runs/45909509717), unmodified `.github/workflows/ci.yml`):** - **`Clippy` (`--workspace --all-targets --locked -- -D warnings`, Default & `--all-features`):** passed (0 warnings). - **`Default tests` (`cargo test --workspace --locked`):** passed — `victory` (**25** unit + **2** `census` + **3** `translate_host_wave` + **1** `warm_bad`), `victory-gpu` (**397 passed, 0 failed, 34 ignored**, including `bad_keys_expire_with_fingerprint_and_skip_comments`, `runtime_bad_keys_keep_stale_entries_until_warm_done_confirms_them`, and `a_pipeline_on_the_bad_list_is_not_compiled`), `xtask` (**9 passed**). - **`Diagnostics tests` (`cargo test --workspace --all-features --locked -- --test-threads=1`):** passed — `victory` (**26** unit + **2** + **3** + **1** `warm_bad`), `victory-gpu` (**446 passed, 0 failed, 34 ignored**), `xtask` (**9 passed**). - **Test scope / limitations:** Synthetic unit and CLI/subprocess tests only; zero game files/assets; not tested against a live title. ## AI Use Prepared with AI assistance (Antigravity) and verified against the unit, CLI, and full workspace CI checks above.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:58:56 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-27 01:23 UTC · original

Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At 84b8583: cargo test --release -p victory-gpu --lib 397 passed, 0 failed, 34 ignored.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 01:23 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/387#issuecomment-7207245321) Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `84b8583`: `cargo test --release -p victory-gpu --lib` 397 passed, 0 failed, 34 ignored. AI-assisted (Claude Code); no game data.
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/387/head:github-bot/gh-387'
git switch 'github-bot/gh-387'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-387'
git switch 'github-bot/gh-387'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-387'
git switch 'github-bot/gh-387'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-387'
git switch 'a-publier'
git merge --squash 'github-bot/gh-387'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-387'
git switch 'a-publier'
git merge 'github-bot/gh-387'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.