Skip to content

fix(test): loosen DataGrid_ScrollPerfRelative ratio threshold (#209) - #620

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 2 commits into
mainfrom
azchohfi-fix-datagrid-scroll-perf-flake
Jun 22, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 2 commits into
mainfrom
azchohfi-fix-datagrid-scroll-perf-flake

Conversation

@azchohfi

Copy link
Copy Markdown
Collaborator

Summary

Fixes the flaky DataGrid_ScrollPerfRelative selftest by loosening its scroll-render ratio threshold.

The fixture asserts the DataGrid scroll-to-position render rate stays within a ratio of VirtualList. The active bound was ratio < 1.4 (the failure message rounds the displayed ratio to "1.5x"). A 1000-iteration CI stress run (Stress #25562201970) flaked twice right at the boundary -- measured ~1.46x and ~1.52x -- on shards 1 and 18.

Why this is calibration, not a product bug

The test operates in the single-digit-millisecond range, where shared CI runners under variable load introduce significant measurement jitter. ARM64 dev boxes land at ~1.3-1.4x and x64 CI closer to ~1.1-1.2x in steady state, so a 1.4x bound left effectively zero headroom for transient scheduling noise.

Change

The 2.0x band still catches the structural regressions the fixture is designed to detect (FlexRow wrapping, redundant Yoga passes) which manifest as 2x+ slowdowns, while absorbing CI variance.

Verification

  • Built tests/Reactor.AppTests.Host (-r win-x64) -- compiles cleanly.
  • Full E2E suite not run (requires WinAppDriver); a build is sufficient for a threshold-constant change.

Closes #209.

Co-authored-by: Copilot [email protected]

The selftest asserted the DataGrid/VirtualList scroll-render ratio stayed under 1.4x. A 1000-iteration CI stress run flaked twice right at the boundary (measured ~1.46x and ~1.52x) on shared runners under variable load. This is threshold calibration, not a product regression. Bump the bound to 2.0x, which still catches structural 2x+ regressions while absorbing CI jitter at the single-digit-ms range the test operates in.

Co-authored-by: Copilot <[email protected]>
Follow-up to PR review feedback on the DataGrid_ScrollPerfRelative threshold change:

- Print the ratio at full precision (F3) in the assertion message so failure logs show the true measured bound instead of a rounded value. The old F1 rounding is exactly what made #209's logs read '1.5x' when the real bound was 1.4.

- Make the 2x boundary semantics explicit in the comment. Check() passes when its bool is true, so 'ratio < 2.0' already fails (catches) any ratio >= 2.0 — i.e. it catches 2x+. Kept the exclusive '<' (using '<=' would instead let an exactly-2.0x regression pass) and reworded the comment to state the exclusive bound unambiguously.

Co-authored-by: Copilot <[email protected]>

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.

Pull request overview

This PR calibrates the DataGrid_ScrollPerfRelative selftest to reduce CI flakiness by loosening the allowed DataGrid-to-VirtualList scroll median-time ratio and improving the diagnostic log precision.

Changes:

  • Loosened the ratio threshold from < 1.4 to < 2.0 for ScrollPerf_Ratio.
  • Expanded the in-test comment to document CI jitter rationale and reference issue #209.
  • Increased printed ratio precision in the failure message from F1 to F3 to avoid misleading rounded logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@azchohfi
Alexandre Zollinger Chohfi (azchohfi) merged commit 6089572 into main Jun 22, 2026
18 checks passed
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) deleted the azchohfi-fix-datagrid-scroll-perf-flake branch June 22, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake: DataGrid_ScrollPerfRelative ratio threshold too tight for CI runners

2 participants