GetMilerLogs fetched miler_periodic_logs with ZRangeByScore (ascending) +
Count: limit, so ?limit=1 returned the FIRST ping of the day — an early-boot
row with GPS but empty battery/connection/accuracy — instead of the latest
fix. That is exactly the blank-telemetry the rider-detail console showed,
even though the app was sending full telemetry (verified in live Redis).
Switch to ZRevRangeByScore (newest-first) so a limit-capped window keeps the
most recent rows, then flip the slice back to chronological so the trail and
distance sum still walk consecutive fixes in ride order. ?limit=1 now returns
the latest full-telemetry row.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRaFH5hMRqmUQvVPQsyjZD