v0.9.2 — The rest of the resting-heart-rate migration
Follow-up to v0.9.1, which corrected the inverted alarm but left the reporting layer half-migrated.
Found by reading every remaining call site one at a time rather than generalising from the first — which is exactly how the original count came out wrong.
Still reporting the score as bpm
| Where | What it printed | Why it matters |
|---|---|---|
weekly_report |
Resting Heart Rate: 90 bpm |
No qualifier at all. The most misleading of the three, because 90 is a plausible pulse. |
illness_detection |
Resting HR Score: 61/100 (score, not BPM) |
Already held real bpm after v0.9.1 — but 61 bpm and a score of 61 look identical, so the label actively misled. |
supplement_correlation |
keyed resting_hr off average_heart_rate |
The mean across the whole night sits well above the resting value. |
weekly_report now takes sleep data; without it it reports nothing rather than falling back to the score.
Also fixed
- The statistics report passed raw sessions, so 30 days yielded 32 data points. Now aggregated per day.
- An unused variable in
intelligence_toolsbound the score to the nameresting_hr— dead code, but precisely the trap that started this.
Deliberately unchanged
formatters.py and core/server.py print {score}/100 (contributor score). Correctly labelled, so it stays.
Verified live
| Surface | Before | After |
|---|---|---|
| Statistics report | Mean 88.9 bpm (score), 32 points |
Mean 60.6 bpm, 30 points |
| Illness baseline | Resting HR Score: 61/100 |
Resting Heart Rate: 61 bpm |
| Weekly report | score-derived (~90) | 60 bpm |
Tests: 23 (+2), covering the weekly report in both directions.
Full Changelog: v0.9.1...v0.9.2