You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: PTTInputDeviceProbeTests uses CI throughput as a liveness assertion #10724
PTTInputDeviceProbeTests.testMainRunLoopKeepsPumpingWhileTheHALIsWedged is flaky in Desktop Swift CI. The production change from #10695 is not implicated by the failures: the test's fixed 300 ms window asserts more than 10 timer ticks and more than 10 snapshot reads, turning a liveness requirement into a runner-throughput requirement.
In both runs, every sibling PTTInputDeviceProbeTests case passed. Other current-main runs pass, confirming the result depends on macOS runner contention.
Root cause
The acceptance criterion is binary: while the injected HAL probe is blocked off-main, the main run loop and currentSnapshot path must continue making progress. Requiring an arbitrary 11+ iterations in 300 ms measures host scheduling throughput instead. Under suite isolation and a loaded arm64 runner, RunLoop.main.run(mode:before:) may service only a few iterations even though neither the main actor nor snapshot read is blocked.
Proposed fix
Keep the HAL semaphore wedged and assert deterministic liveness/progress, not a fixed iteration rate. The test should still fail if the routing read moves back onto the main actor or waits for the HAL, while accepting any positive main-loop and turn-start progress under contention.
A third independent reproduction just completed on the refreshed #10574 head: run 30283186121 reported ticker.count == 7 and reads == 7; every sibling PTTInputDeviceProbeTests case passed again. The deterministic replacement is now open as #10725.
Activity
tianmind-studio commentedon Jul 27, 2026
A third independent reproduction just completed on the refreshed #10574 head: run 30283186121 reported
ticker.count == 7andreads == 7; every siblingPTTInputDeviceProbeTestscase passed again. The deterministic replacement is now open as #10725.test(desktop): make PTT HAL liveness deterministic (#10742)
test(desktop): make PTT HAL liveness deterministic
test(desktop): make PTT HAL liveness deterministic (#10742)
test(desktop): make PTT HAL liveness deterministic (BasedHardware#10742)