test(openrgb): make timing fixtures deterministic - #281
Merged
Conversation
Use controlled Tokio time and observed socket progress so scheduler latency cannot consume the cadence window or expire discovery before the handshake assertion. Preserve the 100/5 FPS rates, frame thresholds, and configured 20 ms handshake timeout. A real-time watchdog diagnoses stalled fixtures without defining their timing contract. Delayed discovery and scheduling reproduce the old failures, while a throttled-controller mutation still fails the repair. Co-Authored-By: Nova (GPT-6) <noreply@openai.com>
Use the existing OpenRGB diagnostics command and distinguish retired trait-method compile errors from the replacement method defaulting to unsupported display output. Keep upgrade guidance aligned with the CLI and driver API shipped in the release. Co-Authored-By: Nova (GPT-6) <noreply@openai.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes make OpenRGB driver timing tests deterministic with Tokio virtual time and real-time watchdogs. They add update observation channels, strengthen handshake-timeout assertions, enable Tokio test utilities, and update two changelog entries. ChangesOpenRGB test determinism
Estimated code review effort: 3 (Moderate) | ~20 minutes ✨ Finishing Touches📝 Generate docstrings
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OpenRGB cadence and handshake fixtures now measure controlled Tokio time instead of host scheduling delays. Previously, a busy Windows runner could count too few frames or exhaust the 20ms discovery timeout before reaching the handshake assertion.
The repair preserves 100fps/5fps controller rates, the 300ms cadence window, original frame thresholds, and the configured 20ms handshake deadline. Socket observations establish progress; a real-time watchdog diagnoses stalls. The handshake remains pending at 19ms and returns the exact configured timeout after crossing Tokio's timer boundary.
Injected scheduling and discovery delays reproduce the old failures and pass with the repair. A deliberately throttled fast controller still fails. All 65 crate tests, scoped Clippy, and formatting pass; independent review reran all 31 integration tests successfully. Production behavior is unchanged, and Tokio's test utilities are a development-only dependency feature.
The changelog also corrects the diagnostics command and distinguishes retired trait-method compile errors from unsupported display output. The refreshed 0.5.0 tag passed all validation gates. Both repaired OpenRGB fixtures passed in the Windows shared suite, alongside the native macOS, Servo, and end-to-end checks.