Fixed
-
Smart sync: defensive fallback when
sleep_untildisagrees withnext_sleep_s. Real-world firmware was publishing both fields with inconsistent values (sleep_until ~371s ahead, next_sleep_s = 60s), and the server's priority chain trusted the bad absolute timestamp; offsets stayed at ~-300s and devices never reached "trusted" confidence.Server now checks
abs((sleep_until - received_at) - next_sleep_s)on every heartbeat carrying both fields. Disagreements >30s trigger a fallback tonext_sleep_splus a WARNING log line so the firmware bug stays visible.Firmware-side handover prompt for the underlying bug is at
firmware-prompts/sleep-until-clock-skew-fix.md.