Fix CI's first failures: the warm test's /kept label and the workspace's clippy errors #20

Manually merged
github merged 47 commits from github-bot/gh-20 into main 2026-12-04 02:52:14 +00:00 AGit
Owner

@⁠wagney on GitHub · 2026-12-03 02:08 UTC · original
wagney:fix/ci-green-warm-bad-and-clippy → main · +146 −140 · 33 files · 4 commits · merged 2026-12-04 02:49 UTC

Why

main's CI has been red since 30 Nov (run 46362456337, HEAD 925ac0a), so every open PR fails before its own checks mean anything. This PR clears the two failures that run first:

  1. A stale test. apps/victory/tests/warm_bad.rs reads the parentheses of warm's line as a bare 16-hex fingerprint. warm.rs prints <fingerprint>/kept there since 3e5cb1d (KEPT, also the label written in warm-done.txt) and the test was not updated. warm_bad_fingerprint_override_again_and_help fails with unexpected fingerprint "124838b44299edfe/kept".
  2. Clippy -D warnings on the pinned 1.98.1 finds ~19 errors in victory-shader, victory-gpu, victory-loader (tests) and the victory app.

What this changes

Two commits; no runtime behaviour is intended.

  • warm_bad: follow the label warm prints and warm-done.txt keeps — read the printed label, take the fingerprint before the /kept mark. The message assertions compare the whole label; the warm-bad.txt entry and the warm-done.txt filter use the fingerprint alone.
  • clippy: clear the workspace's -D warnings errors on 1.98.1 — mechanical lint fixes (mem::take, derived Default, flatten, sort_by_key(Reverse), collapsed ifs, ?, is_multiple_of, checked_div, is_ok_and, entry(), and test-only casts). Two exceptions, each with a reason in place: not_unsafe_ptr_arg_deref on title_names_processors/title_named_processors is an #[allow] (the pointers are OS thread handles the system validates, not memory we read), and run_with_progress gets a too_many_arguments allow like the other functions in the tree.

Verification

Toolchain 1.98.1, as rust-toolchain.toml pins:

  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean.
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — clean.
  • cargo test --workspace --locked — warm_bad_fingerprint_override_again_and_help passes and no test this PR touches fails.

Remaining failures on main after this PR

