Report first-use list read failures with warm --used #4840

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/4840 into main
andrewpozdnakov7-jpg commented 2026-12-01 10:55:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T10:55:05Z.


What it changes

victory warm --used selects pipelines from early-pipelines.txt. A failed read currently becomes an empty list, so the warm-up can report zero work and succeed even though it could not read its input.

Reuse preload's checked reader for the first-use list. warm --used reports a read failure with the filename. An absent list still means no earlier run, and an unrestricted warm can continue when its optional ordering list is unreadable.

How it was tested

  • Windows/MSVC, Rust 1.98.1. The exact list-selection code ran against synthetic directories and a valid fixture file.
  • Main 5fabb46e and release v2026.11.30.03 each returned an empty list when the selected path was a directory. f3e7bbe46c7aedce6a9a7b0a6675143e514889aa returned a contextual PermissionDenied for --used. The fixture also covered a missing list, a valid list and the unrestricted mode.
  • cargo xtask policy --staged passed for the one changed file.
  • Main's CI check has five existing Clippy errors tracked in #4707.

Checked for overlap

  • I searched issues and PRs for the read failure and inspected overlapping warm changes. #3588 checks the binary known-pipelines.bin journal. #4785 checks the shader book. #4823 allows an explicit full preload to skip first-use mode detection.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5584226590 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T10:55:05Z. --- ## What it changes `victory warm --used` selects pipelines from `early-pipelines.txt`. A failed read currently becomes an empty list, so the warm-up can report zero work and succeed even though it could not read its input. Reuse preload's checked reader for the first-use list. `warm --used` reports a read failure with the filename. An absent list still means no earlier run, and an unrestricted `warm` can continue when its optional ordering list is unreadable. ## How it was tested - Windows/MSVC, Rust 1.98.1. The exact list-selection code ran against synthetic directories and a valid fixture file. - Main `5fabb46e` and release `v2026.11.30.03` each returned an empty list when the selected path was a directory. `f3e7bbe46c7aedce6a9a7b0a6675143e514889aa` returned a contextual `PermissionDenied` for `--used`. The fixture also covered a missing list, a valid list and the unrestricted mode. - `cargo xtask policy --staged` passed for the one changed file. - Main's [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) has five existing Clippy errors tracked in #4707. ## Checked for overlap - [x] I searched issues and PRs for the read failure and inspected overlapping warm changes. #3588 checks the binary `known-pipelines.bin` journal. #4785 checks the shader book. #4823 allows an explicit full preload to skip first-use mode detection. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this into another commit. AI-assisted with OpenAI Codex.
gut0to commented 2026-12-01 15:17:57 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gut0to on 2026-12-01T15:17:57Z.

Code review location: apps/victory/src/warm.rs; line 186

@@ -176,7 +181,9 @@ pub fn run(jobs: Option<usize>, limit: Option<usize>, again: bool, used: bool, t
         std::fs::read_to_string(&bad_file).unwrap_or_default()
     };
     let bad = bad_keys(&listed_bad, &fingerprint);
-    let early = std::fs::read_to_string(dir.join("early-pipelines.txt")).unwrap_or_default();
+    let early = early_pipeline_list(&dir);
+    // Without --used, the list only decides which pipelines to warm first.
+    let early = if used { early? } else { early.unwrap_or_default() };

Could this behavior get a focused temp-file test? A missing early-pipelines.txt is normal, while invalid UTF-8 must propagate an error for --used and remain ignorable when the list only sets priority. Those branches decide whether preload fails clearly or can expand to a full pipeline warm-up, but this diff adds no regression test for either case.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review-comment:4756348285 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840#discussion_r4756348285). Originally posted by [gut0to](https://github.com/gut0to) on 2026-12-01T15:17:57Z. **Code review location:** `apps/victory/src/warm.rs`; line 186 ~~~~diff @@ -176,7 +181,9 @@ pub fn run(jobs: Option<usize>, limit: Option<usize>, again: bool, used: bool, t std::fs::read_to_string(&bad_file).unwrap_or_default() }; let bad = bad_keys(&listed_bad, &fingerprint); - let early = std::fs::read_to_string(dir.join("early-pipelines.txt")).unwrap_or_default(); + let early = early_pipeline_list(&dir); + // Without --used, the list only decides which pipelines to warm first. + let early = if used { early? } else { early.unwrap_or_default() }; ~~~~ --- Could this behavior get a focused temp-file test? A missing early-pipelines.txt is normal, while invalid UTF-8 must propagate an error for --used and remain ignorable when the list only sets priority. Those branches decide whether preload fails clearly or can expand to a full pipeline warm-up, but this diff adds no regression test for either case.
gut0to commented 2026-12-01 15:17:57 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gut0to on 2026-12-01T15:17:57Z.

Review: COMMENTED


AI-assisted review: I checked the new missing-versus-unreadable list handling and its callers. I used AI assistance and verified that this diff adds no regression test for the two modes.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6134201553 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840#pullrequestreview-6134201553). Originally posted by [gut0to](https://github.com/gut0to) on 2026-12-01T15:17:57Z. **Review:** COMMENTED --- AI-assisted review: I checked the new missing-versus-unreadable list handling and its callers. I used AI assistance and verified that this diff adds no regression test for the two modes.
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/4840:upstream-pr/4840'
git switch 'upstream-pr/4840'

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