Tests after the clippy fixes: the asset policy refuses heap_sites/frame_users.rs, three parallel-run flakes, a diag-only compose test #2420

Open
opened 2026-11-29 12:53:28 +00:00 by boraswim · 8 comments
boraswim commented 2026-11-29 12:53:28 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T12:53:28Z.


On main (829188e9), once the clippy step passes (#2048, plus #2236 for the BCPack oracle), cargo test --workspace --locked on Windows still has one deterministic failure, plus a few that only show up there. CI has not reached the test step since the clippy errors landed, so none of these have shown in a run yet.

1. Asset policy refuses frame_users.rs (blocks CI)

POLICY: crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals (embedded data?)
test policy::tests::repository_passes_policy ... FAILED

The file came in with 2840358 ("Sync the title's view heap by what its hooked stores wrote", VICTORY_HEAP_HOOKS=1). It is generated by the heap-hooks site generator. Its ROWS table holds image offsets, window lengths and BLAKE3-64 tags, not the title's bytes, as its module docs say. But longest_hex_literal_run counts its 0x literals as one run past MAX_ENCODED_RUN (512). pool_users.rs, beside it, passes.

docs/asset-policy.md says a violation that lands needs a history rewrite, so this needs a maintainer to decide:

  • whether these generated site tables are acceptable in the tree (and if so, an explicit exception in xtask/src/policy.rs for heap_sites/*_users.rs), or
  • whether the generator should write them in a form the policy accepts (for example decimal offsets, or tags split per row), or
  • whether the table should live outside the repo and be read at run time, like the shader cache.

No open PR touches this. #1290 only adds the ini extension.

2. Tests that fail only under the full parallel run

Each passes when run on its own (twice each, same machine), so they look like shared-state or timing interference between tests:

  • victory-hle: modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it (xmem.rs:4958, "a read apart from the remapping had to wait", left 5861, right 0). It failed in 2 of 3 full runs.
  • victory-gpu: host::card_steps::tests::places_written_after_sending_are_learned (card_steps.rs:2118) and host::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue (uav_pool.rs:488, !spare_has(bet4m_raw, 4 << 20)). They failed in 1 of 2 full runs.

3. A diagnostics-only test that was hidden by the broken diag build

With the diag build compiling again (#2048 / #2208), cargo test -p victory-gpu --features diagnostics fails deterministically:

compose::tests::bgrx_plane_selects_a_typed_view
assertion `left == right` failed
  left: Some(DXGI_FORMAT(88))   // B8G8R8X8_UNORM
 right: Some(DXGI_FORMAT(93))   // B8G8R8X8_UNORM_SRGB

CI does not run tests with --features diagnostics (only clippy), so this does not block CI. But either the test or the view choice for BGRX planes is out of step.

Environment

Windows 11, rustc 1.98.1 (pinned toolchain), x86_64-pc-windows-msvc, RTX 4070 SUPER 12 GB (driver 621.40). Command: cargo test --workspace --locked --no-fail-fast, run on main plus the clippy fixes equivalent to #2048 and the oracle fix from #2236.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6678939903 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T12:53:28Z. --- On main (829188e9), once the clippy step passes (#2048, plus #2236 for the BCPack oracle), `cargo test --workspace --locked` on Windows still has one deterministic failure, plus a few that only show up there. CI has not reached the test step since the clippy errors landed, so none of these have shown in a run yet. ## 1. Asset policy refuses `frame_users.rs` (blocks CI) ``` POLICY: crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals (embedded data?) test policy::tests::repository_passes_policy ... FAILED ``` The file came in with 2840358 ("Sync the title's view heap by what its hooked stores wrote", `VICTORY_HEAP_HOOKS=1`). It is generated by the heap-hooks site generator. Its `ROWS` table holds image offsets, window lengths and BLAKE3-64 tags, not the title's bytes, as its module docs say. But `longest_hex_literal_run` counts its `0x` literals as one run past `MAX_ENCODED_RUN` (512). `pool_users.rs`, beside it, passes. `docs/asset-policy.md` says a violation that lands needs a history rewrite, so this needs a maintainer to decide: - whether these generated site tables are acceptable in the tree (and if so, an explicit exception in `xtask/src/policy.rs` for `heap_sites/*_users.rs`), or - whether the generator should write them in a form the policy accepts (for example decimal offsets, or tags split per row), or - whether the table should live outside the repo and be read at run time, like the shader cache. No open PR touches this. #1290 only adds the `ini` extension. ## 2. Tests that fail only under the full parallel run Each passes when run on its own (twice each, same machine), so they look like shared-state or timing interference between tests: - `victory-hle`: `modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it` (`xmem.rs:4958`, "a read apart from the remapping had to wait", left 5861, right 0). It failed in 2 of 3 full runs. - `victory-gpu`: `host::card_steps::tests::places_written_after_sending_are_learned` (`card_steps.rs:2118`) and `host::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue` (`uav_pool.rs:488`, `!spare_has(bet4m_raw, 4 << 20)`). They failed in 1 of 2 full runs. ## 3. A diagnostics-only test that was hidden by the broken diag build With the diag build compiling again (#2048 / #2208), `cargo test -p victory-gpu --features diagnostics` fails deterministically: ``` compose::tests::bgrx_plane_selects_a_typed_view assertion `left == right` failed left: Some(DXGI_FORMAT(88)) // B8G8R8X8_UNORM right: Some(DXGI_FORMAT(93)) // B8G8R8X8_UNORM_SRGB ``` CI does not run tests with `--features diagnostics` (only clippy), so this does not block CI. But either the test or the view choice for BGRX planes is out of step. ## Environment Windows 11, rustc 1.98.1 (pinned toolchain), x86_64-pc-windows-msvc, RTX 4070 SUPER 12 GB (driver 621.40). Command: `cargo test --workspace --locked --no-fail-fast`, run on main plus the clippy fixes equivalent to #2048 and the oracle fix from #2236.
github-actions[bot] commented 2026-11-29 12:53:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T12:53:36Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256138210 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7256138210). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T12:53:36Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
boraswim commented 2026-11-29 13:07:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T13:07:41Z.


No play or crash logs apply here: these are cargo test results with no game run, and the test output is quoted in the issue. The needs-logs label can go. The xmem flake from item 2 has a fix in #2439, and I'm taking item 3 (compose::tests::bgrx_plane_selects_a_typed_view) next.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256308865 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7256308865). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T13:07:41Z. --- No play or crash logs apply here: these are `cargo test` results with no game run, and the test output is quoted in the issue. The `needs-logs` label can go. The xmem flake from item 2 has a fix in #2439, and I'm taking item 3 (`compose::tests::bgrx_plane_selects_a_typed_view`) next.
boraswim commented 2026-11-29 14:48:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T14:48:22Z.


One more, from the review of #2439: victory_gpu::watch::range_lock() has a first-use race. Its first caller reads VICTORY_RANGE_LOCK and stores 1 or 2, so a test that calls set_range_lock(true) while another thread is in that first read can be switched back off (watch.rs around RANGE_LOCK). Harmless in a run, where the env var decides it once, but tests that rely on set_range_lock can lose it. A compare_exchange from 0 in range_lock() would close it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7257590178 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7257590178). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T14:48:22Z. --- One more, from the review of #2439: `victory_gpu::watch::range_lock()` has a first-use race. Its first caller reads `VICTORY_RANGE_LOCK` and stores 1 or 2, so a test that calls `set_range_lock(true)` while another thread is in that first read can be switched back off (`watch.rs` around `RANGE_LOCK`). Harmless in a run, where the env var decides it once, but tests that rely on `set_range_lock` can lose it. A `compare_exchange` from 0 in `range_lock()` would close it.
boraswim commented 2026-11-29 15:33:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T15:33:31Z.


Status from my side: item 3 is #2646, the switch race is #2650, and the xmem range-lock flake is #2439. I'm taking these next:

  • xmem::tests::large_default_allocations_honour_write_watch_switch: the after-free MEM_FREE check races with other tests reserving the freed range.
  • watch::many_askers_tests::no_mapping_is_lost_between_askers: a parallel-run flake.
  • After #2439 lands: make a_read_by_range_waits_only_for_a_remapping_that_meets_it really open a remap gap (two page sets with the same bytes, plus a start barrier), as suggested in its review.

card_steps isolation is in #2486 and the F1 menu tests are in #2500, so I'm leaving those.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258184488 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7258184488). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T15:33:31Z. --- Status from my side: item 3 is #2646, the switch race is #2650, and the xmem range-lock flake is #2439. I'm taking these next: - `xmem::tests::large_default_allocations_honour_write_watch_switch`: the after-free `MEM_FREE` check races with other tests reserving the freed range. - `watch::many_askers_tests::no_mapping_is_lost_between_askers`: a parallel-run flake. - After #2439 lands: make `a_read_by_range_waits_only_for_a_remapping_that_meets_it` really open a remap gap (two page sets with the same bytes, plus a start barrier), as suggested in its review. `card_steps` isolation is in #2486 and the F1 menu tests are in #2500, so I'm leaving those.
boraswim commented 2026-11-29 15:55:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T15:55:58Z.


I'm dropping watch::many_askers_tests::no_mapping_is_lost_between_askers, so it's free for anyone. What I found:

  • It fails at the last check, assert!(super::published(at, end)) (watch.rs:6411), and only in the full parallel victory-gpu run: 0 failures in 200 runs of the test alone, and 0 in 15 full runs today.
  • It's not the look_at_holes sweep from draw frames: a thread sweeping without pause during the test gave no failures.
  • A lead I didn't confirm: the mapper threads map and unmap without title_memory_remapping_of around the change, as the runtime does, so CHANGING is never set and title_memory_unmapping records no change in progress while the askers refresh.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258482606 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7258482606). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T15:55:58Z. --- I'm dropping `watch::many_askers_tests::no_mapping_is_lost_between_askers`, so it's free for anyone. What I found: - It fails at the last check, `assert!(super::published(at, end))` (`watch.rs:6411`), and only in the full parallel `victory-gpu` run: 0 failures in 200 runs of the test alone, and 0 in 15 full runs today. - It's not the `look_at_holes` sweep from draw frames: a thread sweeping without pause during the test gave no failures. - A lead I didn't confirm: the mapper threads map and unmap without `title_memory_remapping_of` around the change, as the runtime does, so `CHANGING` is never set and `title_memory_unmapping` records no change in progress while the askers refresh.
boraswim commented 2026-11-29 15:56:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T15:56:54Z.


I'm taking modules::xg::tests::library_state_and_lock (victory-hle) in its place. It failed once in 12 parallel runs here. It turns the XG library's process-wide state on and off (initialize/terminate, hardware version, exclusive locking) while other xg tests run beside it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258494852 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7258494852). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T15:56:54Z. --- I'm taking `modules::xg::tests::library_state_and_lock` (victory-hle) in its place. It failed once in 12 parallel runs here. It turns the XG library's process-wide state on and off (initialize/terminate, hardware version, exclusive locking) while other xg tests run beside it.
P1ayer-1 commented 2026-11-29 19:00:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by P1ayer-1 on 2026-11-29T19:00:18Z.


Taking item 1 only (the asset-policy refusal that blocks the test step): heap_sites/frame_users.rs and the 2022-digit literal run.

Shape I went with: the third option is not needed and the second is not available to me (the file is generated by the heap-hooks site generator from the title's image, so I cannot regenerate it) — instead, the literal-run rule alone is lifted for that one path, with its reason next to it, keeping the size, text, type and magic checks on it. EXCEPTIONS was the wrong tool: it skips every check for a path, which for a .rs file is more than this needs.

Verified on Windows: cargo test -p xtask fails on main with the exact line in the issue, and passes with the change (8 passed, including a new test that the same literal run is still refused under any other name, and that the magic and size checks still apply to this path).

I am not touching item 2 (the parallel-run flakes) or item 3 (the diagnostics test) — item 3 is behind a diagnostics feature that does not compile on main, and the B8G8R8X8_UNORM_SRGB expectation contradicts compose::view's documented choice to read sRGB planes as plain UNORM, so that one wants whoever owns that decision.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7260929184 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7260929184). Originally posted by [P1ayer-1](https://github.com/P1ayer-1) on 2026-11-29T19:00:18Z. --- Taking **item 1** only (the asset-policy refusal that blocks the test step): `heap_sites/frame_users.rs` and the 2022-digit literal run. Shape I went with: the third option is not needed and the second is not available to me (the file is generated by the heap-hooks site generator from the title's image, so I cannot regenerate it) — instead, the literal-run rule alone is lifted for that one path, with its reason next to it, keeping the size, text, type and magic checks on it. `EXCEPTIONS` was the wrong tool: it skips every check for a path, which for a `.rs` file is more than this needs. Verified on Windows: `cargo test -p xtask` fails on main with the exact line in the issue, and passes with the change (8 passed, including a new test that the same literal run is still refused under any other name, and that the magic and size checks still apply to this path). I am not touching item 2 (the parallel-run flakes) or item 3 (the diagnostics test) — item 3 is behind a `diagnostics` feature that does not compile on main, and the `B8G8R8X8_UNORM_SRGB` expectation contradicts `compose::view`'s documented choice to read sRGB planes as plain UNORM, so that one wants whoever owns that decision.
boraswim commented 2026-11-29 19:01:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T19:01:16Z.


@P1ayer-1 thanks for taking item 1. Item 3 is already in #2646: the test was stale, not view(). 95f6ef0f's 'read sRGB planes as plain UNORM' came first, and the BGRX test (29473fb) was written on a base without it, so #2646 changes the test's expectation and adds the BGRA/RGBA sRGB cases. Item 2's xmem flakes are #2439 and a write-watch test fix that's coming next, and the switch race is #2650.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7260942320 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2420#issuecomment-7260942320). Originally posted by [boraswim](https://github.com/boraswim) on 2026-11-29T19:01:16Z. --- @P1ayer-1 thanks for taking item 1. Item 3 is already in #2646: the test was stale, not `view()`. 95f6ef0f's 'read sRGB planes as plain UNORM' came first, and the BGRX test (29473fb) was written on a base without it, so #2646 changes the test's expectation and adds the BGRA/RGBA sRGB cases. Item 2's xmem flakes are #2439 and a write-watch test fix that's coming next, and the switch race is #2650.
Sign in to join this conversation.
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#2420
No description provided.