Tests: the indirect budget tests assert both REST modes instead of the old discard-one #1508
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1508"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by pwu2775-dev on 2026-11-28T05:53:54Z.
What
The two indirect-budget tests failed on the current
main(6b3ce6c) when run by default, and passed only withVICTORY_INDIRECT_REST=1:indirect::tests::host_list_budget_starts_empty_at_each_submissionindirect::tests::warp_batch_charges_every_executionBoth asserted the old spend model (a record after rejected work gets nothing), while the runtime keeps the remaining budget for it by default — the code comment in the budget path says exactly that.
VICTORY_INDIRECT_REST=1selects the old behavior, which is why the suite only passed with the variable set.Fix (tests only, no runtime change)
host_list_budget_starts_empty_at_each_submissionnow runs each assertion under both modes: withREST=0the small record after rejected work executes (hits == round+1per round), withREST=1it consumes the remaining budget (hits == 0), and the "next submission starts empty" check covers both.warp_batch_charges_every_executionderives its expected spend per mode instead of assuming one model; the shader source is switched per run via aREST ?placeholder.REST=1.VICTORY_INDIRECT_RESTspend model.Verification
cargo test -p victory-gpu --locked --lib: 454 passed, 35 skipped, 0 failed (default mode), including the reviewer's mutant-strengthened test.VICTORY_INDIRECT_REST=1: target tests pass in that mode too.cargo test --workspace --locked -- --test-threads=1on this branch: exit code 0, all suites pass (the run that was interrupted earlier completed successfully afterwards).cargo clippy --workspaceis not clean on this base: the warnings exist onmainitself (pre-existing), this PR adds none.59d332c; the strengthened records follow their review.Known limits
mainalready due to two oversized source files unrelated to this PR.Imported from fxceless/victory-fork. Originally posted by murillojndem on 2026-11-28T06:59:45Z.
Checked on an AMD Radeon RX 7900 XT (RDNA 3, driver 32.0.32015.7029) and WARP, Windows 11, at this PR's head
59d332c: both tests pass with the default and withVICTORY_INDIRECT_REST=1. On6b3ce6cthey fail with the default and pass withVICTORY_INDIRECT_REST=1, as you describe.One gap in
host_list_budget_starts_empty_at_each_submissionwith the default (restoff): two of the three records fit and leave 2,048 of the budget, so the small record fits whether or not the budget was zeroed for the next submission. Against a mutant that zeroes a list's budget only once per process (HostList::budgetinhost.rs), this test still passes with the default and fails only withVICTORY_INDIRECT_REST=1.Two records of 32,768 x 32 groups cost exactly half the budget each (2^26), so they fill it in either mode. With them, and the test's original expectations (0 in each round, 1 at the end), the test passes on this branch in both modes and fails against that mutant in both modes. The change to the records:
warp_batch_charges_every_executionas changed here runs both modes in one run and needs no change.Also, the description names
warp_a_record_that_does_not_fit_may_take_nothing; the diff changeshost_list_budget_starts_empty_at_each_submission.AI use: Claude Code ran the tests and drafted this comment; posted at my request.
Imported from fxceless/victory-fork. Originally posted by pwu2775-dev on 2026-11-28T11:06:19Z.
Applied as
41b43c2: two records of 32,768 x 32 groups cost exactly half the budget each, the small record after them runs only when the next submission starts empty, and the original expectations (0 in each round, 1 at the end) hold in both modes. Verified: 454 passed / 0 failed on the default, and the target tests pass with VICTORY_INDIRECT_REST=1. Thank you for the catch and the concrete diff — also fixed the test name in the description (host_list_budget_starts_empty_at_each_submission, not warp_a_record_that_does_not_fit_may_take_nothing).Imported from fxceless/victory-fork. Originally posted by pwu2775-dev on 2026-11-28T11:07:11Z.
Marked ready for review: the review's mutant-strengthened records are applied (
41b43c2), the full GPU lib suite passes in the default mode (454 passed / 0 failed), the target tests pass with VICTORY_INDIRECT_REST=1, and the independent verification on RX 7900 XT + WARP stands.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.