Calculations / PUBLIC-SAFE SUMMARY
Reproducible response and recovery metrics
Implemented and covered by automated tests
Absolute increase is immediate HR minus resting HR. Percentage increase divides that change by resting HR and multiplies by 100.
At one or two minutes, recovery BPM is immediate HR minus HR at that landmark. Recovery percentage divides this reduction by the initial increase and multiplies by 100. It is unavailable if immediate HR is not above resting HR.
Landmarks use the nearest actual sample within one second of the target; the timestamp and offset are preserved. If no eligible sample exists, the metric is missing, not guessed.
Threshold time is elapsed time from exercise end to completion of the first confirmed 30-second interval at or below 110% of resting. It can be shorter than the two-minute minimum that controls the next exercise.
Derived values retain protocol version, calculation version and input revision. Late samples create a new calculation revision rather than rewriting raw measurements or previous derivations.
Supporting workspace artifacts
Source locations identify the original artifacts in the private project. Raw files are not publicly served. Hashes identify the reviewed source snapshot; they are provenance, not external certification.
App/Shared/Metrics/HeartRateCalculator.swift:23SHA-256 feab24aa5e7a475341e3ab6f29c886c4b8de68f1bad5bb0f9ed177429d1e1639App/Shared/Metrics/SessionMetricDeriver.swift:36SHA-256 7e23b3084f750d57ec1972f6ac3194ab3b70346aaf140efc8ca912bda3516e9b