Indirect test: the two groups charge the budget in either order (the test failed 5 runs in 6) #848

Open
MamaLeVrai wants to merge 1 commit from upstream-pr/849 into main
MamaLeVrai commented 2026-11-25 10:37:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T10:37:31Z.


indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields fails most of the time on main (f85101b) on this machine (Windows 11, RX 6950 XT, Rust 1.98.1): 5 of 6 runs of the test alone, and 4 of 15 runs of cargo test -p victory-gpu --lib, with

panicked at crates\victory-gpu\src\indirect.rs:1539:17:
the first two real draws fit the budget

Why. The test has 128 records, two groups of 64. Each group charges the list's budget once, and takes its records in lane order (the comment in the clamp shader says so). Which of the two groups charges first is up to the card, or up to WARP's threads here. If the second group goes first, the draws that fit are records 64 and 65, not 1 and 2, and the test's assert!(i == 1 || i == 2) fails.

The change. The test now collects the kept records and asserts they are [1, 2] or [64, 65] (the first two real draws of the group that charged first), then runs the rest of its checks as before (two kept, the others zeroed, the fields untouched, the budget saturated at 2^27 without wrapping). Only the test changes.

Checks. The test alone, 25 runs with this change: 0 failures (before: 5 of 6 failed). I did not run the whole suite again with this change; it touches the one test. I could not tell which of the two outcomes WARP gives in a run, only that the old assertion fails often.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6602548787 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T10:37:31Z. --- `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` fails most of the time on `main` (`f85101b`) on this machine (Windows 11, RX 6950 XT, Rust 1.98.1): 5 of 6 runs of the test alone, and 4 of 15 runs of `cargo test -p victory-gpu --lib`, with ``` panicked at crates\victory-gpu\src\indirect.rs:1539:17: the first two real draws fit the budget ``` **Why.** The test has 128 records, two groups of 64. Each group charges the list's budget once, and takes its records in lane order (the comment in the clamp shader says so). Which of the two groups charges first is up to the card, or up to WARP's threads here. If the second group goes first, the draws that fit are records 64 and 65, not 1 and 2, and the test's `assert!(i == 1 || i == 2)` fails. **The change.** The test now collects the kept records and asserts they are `[1, 2]` or `[64, 65]` (the first two real draws of the group that charged first), then runs the rest of its checks as before (two kept, the others zeroed, the fields untouched, the budget saturated at 2^27 without wrapping). Only the test changes. **Checks.** The test alone, 25 runs with this change: 0 failures (before: 5 of 6 failed). I did not run the whole suite again with this change; it touches the one test. I could not tell which of the two outcomes WARP gives in a run, only that the old assertion fails often. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-25 11:10:27 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T10:37:46Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:fxceless/victory-fork:review:6055993324 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#pullrequestreview-6055993324). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-25T10:37:46Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
eazyves commented 2026-11-25 11:10:39 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by eazyves on 2026-11-25T10:51:32Z.


Confirmed on a Windows 11 / RX 9070 XT machine: the test alone fails 100 of 100 times on main f85101b and passes 100 of 100 times with this PR (8971052, same base).

victory-gpu lib test binary main f85101b this PR
this test alone, 100 runs: failures 100 0
whole binary, default threads, 100 runs: this test failed 60 0

The whole-binary runs also have failures this PR doesn't touch: inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset in 4 of 100 runs of main and 7 of 100 here, and three watch::tests tests once each in this PR's 100 runs.

Driver 32.0.32029.2010, Ryzen 7 5800X3D, Windows 11 26200, run from a service session. No game data. AI-assisted (Claude Code); run on my machine.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7160267129 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#issuecomment-7160267129). Originally posted by [eazyves](https://github.com/eazyves) on 2026-11-25T10:51:32Z. --- **Confirmed on a Windows 11 / RX 9070 XT machine: the test alone fails 100 of 100 times on `main` f85101b and passes 100 of 100 times with this PR (8971052, same base).** | `victory-gpu` lib test binary | `main` f85101b | this PR | |---|---|---| | this test alone, 100 runs: failures | 100 | 0 | | whole binary, default threads, 100 runs: this test failed | 60 | 0 | The whole-binary runs also have failures this PR doesn't touch: `inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset` in 4 of 100 runs of `main` and 7 of 100 here, and three `watch::tests` tests once each in this PR's 100 runs. Driver 32.0.32029.2010, Ryzen 7 5800X3D, Windows 11 26200, run from a service session. No game data. AI-assisted (Claude Code); run on my machine.
MamaLeVrai commented 2026-11-25 12:07:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T11:26:35Z.


Thank you for the 100-run confirmation on a different card and a different Windows build: on my RX 6950 XT the test alone failed 5 of 6 times on main, so the two machines agree that the assertion is what fails.

On the other failures you list: I saw inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset fail once in two runs of another PR's tree (#520) on my machine too, so it looks like a failure of main and not of a PR. I will look at that one next.

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

