Skip to content

test: Let scroll tests wait out slow WebGPU frames - #25140

Open
MartinZikmund wants to merge 3 commits into
masterfrom
dev/mazi/webgpu-test-stability
Open

MartinZikmund wants to merge 3 commits into
masterfrom
dev/mazi/webgpu-test-stability

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #25139

PR Type:

🐞 Bugfix / 🏗️ Build or CI related changes

What changed? 🚀

Stabilizes the scroll, InteractionTracker and ScrollPresenter runtime tests on the slow-frame WebGPU lanes (SwiftShader frames of 250 ms+). The product behavior is correct on slow frames; the tests assumed ~60 fps.

In the 8 days to 2026-10-09, 36 of 39 master builds had a failed WebGPU job. This is one piece of the stabilization work tracked in #25139. The PR was originally broader and was split to keep each review small. The rest lives in:

Fixes

Cluster Cause Change Kind
Given_InteractionTracker ×3 (since #24736) WaitTrackerLogs read "logs quiet for 100 ms" as "motion done"; since the tracker moves once per frame, a 250 ms+ software frame ends that early. The product is correct on slow frames Wait for IdleStateEntered test
ScrollPresenterTests ×3 (un-ignored by #24737) The upstream MUX tests assume ~60 fps: a 50–1000 ms animation lands in one or two SwiftShader frames, so there's nothing to observe or interrupt mid-flight Stretch offsets-change animations to 1–5 s via ScrollPresenterTestHooks (restored on dispose) test
Given_ScrollView wheel-notch tests A queued ScrollTo needs a few ticks, which outlast the 1 s WaitFor default; a 125 ms curve can't be sampled by 250 ms frames 10 s waits; the curve check reports Inconclusive only when frames are measurably longer than a third of the curve test

Both scroll clusters were reproduced locally on WASM + Chrome SwiftShader (same assertions as CI) and pass after the change.

Results (CI build 238511, every WebGPU lane forced on, all fixes combined)

WebGPU lane Failed tests, all attempts Before (8-day window, builds with test failures)
WebAssembly (12 groups) 0 41 / 43
Android (5 groups) 0 21 / 43

Pre-existing, not addressed here (fail on master too)

ScrollPresenterTests.OffsetsChangeWithCustomDuration (Linux Framebuffer, every master build).

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01TP1JtY64etkfxxGCms44aN

@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation labels Oct 9, 2026
@github-actions github-actions Bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Oct 9, 2026
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238511 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1139

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • DropDownButtonPage.png-dark
    • Examples.png
  • skia-windows-screenshots: 1139 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppWindowFeatures.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics.png-dark
    • Basics.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • Border_CornerRadius_Alignments.png-dark
    • Border_CornerRadius_Alignments.png
    • Border_LinearGradientBrush.png-dark
    • Border_LinearGradientBrush.png
    • Button_Opacity_Automated.png-dark

@github-actions github-actions Bot added the platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform label Oct 9, 2026
@unoplatform unoplatform deleted a comment from nventive-devops Oct 9, 2026
@unoplatform unoplatform deleted a comment from nventive-devops Oct 9, 2026
@MartinZikmund
MartinZikmund marked this pull request as ready for review October 9, 2026 20:05
Copilot AI balanced review requested due to automatic review settings October 9, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 22s —— View job


Review summary

Verdict: ship, with minor notes.

  • Issues: 0 high, 1 medium (Assert.Inconclusive in Given_ScrollView), 1 low (a timing-based wait in Given_FramePacer). Both are inline.
  • The FramePacer fix (requests and disposal serialized under a lock, with a disposed check) addresses the root cause. The new unit tests cover it.
  • The macOS UNOWindow change (releasedWhenClosed = NO, detach the rendering view, release from windows on a later main-queue turn) is a root-cause fix for the early dealloc. As the PR notes, the regression test isn't proven to fail without the fix, and the Objective-C was only compiled on CI.
  • The earlier floating-point equality comment was fixed in 27c4291.
  • Review was by code inspection only. I did not build or run anything.

var frameMs = (samples[^1].Ms - samples[0].Ms) / (samples.Count - 1);
if (frameMs > durationMs / 3)
{
Assert.Inconclusive($"frames ({frameMs:F0} ms) are too long to sample a {durationMs:F0} ms curve");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert.Inconclusive turns a potential regression in the wheel-notch curve into a non-failing result on any slow lane, which is exactly the lane class this PR is stabilizing. Please confirm the threshold (durationMs / 3) can't be hit on fast lanes where the curve genuinely regressed (e.g. a one-frame jump), or gate it on a measured per-lane frame time rather than the sampled span of the very data under test.

pacer.Dispose();

pacer.RequestFrame();
pacer.UpdateTargetFps(30);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Thread.Sleep(100) as a negative wait is timing-based and slow-ish; since the pacer is disposed, it's fine, but a 1 ms interval clamp means a leaked tick would fire well within 100 ms, so this is acceptable. Consider a shorter wait to keep the unit suite fast.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238665 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1146

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DropDownButtonPage.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageBrushAlignmentXY.png-dark
  • skia-windows-screenshots: 1146 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ApplicationViewSpanningRectsPage.png
    • AppWindowFeatures.png
    • Attributed_text_Simple.png-dark
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • BorderTopwithmargins.png-dark
    • BorderTopwithmargins.png
    • Border_AntiAlias.png-dark
    • Border_AntiAlias.png
    • Button_Events.png-dark
    • Button_Events.png
    • ColorAnimationUsingKeyFrames_Fill.png-dark
    • ColorAnimationUsingKeyFrames_Fill.png
    • ComboBox_Simple.png-dark
    • ComboBox_Simple.png
    • Contacts_Pick.png-dark

MartinZikmund and others added 3 commits October 10, 2026 23:12
Since #24736 the tracker advances once per frame instead of on a 17ms
timer. WaitTrackerLogs returned once the logs were unchanged for 100ms,
so on software-rendered lanes (WebGPU on SwiftShader), where a frame
takes longer than that, it sampled the logs mid-motion and saw 0-1
ValuesChanged. Wait for IdleStateEntered instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
The animated offsets tests enabled by #24737 assume ~60fps: they expect
several ViewChanged within a 50-1000ms animation, and a cancel or
interrupt (queued for 3 ticks, as in WinUI) to land before it ends. On
WebGPU/SwiftShader a frame takes hundreds of ms, so the animation
completes in one or two frames. Lengthen offsets-change animations to
1-5s in these tests via ScrollPresenterTestHooks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
A queued ScrollTo needs a few ticks, which outlast the 1s default on software-rendered WebGPU. When frames are longer than the curve itself there is nothing to sample, so that check reports inconclusive instead of failing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
Copilot AI balanced review requested due to automatic review settings October 10, 2026 21:30
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/webgpu-test-stability branch from 27c4291 to 0febd6b Compare October 10, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 17s —— View job


Review summary

Verdict: ship, with minor notes. This was a code-inspection review only. I did not build or run anything.

  • Issues: 0 high, 1 medium, 1 low. Both are already raised inline by the earlier review (Assert.Inconclusive in Given_ScrollView, and the timing-based wait in Given_FramePacer), so I did not repeat them.
  • Given_InteractionTracker: waiting on IdleStateEntered: is more robust than the "logs quiet for 100 ms" heuristic. One thing to check: if the tracker's initial state already logs IdleStateEntered: before a test starts the motion, the wait would return immediately. Confirm that TrackerOwner logs are fresh for each test, or that each test starts the motion before calling WaitTrackerLogs.
  • ScrollPresenterViewChangeTests.mux.cs: the velocity parameters are restored on dispose, and the // UNO: comment explains why the change was made. GetOffsetsChangeVelocityParameters returns the values by out, so a nested use would restore the already-modified values. That is fine here because the helper is used once per test.
  • Given_ScrollView: the SlowFrameTimeoutMs constant is declared mid-class, between the tests and RecordWheelNotch. Move it to the top of the class to match the file's layout (nit).
  • Cross-cutting:
    • The FramePacer and macOS UNOWindow changes mentioned in the PR description are not in this checkout's diff against origin/master (only the 3 test files appear), so I could not review them here.
    • Per the repo rules, Assert.Inconclusive should be used sparingly. The frameMs > durationMs / 3 gate is narrow, but it does mean a regression on a genuinely slow lane can't fail this test.

@MartinZikmund MartinZikmund changed the title fix: Stabilize the WebGPU runtime-test lanes test: Let scroll tests wait out slow WebGPU frames Oct 10, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238844 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Examples.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
  • skia-windows-screenshots: 2458 changed over 2486

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AnimatedIconPage.png-dark
    • AnimatedVisualsTestbedPage.png
    • AppBar_KeyBoard.png
    • Application_DispatcherShutdownMode.png-dark
    • AppWindowPositionAndSize.png-dark
    • ArcSegment.png-dark
    • Attributed_text_Simple.png
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • BorderTopwithmargins.png-dark
    • BorderTopwithmargins.png
    • Border_BorderThickness.png-dark
    • Border_BorderThickness.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 238844 has failed on Uno.UI - CI.

@morning4coffe-dev morning4coffe-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that the new WaitTrackerLogs predicate matches the emitted log format (TrackerLogsConstructingHelper.GetIdleStateEntered produces "IdleStateEntered: ..."), so waiting for the tracker to reach idle replaces the 100 ms quiet-period heuristic. The ScrollPresenterTestHooks Get/SetOffsetsChangeVelocityParameters signatures and Uno.Disposables.Disposable.Create exist as used. Not run locally; the author reports WASM runs.

Findings:

  1. AssertOnWheelCurve (Given_ScrollView.cs around line 224-231) turns the curve-shape assertion into Assert.Inconclusive when frames are longer than a third of the curve. That skips the check on exactly the slow-frame lanes this PR targets, so those lanes stop covering the wheel curve. The github-actions bot raised this on 2026-10-09 and it has no reply. Please either justify it in the description as an accepted coverage trade-off, or assert something that is measurable at slow frame rates (for example, that the start and end offsets are reached and the curve is monotonic). Otherwise this weakens what the test asserts on those lanes.

  2. UseSlowerOffsetsChangeAnimations changes the timing used by BasicOffsetChanges, BasicOffsetsChangeCancelation and the interrupt tests, so the default 50-1000 ms curve is no longer exercised on any lane. Restoring the values on dispose is correct. Please state this in the description, and confirm that none of these assertions depends on a specific duration.

  3. The description says the rest of the stabilization lives in #25196, #25197, #25198 and #25201. Those are not reviewed here.

Point 1 should be resolved before approval.

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebGPU runtime-test lanes are unstable on master (regressions, macOS segfault, X11 teardown race)

5 participants