Watch: make the open-done wait test independent of scheduler delays #4630

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

@⁠tyr0nsur on GitHub · 2026-12-01 00:17 UTC · original
tyr0nsur:codex/watch-open-wait-clock-20261201 → main · +29 −10 · 1 files · 1 commits · open

What it changes

The cooperative-yield case of watch::ask_holds::wait_open_done_covers_immediate_fast_spin_yield_cleared_and_timeout expects the sixth is_done poll to return Done before 10 ms of real time elapse. A scheduling delay during the cooperative phase can make that same poll sequence return TimedOut. This was reported on main in #4380 and happened again in the Windows check for #4596.

The test now advances a controlled clock, checks that the immediate and fast-spin paths read no clock, and covers completion, clearing and the exact deadline. Production passes Instant::now and retains the same poll order, budget and cooperative yields.

How it was tested

  • GPU and profile: Windows 11, Ryzen 7 5800X. The wait test only needs the CPU and uses no title data.
  • Before: the isolated helper and test reproduced TimedOut instead of Done with a simulated 20 ms scheduling pause in the first cooperative poll.
  • After: the same isolated test passed with the simulated pause. The timeout case still checks the exact 2,000 µs boundary.
  • cargo test --locked -p victory-gpu --lib: 1133 passed, 66 ignored.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings passed. Staged asset policy passed.

Checked for overlap

  • I searched open and closed issues and pull requests for the test, helper and symptom, and listed the open PRs touching watch.rs. Related: #2814 introduced the wait, #4380 reports the flake, and #4620 addresses a separate watch test involving the shared journal. I found no open PR changing this test or helper to control the clock.

Reviewed with Claude Code (Opus 5.5).

**@⁠tyr0nsur** on GitHub · 2026-12-01 00:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4629) `tyr0nsur:codex/watch-open-wait-clock-20261201` → `main` · +29 −10 · 1 files · 1 commits · open ## What it changes The cooperative-yield case of `watch::ask_holds::wait_open_done_covers_immediate_fast_spin_yield_cleared_and_timeout` expects the sixth `is_done` poll to return `Done` before 10 ms of real time elapse. A scheduling delay during the cooperative phase can make that same poll sequence return `TimedOut`. This was reported on main in #4380 and happened again in the [Windows check for #4596](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46540895872/job/142278961513). The test now advances a controlled clock, checks that the immediate and fast-spin paths read no clock, and covers completion, clearing and the exact deadline. Production passes `Instant::now` and retains the same poll order, budget and cooperative yields. ## How it was tested - GPU and profile: Windows 11, Ryzen 7 5800X. The wait test only needs the CPU and uses no title data. - Before: the isolated helper and test reproduced `TimedOut` instead of `Done` with a simulated 20 ms scheduling pause in the first cooperative poll. - After: the same isolated test passed with the simulated pause. The timeout case still checks the exact 2,000 µs boundary. - `cargo test --locked -p victory-gpu --lib`: 1133 passed, 66 ignored. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` passed. Staged asset policy passed. ## Checked for overlap - [x] I searched open and closed issues and pull requests for the test, helper and symptom, and listed the open PRs touching `watch.rs`. Related: #2814 introduced the wait, #4380 reports the flake, and #4620 addresses a separate watch test involving the shared journal. I found no open PR changing this test or helper to control the clock. Reviewed with Claude Code (Opus 5.5).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 00:23:33 +00:00
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/4630/head:github-bot/gh-4629'
git switch 'github-bot/gh-4629'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4629'
git switch 'github-bot/gh-4629'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4629'
git switch 'github-bot/gh-4629'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4629'
git switch 'main'
git merge --squash 'github-bot/gh-4629'
git switch 'main'
git merge --ff-only 'github-bot/gh-4629'
git switch 'main'
git merge 'github-bot/gh-4629'
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!4630
No description provided.