feat(environment): register env signals and wire weather into correlation discovery

Register the seven environmental-exposure signals through the signal registry
as a new "environment" kind (correlation-eligible; off Coach/MCP/FHIR in v1),
and fold their daily series into the correlation engine as lagged behaviour
channels. Weather/daylight now pair against mood, sleep, and vitals through
the existing FDR / effect-size / shrinkage gates, so a thin series degrades to
absent rather than a spurious link. All env channels share one ENVIRONMENT
family so two same-day fields never lag-correlate against each other.
This commit is contained in:
Marc-André Bombeck committed 2026-06-28 16:58:30 +02:00
1 parent 76dc03ae7f
commit cdee3e3efc
10 files changed
+265 -12

No files matched your search

@@ -52,6 +52,15 @@ const CHANNEL_LABEL_KEY: Record<string, string> = {
HEART_RATE_VARIABILITY: "measurements.typeHeartRateVariability",
RESTING_HEART_RATE: "measurements.typeRestingHeartRate",
WEIGHT: "measurements.typeWeight",
// v1.25 (W-ENV) — environmental-exposure channels, so a "daylight → mood"
// relation reads with its descriptive label instead of the raw ENV_ key.
ENV_TEMP_MEAN: "environment.fields.tempMean",
ENV_TEMP_MIN: "environment.fields.tempMin",
ENV_SUNSHINE: "environment.fields.sunshine",
ENV_DAYLIGHT: "environment.fields.daylight",
ENV_PRECIP: "environment.fields.precip",
ENV_PRESSURE_MEAN: "environment.fields.pressureMean",
ENV_PRESSURE_DELTA: "environment.fields.pressureDelta",
};
/** Keep only the discovered pairs that involve the mood channel. */