<!-- greyfinch-sync:fxceless/victory-fork:comment:7161052949 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#issuecomment-7161052949). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T11:26:35Z. --- Thank you for the 100-run confirmation on a different card and a different Windows build: on my RX 6950 XT the test alone failed 5 of 6 times on `main`, so the two machines agree that the assertion is what fails. On the other failures you list: I saw `inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset` fail once in two runs of another PR's tree (#520) on my machine too, so it looks like a failure of `main` and not of a PR. I will look at that one next. AI-assisted (Claude Code); no game data.
tikD1337 commented 2026-11-25 14:10:48 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tikD1337 on 2026-11-25T13:18:56Z.


Reproduced and confirmed on a different machine: Windows 11, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Ryzen 5 7600, Rust 1.98.1.

  • main @ a253706, cargo test --release -p victory-gpu --lib warp_budget_saturates -- --test-threads=1, 10 runs: 4 failed (indirect.rs:1539, "the first two real draws fit the budget").
  • The same command with this PR merged on a253706, 10 runs: 0 failed.
  • cargo test --release -p victory-gpu --lib -- --test-threads=1 with this PR: 169 passed, 0 failed, 5 ignored.

The test runs on WARP, so the GPU should not matter; it fails on this NVIDIA / Ryzen machine too, not only on the RX 6950 XT.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7163598637 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#issuecomment-7163598637). Originally posted by [tikD1337](https://github.com/tikD1337) on 2026-11-25T13:18:56Z. --- Reproduced and confirmed on a different machine: Windows 11, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Ryzen 5 7600, Rust 1.98.1. - `main` @ `a253706`, `cargo test --release -p victory-gpu --lib warp_budget_saturates -- --test-threads=1`, 10 runs: **4 failed** (`indirect.rs:1539`, "the first two real draws fit the budget"). - The same command with this PR merged on `a253706`, 10 runs: **0 failed**. - `cargo test --release -p victory-gpu --lib -- --test-threads=1` with this PR: 169 passed, 0 failed, 5 ignored. The test runs on WARP, so the GPU should not matter; it fails on this NVIDIA / Ryzen machine too, not only on the RX 6950 XT.
MamaLeVrai commented 2026-11-25 14:10:51 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T13:41:02Z.


Thank you for running it on an NVIDIA / Ryzen machine: 4 of 10 on main and 0 of 10 with this PR agrees with what I saw on the RX 6950 XT, and it fits the test running on WARP.

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

<!-- greyfinch-sync:fxceless/victory-fork:comment:7164135432 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#issuecomment-7164135432). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T13:41:02Z. --- Thank you for running it on an NVIDIA / Ryzen machine: 4 of 10 on `main` and 0 of 10 with this PR agrees with what I saw on the RX 6950 XT, and it fits the test running on WARP. AI-assisted (Claude Code); no game data.
HailLucifer666 commented 2026-11-25 14:10:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HailLucifer666 on 2026-11-25T14:05:12Z.


Evidence from a fourth machine (Windows, WARP, this repo's own suite), and one thing your two PRs between them have established that neither body says: this is a regression, not a missing nicety.

main already had an order-independent version of this test — (kept, zeroed) == (2, 126), naming no indices — from 578d459c. f85101b6 (Frame rate, second night) changed that block back to assert!(i == 1 || i == 2, ...), so every branch built on it inherits the failure.

Measured: full suite, four processes at a time, twelve runs on f85101b6 without the patch — 2 of 12 failed with panicked at indirect.rs:1611: the first two real draws fit the budget. With the patch applied, 0 of 12. Idle and serial runs never reproduce it (34 runs clean), which is why it looked machine-specific.

I have opened #970 taking MamaLeVrai's #849 verbatim so the branches under review have it; if #847 lands instead it is equivalent and #970 can be closed unmerged. Credit for the diagnosis is entirely yours — two people on two machines reaching the same cause is stronger evidence than either measurement alone.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7164734935 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/849#issuecomment-7164734935). Originally posted by [HailLucifer666](https://github.com/HailLucifer666) on 2026-11-25T14:05:12Z. --- Evidence from a fourth machine (Windows, WARP, this repo's own suite), and one thing your two PRs between them have established that neither body says: **this is a regression, not a missing nicety.** `main` already had an order-independent version of this test — `(kept, zeroed) == (2, 126)`, naming no indices — from `578d459c`. `f85101b6` (*Frame rate, second night*) changed that block back to `assert!(i == 1 || i == 2, ...)`, so every branch built on it inherits the failure. Measured: full suite, four processes at a time, twelve runs on `f85101b6` without the patch — 2 of 12 failed with `panicked at indirect.rs:1611: the first two real draws fit the budget`. With the patch applied, 0 of 12. Idle and serial runs never reproduce it (34 runs clean), which is why it looked machine-specific. I have opened #970 taking `MamaLeVrai`'s #849 verbatim so the branches under review have it; if #847 lands instead it is equivalent and #970 can be closed unmerged. Credit for the diagnosis is entirely yours — two people on two machines reaching the same cause is stronger evidence than either measurement alone.
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/849:upstream-pr/849'
git switch 'upstream-pr/849'

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/849'
git switch 'upstream-pr/849'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/849'
git switch 'upstream-pr/849'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/849'
git switch 'main'
git merge --squash 'upstream-pr/849'
git switch 'main'
git merge --ff-only 'upstream-pr/849'
git switch 'main'
git merge 'upstream-pr/849'
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
fxceless/victory-fork!848
No description provided.