mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The GET spread the optimistic-concurrency `updatedAt` into the response even when the user had never saved preferences, which broke the strict-equality contract that a never-saved read is exactly `DEFAULT_COACH_PREFS`. Mirror the insights-layout never-saved GET: a null `coachPrefsJson` returns the pure default with no token (the first save is the tokenless unconditional write), and only a saved row and the PUT response carry `updatedAt`. Update the integration round-trip to expect the token on the saved GET and PUT while keeping the `coachPrefsJson` column assertion pure.