Heart v1.0.12 — Sleep stager verified against realistic data
What's verified
This release is the same Dart stager-constants fix as v1.0.11, but now backed by a synthetic-noise regression test that mirrors real Coospo HW9 data quality. The test fails on the pre-v1.0.11 constants and passes on the new ones — guarantees the fix doesn't regress.
Cross-check before build
- Algorithm hand-traced with realistic numbers:
restingBpm=64, sleep mean=70, std=5, coverage=0.7 → score ≈ 0.84, clears the new 0.7 onset gate. Old constants gave ≈ 0.55, never opened. - New
detects 7-hour sleep with realistic noise (std≈5 bpm, 1 Hz)test added totest/sleep_staging_test.dart— generates a triangle-wave BPM around mean 65 with ±9 bpm swing (std ≈ 5.2) at 1 Hz coverage, expects detection to find ≥ 6 hours. - All 86 tests pass.
- Provider chain confirmed: Trends → Sleep reads
resolvedSleepMinutesProvider→jsonlSleepStagingProvider(runs the fixed stager fresh, no stale cache involved).
Stager constants (unchanged from v1.0.11, now test-locked)
_hrStdMax: 4.0 → 8.0_sleepOnsetThreshold: 0.85 → 0.7_minDurationMinutes: 180 → 120
Build
heart-android.apk— arm64-v8a, 22 MB. SHA-256:fa208e0f46385b1032b067fbb0c9b1c31ecfd3568f3fb5ecb8a0bbdbae906af6heart-android-universal.apk— fat APK, 62 MB. SHA-256:f89e49d9d504369b5b93b39dab1f5554e359d03ea019b7c572bf3cc3d4b1dca6- Same release certificate as every prior version.