mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
STRESS_SCORE has no source-priority ladder, so metricKeyForType returns null and the SQL source collapse falls to an alphabetical rank-90 tiebreak. It is safe today because the only producer is the COMPUTED HRV-derived proxy, but the instant a device-native producer (Oura daily_stress) is enabled both rows survive and blend nondeterministically. Add a stress metric key with an OURA-above-COMPUTED default ladder, wire it through metricKeyForType and RANKED_TYPES, and surface it in the Sources settings (all six locales). A guard test asserts every RANKED_TYPES member resolves to a non-null metric key so a future ranked type can't ship unladdered. Regenerate the OpenAPI for the additive source-priority key.
701 KiB
701 KiB