With cargo test --workspace --locked --no-fail-fast, the test job then still fails in xtask, for two reasons present at 925ac0a and untouched here:

  1. policy::tests::repository_passes_policy — apps/victory/assets/background.jpg and logo.png are "file type not on the allowlist" and "binary content (NUL bytes)". They came in with 9a70c8c ("Launcher: GTA VI-styled redesign …"), which did not add them to xtask/src/policy.rs. background.jpg is a stylized city illustration (not a screenshot), so this looks like a missing entry; it needs your call: a path exception with a reason in policy.rs, or dropping the files.
  2. switches::documented_switches_are_read — README.md names VICTORY_NAME (the launcher's More placeholder) and no Rust source reads it. Reword it (e.g. VICTORY_<NAME>=<value>) or have the launcher read it.

The hardware shader tests (emit::isa_tests, emit::typed_half_tests, emit::valu_tests f16) could not run on the machine used for this check: its GPU has no shader model 6.6, so CreatePipelineState fails with E_INVALIDARG. Nothing in this diff touches them.

Two other local failures are toolchain artefacts, not code: victory-loader --test load_probe needs MSVC's /DELAYLOAD to link its fixture, and one symbolization test in timeline::report expects resolved frame names that a GNU/MinGW build does not produce.

This fork PR is a first contribution, so the workflow run may wait for approval; approving it shows the same three jobs.

**@⁠wagney** on GitHub · 2026-12-03 02:08 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/20) `wagney:fix/ci-green-warm-bad-and-clippy` → `main` · +146 −140 · 33 files · 4 commits · merged 2026-12-04 02:49 UTC ## Why `main`'s CI has been red since 30 Nov (run [46362456337](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46362456337), HEAD `925ac0a`), so every open PR fails before its own checks mean anything. This PR clears the two failures that run first: 1. **A stale test.** `apps/victory/tests/warm_bad.rs` reads the parentheses of `warm`'s line as a bare 16-hex fingerprint. `warm.rs` prints `<fingerprint>/kept` there since `3e5cb1d` (`KEPT`, also the label written in `warm-done.txt`) and the test was not updated. `warm_bad_fingerprint_override_again_and_help` fails with `unexpected fingerprint "124838b44299edfe/kept"`. 2. **Clippy `-D warnings`** on the pinned 1.98.1 finds ~19 errors in `victory-shader`, `victory-gpu`, `victory-loader` (tests) and the `victory` app. ## What this changes Two commits; no runtime behaviour is intended. - **`warm_bad: follow the label warm prints and warm-done.txt keeps`** — read the printed label, take the fingerprint before the `/kept` mark. The message assertions compare the whole label; the `warm-bad.txt` entry and the `warm-done.txt` filter use the fingerprint alone. - **`clippy: clear the workspace's -D warnings errors on 1.98.1`** — mechanical lint fixes (`mem::take`, derived `Default`, `flatten`, `sort_by_key(Reverse)`, collapsed `if`s, `?`, `is_multiple_of`, `checked_div`, `is_ok_and`, `entry()`, and test-only casts). Two exceptions, each with a reason in place: `not_unsafe_ptr_arg_deref` on `title_names_processors`/`title_named_processors` is an `#[allow]` (the pointers are OS thread handles the system validates, not memory we read), and `run_with_progress` gets a `too_many_arguments` allow like the other functions in the tree. ## Verification Toolchain `1.98.1`, as `rust-toolchain.toml` pins: - `cargo clippy --workspace --all-targets --locked -- -D warnings` — clean. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` — clean. - `cargo test --workspace --locked` — `warm_bad_fingerprint_override_again_and_help` passes and no test this PR touches fails. ## Remaining failures on `main` after this PR With `cargo test --workspace --locked --no-fail-fast`, the test job then still fails in `xtask`, for two reasons present at `925ac0a` and untouched here: 1. `policy::tests::repository_passes_policy` — `apps/victory/assets/background.jpg` and `logo.png` are "file type not on the allowlist" and "binary content (NUL bytes)". They came in with `9a70c8c` ("Launcher: GTA VI-styled redesign …"), which did not add them to `xtask/src/policy.rs`. `background.jpg` is a stylized city illustration (not a screenshot), so this looks like a missing entry; it needs your call: a path exception with a reason in `policy.rs`, or dropping the files. 2. `switches::documented_switches_are_read` — `README.md` names `VICTORY_NAME` (the launcher's More placeholder) and no Rust source reads it. Reword it (e.g. `VICTORY_<NAME>=<value>`) or have the launcher read it. The hardware shader tests (`emit::isa_tests`, `emit::typed_half_tests`, `emit::valu_tests` f16) could not run on the machine used for this check: its GPU has no shader model 6.6, so `CreatePipelineState` fails with `E_INVALIDARG`. Nothing in this diff touches them. Two other local failures are toolchain artefacts, not code: `victory-loader --test load_probe` needs MSVC's `/DELAYLOAD` to link its fixture, and one symbolization test in `timeline::report` expects resolved frame names that a GNU/MinGW build does not produce. This fork PR is a first contribution, so the workflow run may wait for approval; approving it shows the same three jobs.
warm.rs prints `<fingerprint>/kept` in the parentheses, and writes the
same label in warm-done.txt, since 3e5cb1d (KEPT). The test still read
the parentheses as a bare 16-hex fingerprint, so
warm_bad_fingerprint_override_again_and_help has failed on main since.

Read the label and take the fingerprint before the `/kept` mark: the
message assertions compare the whole label, while the warm-bad.txt
entry and the warm-done.txt filter use the fingerprint alone.
`cargo clippy --workspace --all-targets` fails on main, so a PR's CI
fails in the Clippy job before its tests run. Mechanical fixes, no
behaviour change intended:

- victory-shader: unnecessary `as usize` in a test helper.
- victory-gpu: mem::take for a taken block, derived Default for
  BufferSweep, `iter().flatten()`, a comparison without `&`, merged
  equal branches in the throttling interval, sort_by_key(Reverse),
  collapsed ifs, `?` for the tile-mapping slot, is_multiple_of, and
  entry() in the flash recorder. The two thread-handle helpers keep
  their signature with a justified allow of
  not_unsafe_ptr_arg_deref (the pointers are OS handles the system
  validates, not memory we read).
- victory-loader tests: an array for the fixed 64-byte buffer, and a
  function pointer bound before its `usize` cast (fn_to_numeric_cast).
- victory app: checked_div for the progress percentage, is_ok_and for
  the metadata check, and one too_many_arguments allow where the
  arguments are a job's own settings.

Verified with rustc 1.98.1 (the toolchain rust-toolchain.toml pins):
`cargo clippy --workspace --all-targets` and the same `--all-features`
are clean. `cargo test --workspace --locked` passes except
victory-loader's `load_probe`, whose fixture needs MSVC's /DELAYLOAD
and so cannot link on the GNU/MinGW toolchain this was checked with.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 02:12:52 +00:00
Author
Owner

@⁠wagney on GitHub · 2026-12-03 02:10 UTC · original

Note: why the CI here sits at action_required

This is not a code problem and not specific to this PR — GitHub is holding the workflow run until a maintainer approves it, and that is the state of the open PRs in general right now.

