CanonicalEventStoreHrvSource class
SDK-provided HRV source that queries the canonical event store directly for a specific vendor's recovery records, bypassing the Baselines lockstep ring entirely.
Why this exists alongside BaselinesNightlyHrvSource: Baselines
tracks a per-night ledger keyed on sleep payloads, and HRV from
recovery payloads only fills slots that match an existing sleep
night. With multiple providers on different sync cadences, some
nights' HRV stays detached from the ledger even though the data
is on disk in the canonical store. This source reads the store
directly: every recovery event with HRV becomes a sample, even
if its night never landed in _recentNights.
Composes additively with BaselinesNightlyHrvSource: the
resilience engine's dominant_kind filter handles the de-dup
at compute time (both sources emit nightlyRmssd), so users
with WHOOP + Garmin + Apple Health don't have a single bottleneck
at the Baselines layer.
- Implemented types
Constructors
- CanonicalEventStoreHrvSource({required String provider})
-
Build a source for one specific provider (
'whoop','garmin', etc.). The provider name matches the canonical event store'sprovidercolumn — the same one used bySynheart.queryVendorEvents(provider: ...).const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Identifier used for diagnostics / "where did this score come
from" UI surfaces. Examples:
whoop_recovery,healthkit_hrv,polar_h10_session.no setteroverride - kind → HrvSampleKind
-
The aggregation level this source produces. Reported up-front
so composers can route or weight by kind without having to
inspect every returned sample.
no setteroverride
- provider → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
samples(
{required DateTime from, required DateTime to}) → Future< List< HrvSample> > -
Pull samples for the range
[from, to]. Sorting is not required — the engine sorts internally before filtering by sleep window. Implementations should bound work proportional to the date range; long ranges across years should be capped at the call site, not here.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited