Fix flaky iOS BookSkips state waits on stalled simulators #24
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/absplus!24
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/92-bookskips-flake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes agentboard #92 (https://agentboard.icefish-betta.ts.net/#92).
Why it failed
On the #21 push run,
iOS (offline-progress)failedBookSkips.testRemoteCallbackBodiesCrossFilesAndClampinsetUp'sat(110). The step trace shows a stalled hosted simulator: relaunch automation setup took 19s (2s on the earlier BookSkips test), the firstskip-stateread took ~10s with internal retries, and the next took ~19s.XCTWaiter's 10s budget expired mid-read and threw that read away, but the failure message then re-read the label and showed the exact target state (track=1;actual=110.000;pos=110.000;paused=yes;ready=yes;speed=1.50). The same helper also failedtestPlaybackAndSpeedSurviveBothCrossFileRouteson #23's run (track=1;actual=138.250), where playback had already left the crossing window by the time the slow read returned.Fix (test and DEBUG fixture only)
BookSkips.waitpolls against a 30s deadline. A read that starts before the deadline is judged even if it finishes after it, it returns the read that satisfied it (no second slow read), and a failure reports the last state it evaluated. The paused conditions are unchanged: same track/file, actual AVQueuePlayer time and model position within 0.15s, paused/rate/speed/default rate, readiness, local file, and the remote handler status.from ± 30s(5s below, plus above it only the playback in the time the skip took), so slow UI reads no longer matter and a landing at the target file's start fails. The forward playing case starts from 80s, which leaves ~13s of playback before it would leave file 0.Atseed in the fixture clears a finished listen first, so a stall that let playback run to 150 no longer makes the next Play start over from 0.at()attaches the read that passed instead of reading the label again (another 10-19s read per step on a stalled simulator). The backward playing window ends at 129, not 130: a skip sampled just under 130 can still skip from 130 into file 1, which can't be told apart from a skip clamped within the file, so it is retried rather than failing.Verification
UITests/BookSkips(iPhone 17 simulator,-test-iterations 3): 9/9 passed at the final head.Player.seekmutation landing cross-file seeks at the target file's start): fails on attempt 1 withskip landed short: 110.464:1.50:0:0.000….UITests/BookSkipsx3 at the merge head and at the final head: 9/9 each.a0bae2dpassed offline-progress on two attempts.