Evidence from this repository:

  • This PR's run: 47017279648 — completed / action_required, 0 s.
  • The same holds for the runs on the open PR branches: lane-priority-equal-cores 46787685838, agility-sdk-win10 46786637343, docs/lawful-copy-and-repacks 46737400469, series-s-fsr-pc 46713133325, series-s-fsr-hudless 46798949698, xmem-watched-default-alloc 46787695725, amd-integration 46918079941, belobug-texture-diagnostics 46929302609, xmem-windows-ports 46932102033, replay-reserved 46953983655, xor-swizzle-fallback 46957278408. 14 of the last 25 runs in the repository are action_required.
  • Approving alone is not enough at the moment: main at 925ac0a is red (run 46362456337) — three clippy errors in victory-loader plus warm_bad_fingerprint_override_again_and_help failing — so an approved PR run fails in the Clippy job before its own tests run. That is what this PR fixes.

What would help:

  1. Approve the run for this PR (Actions → the run → "Approve and run"). Merging it first clears the two failures every other PR currently inherits once its branch is updated on main.
  2. If PR CI should run without a click each time: Settings → Actions → General → "Fork pull request workflows from outside collaborators". The default is "Require approval for first-time contributors"; the pattern above (every fork run blocked) looks like the stricter "Require approval for all outside collaborators". Workflows on fork PRs get a read-only token and no secrets, so approving runs is the low-risk option.

Nothing is needed from the PR author for the action_required state; it clears when the run is approved.

**@⁠wagney** on GitHub · 2026-12-03 02:10 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/20#issuecomment-7365175692) ### Note: why the CI here sits at `action_required` This is not a code problem and not specific to this PR — GitHub is holding the workflow run until a maintainer approves it, and that is the state of the open PRs in general right now. Evidence from this repository: - This PR's run: [47017279648](https://github.com/ReTerryDavis/ReVIctory/actions/runs/47017279648) — `completed / action_required`, 0 s. - The same holds for the runs on the open PR branches: `lane-priority-equal-cores` [46787685838](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46787685838), `agility-sdk-win10` [46786637343](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46786637343), `docs/lawful-copy-and-repacks` [46737400469](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46737400469), `series-s-fsr-pc` [46713133325](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46713133325), `series-s-fsr-hudless` [46798949698](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46798949698), `xmem-watched-default-alloc` [46787695725](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46787695725), `amd-integration` [46918079941](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46918079941), `belobug-texture-diagnostics` [46929302609](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46929302609), `xmem-windows-ports` [46932102033](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46932102033), `replay-reserved` [46953983655](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46953983655), `xor-swizzle-fallback` [46957278408](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46957278408). 14 of the last 25 runs in the repository are `action_required`. - Approving alone is not enough at the moment: `main` at `925ac0a` is red (run [46362456337](https://github.com/ReTerryDavis/ReVIctory/actions/runs/46362456337)) — three clippy errors in `victory-loader` plus `warm_bad_fingerprint_override_again_and_help` failing — so an approved PR run fails in the Clippy job before its own tests run. That is what this PR fixes. What would help: 1. Approve the run for this PR (Actions → the run → "Approve and run"). Merging it first clears the two failures every other PR currently inherits once its branch is updated on `main`. 2. If PR CI should run without a click each time: Settings → Actions → General → "Fork pull request workflows from outside collaborators". The default is "Require approval for first-time contributors"; the pattern above (every fork run blocked) looks like the stricter "Require approval for all outside collaborators". Workflows on fork PRs get a read-only token and no secrets, so approving runs is the low-risk option. Nothing is needed from the PR author for the `action_required` state; it clears when the run is approved.
github-bot changed title from Fix CI on main: the warm test's /kept label and the workspace's clippy errors to Fix CI's first failures: the warm test's /kept label and the workspace's clippy errors 2026-12-03 02:30:49 +00:00
Author
Owner

@⁠wagney on GitHub · 2026-12-03 02:25 UTC · original

Updated the description with what the local run showed: this clears the Clippy job and the warm_bad test failure; the test job then reaches xtask, which fails for two pre-existing reasons at 925ac0a (the launcher's background.jpg/logo.png are not on the asset-policy allowlist, and the README's VICTORY_NAME placeholder matches no source). Details and suggested fixes are in the Remaining failures section — those two are your policy call, so I left them out of this PR.

**@⁠wagney** on GitHub · 2026-12-03 02:25 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/20#issuecomment-7365449990) Updated the description with what the local run showed: this clears the Clippy job and the `warm_bad` test failure; the test job then reaches `xtask`, which fails for two pre-existing reasons at `925ac0a` (the launcher's `background.jpg`/`logo.png` are not on the asset-policy allowlist, and the README's `VICTORY_NAME` placeholder matches no source). Details and suggested fixes are in the Remaining failures section — those two are your policy call, so I left them out of this PR.
github-bot force-pushed github-bot/gh-20 from 18d8623ed4 to f379f61fd2 2026-12-03 16:29:54 +00:00 Compare
github-bot force-pushed github-bot/gh-20 from 9dc7d9f8f1 to a1d2ba6c10 2026-12-04 02:52:13 +00:00 Compare
github manually merged commit 1038d9b582 into main 2026-12-04 02:52:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.