Skip to content

fix(ios): make backdate UI test avoid unreachable hour-12 wheel targets and verify the slider drag - #631

Merged
vfilby merged 1 commit into
mainfrom
fix/nightly-backdate-hour12-slider
Sep 1, 2026
Merged

fix(ios): make backdate UI test avoid unreachable hour-12 wheel targets and verify the slider drag#631
vfilby merged 1 commit into
mainfrom
fix/nightly-backdate-hour12-slider

Conversation

@vfilby

@vfilby vfilby commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Fixes the nightly testLogUpdateCanBeBackdated failures tracked in #629. Forensics from the nightly-test-results xcresult 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: verify normalizedSliderPosition actually moved and retry, mirroring what setTime already 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: LogUpdateTimePickerUITests passes 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

…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
@vfilby
vfilby enabled auto-merge (squash) September 1, 2026 16:19
@vfilby
vfilby merged commit 317e2b4 into main Sep 1, 2026
2 checks passed
@vfilby
vfilby deleted the fix/nightly-backdate-hour12-slider branch September 1, 2026 16:33
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.

Nightly UI suite failing

1 participant