v5.0
v5.0 — Metrics Accuracy, IMU & Upstream Fixes
Shipped: 2026-06-08 | Phases: 16 (20–35) | Plans: 28 | Requirements: 22/26 | Rust tests: 128 | Schema: v19
What's New
All core biometric algorithms ported from Python reference into Rust and validated against WHOOP 5.37.0 IPA via Ghidra disassembly.
HRV pipeline — BLE-gap segmentation; Lipponen-Tarvainen ectopic filter; tiered SWS window selection
Recovery v1 — Z-score + logistic squash; EWMA baseline (14-night α = 0.0483); cold-start gate; Vermelho / Amarelo / Verde scoring
Strain & Calories — Tanaka HRmax; Banister TRIMP; Keytel + Harris-Benedict coefficients (Ghidra-confirmed from WHOOP binary)
4-class Sleep Staging — Cole-Kripke + cardiorespiratory features + AASM physiological constraints
V24 Biometric Decode — SpO₂, skin temperature, respiratory rate, gravity2; 4 new SQLite tables; uncalibrated flag
Exercise Detection — retroactive from HR + gravity; Karvonen heart-rate zones; exercise_sessions table
Upload Sync — synced flag on 8 stream tables; two-namespace cursors; raw outbox prune invariant
Readiness Engine — ACWR (7d/28d) + Foster monotony; 5-class synthesis (rundown → primed)
IMU foundation — I16SeriesSummary full_samples; gravity schema v15; feature-flagged
Code quality — 9 HIGH findings from codebase audit identified and fixed; upstream Gen4 historical sync corrected
Deferred (hardware gates)
ALG-HRV-04: RMSSD real-device validation (≥5 overnight sessions) → Phase 51ALG-SLP-04: 4-class staging concordance ≥70% (real overnight data) → Phase 51