mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The symptothermal layer ran against the full day-log history: detectTempShift returned the earliest 3-over-6 rise and detectMucusPeak the last egg-white day across all cycles, so a multi-cycle user with historical BBT confirmed a months-old ovulation and the predicted next-period start landed in the past. Scope the temperature/mucus detectors to the current cycle window [lastConfirmedStart − BBT_WINDOW, today], take the latest qualifying temp shift, and reject any confirmation whose next-start is already in the past. Resolve luteal length through a single clamp. The predictor clamped to [10,16] while the calendar adapter and phase mapper used the raw stored value, so the ovulation dot and the OVULATORY band could land on different days for an out-of-clamp profile. Export resolveLuteal/clampLuteal, route buildCalendar, buildPhaseCycles and phaseForDay through it, and tighten the profile-prefs Zod bound to the same [10,16] range. Show the fertile window for AVOID_PREGNANCY as well as TRYING_TO_CONCEIVE per the algorithm spec; it stays hidden for GENERAL_HEALTH/PERIMENOPAUSE. Bound the day-log reads on the calendar and insights routes to the rendered span plus the symptothermal lookback instead of the full history; cycle-length stats already run off the MenstrualCycle rows. Add mood and blood glucose as phase-crosstab outcome metrics under the same FDR and per-group day floors. Mood is read from MoodEntry and injected as a synthetic channel since it is not a measurement row. Add multi-cycle, luteal-clamp and fertile-window fixtures. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
387 KiB
387 KiB