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

Open
github-bot wants to merge 1 commit from github-bot/gh-4840 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 10:55 UTC · original
andrewpozdnakov7-jpg:codex2/fix/warm-used-file → main · +16 −9 · 1 files · 1 commits · open

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 #4708.

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. #4786 checks the shader book. #4824 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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 10:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840) `andrewpozdnakov7-jpg:codex2/fix/warm-used-file` → `main` · +16 −9 · 1 files · 1 commits · open ## 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 #4708. ## 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. #4786 checks the shader book. #4824 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 10:58:51 +00:00
Author
Owner

@⁠gut0to on GitHub · 2026-12-01 15:17 UTC · original · reviewed

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.

**@⁠gut0to** on GitHub · 2026-12-01 15:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840#pullrequestreview-6134201553) · **reviewed** 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.
@ -179,1 +184,3 @@
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() };
Author
Owner

@⁠gut0to on GitHub · 2026-12-01 15:17 UTC · original

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** on GitHub · 2026-12-01 15:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4840#discussion_r4756348285) 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/4841/head:github-bot/gh-4840'
git switch 'github-bot/gh-4840'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4840'
git switch 'github-bot/gh-4840'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4840'
git switch 'github-bot/gh-4840'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4840'
git switch 'main'
git merge --squash 'github-bot/gh-4840'
git switch 'main'
git merge --ff-only 'github-bot/gh-4840'
git switch 'main'
git merge 'github-bot/gh-4840'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4841
No description provided.