Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #2056, which adds the requested regression tests on top of the explanation now in
main.What this PR does
WHOOP 5 legacy R-R rows are excluded after #2046 because their units are unknown. When that leaves a scored night without HRV or Charge, both Apple Today layouts and Android now explain the gap: “Earlier WHOOP 5 beats cannot be scored for HRV or Charge. Re-sync your strap to recover available history.”
Persist the reason with the computed night, carry it through cached scoring, and clear it when labelled history restores valid input or the day is removed from a nonempty scoring pass. The notice follows the selected day and stays hidden for WHOOP 4, ordinary calibration, and displayed imported values. Copy is included in the existing Apple and Android locales.
Android keeps the existing 55,700-byte JaCoCo limit by grouping nightly auxiliary reads and metric writes. The sleep fallback and score formulas are unchanged.
Type of change
How it was tested
IntelligenceRRSourceTests(Swift) andWhoop5RRSqliteTest(Kotlin) exercise the actual nightly scoring and persisted notice through three cases:Additional checks cover sleep boundaries, suspect timestamps, cold repository reload, flag-only refresh, skipped-day cleanup, and isolation between computed sources. Temporarily forcing the persisted flag to always zero or always one made the relevant new tests fail on both platforms; the final implementation was restored before validation.
RecoveryDriversTestexact half-tie assertions on JetBrains JDK 21.0.8 (-0.5versus-0.4999999999999929).Checklist
docs/CONTRIBUTING.mdRelated issues
Follow-up to #2046 and its review. Related to #1505.