fix(ios): make backdate UI test avoid unreachable hour-12 wheel targets and verify the slider drag - #631
Merged
Merged
Conversation
…ts and verify the slider drag Fixes the three real nightly failures behind #629 (the 2026-09-01 run was a GitHub runner-acquisition outage, not a test failure): - 2026-08-29/30: setTime targeted 12:4x PM while the wheel read 2. The adjust spins the hour wheel numerically upward toward 12, every tick is a future time the ...Date() bound clamps, and the wheel never moves — deterministic whenever a target lands in the 12 o'clock hour with now in a different hour. Floor both target times at 1:00 of the current half-day so an hour-12 target only occurs when the wheel already reads 12. - 2026-08-28: the intensity slider drag silently didn't stick (recording shows it never left 5), so Save wrote no reading and the timeline check failed. Verify normalizedSliderPosition moved and retry; only movement is asserted because the drag is imprecise (settles on 6 locally). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lmxidvv1hyCH4sY59zqr2R
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.
Fixes the nightly
testLogUpdateCanBeBackdatedfailures tracked in #629. Forensics from thenightly-test-resultsxcresult artifacts (activity logs + screen recordings):Failure 1 — hour-12 wheel targets are unreachable (8/29 + 8/30 runs)
Both runs started ~14:25 UTC, so the episode-start target (now − 2h) landed at 12:4x PM while the picker read 2:4x PM. The screen recording shows the hour wheel never moving across all three retry attempts:
adjust(toPickerWheelValue:)spins the hour wheel in the numerically increasing direction, and 12 is the largest numeral, so reaching it from any other hour goes forward through future times that the...Date()bound clamps tick by tick. Deterministic whenever a target lands in the 12 o'clock hour while now is a different hour — i.e. any nightly run hitting this test between 14:00–15:00 UTC (the 8/31 run passed only because it started at 17:05).Fix: floor both target times at 1:00 of the current AM/PM half-day once now has passed it, so an hour-12 target only occurs when the wheel already reads 12 (minute-only backward moves, always legal).
Failure 2 — intensity slider drag silently no-ops (8/28 run)
The picker accepted 8:57 PM, but the pre-save screenshot and recording show the slider never left 5: the
adjust(toNormalizedSliderPosition: 0.7)didn't stick, Save had no intensity change to write, and the timeline check then failed on the missing entry. Fix: verifynormalizedSliderPositionactually moved and retry, mirroring whatsetTimealready does for the wheels. Only movement is asserted, not the landing spot — the drag is imprecise (settles on 6, not 7, locally) and any moved value writes a reading.Not a test issue — 9/1 run
"The job was not acquired by Runner of type hosted even after multiple attempts" — GitHub infra outage, nothing to fix.
Verified locally:
LogUpdateTimePickerUITestspasses on iPhone 17 Pro / iOS 26.0 (the first local run also caught the slider drag settling on 6, which is what shaped the movement-not-landing-spot assertion). SwiftLint clean.Closes #629
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lmxidvv1hyCH4sY59zqr2R