# health changelog

## 1.4.0 (2026-12-01), minor
- For NeverChill Athlete (published by NeverChill). New vocabulary values only: source `neverchill-export` (the NeverChill
  account export: ZIP parts and manifest, read in place) and its rows in `sport_map.csv` (NeverChill's sport and
  sub-sport, e.g. `cycling/virtual` -> ride, indoor). No table or column changes: NeverChill's own concepts (its fitness
  model and freshness bands, durability, Rider DNA, plans, baselines) stay in that board's `x_neverchill_` tables, as the
  extension rule says, until a second board needs one.
- No migration: the DDL is unchanged (schema.sql hash unchanged). Boards pinned to 1.3.0 re-pin to 1.4.0.

## 1.3.0 (2026-11-30), minor
- For Athlete Performance. New optional tables, all summaries of a workout's sample streams (the samples themselves and
  any position are never stored, workout rule 6): `workout_streams` (per stream: covered seconds, time-weighted average,
  maximum, weighted power, the reader's max gap), `workout_efforts` (best average power, speed or heart rate over a span
  of seconds, fewest seconds over a span of metres, with the offset into the workout) and `workout_histograms` (seconds
  per bin of a stream, so a board counts time in zones of any threshold without the samples).
- Workout rule 6 (1.3): streams are summarised, never stored; a gap longer than max_gap_s is a pause; a pause inside an
  effort's window counts as standing still, so it never raises an effort; summaries stay with the row of the source whose
  file they came from.
- Vocabularies: new `streams.csv` (power, heart_rate, speed, cadence with units) and `effort_measures.csv`.
- New conformance checks at `warn`: `streams_valid`, `efforts_valid` (including a monotone curve within a workout),
  `histograms_valid` (bins add up to the stream's seconds).
- Fixtures: the Strava archive run's file summarised. Migration `migrations/1.2-to-1.3.sql` for a stored 1.2 database
  (boards rebuild theirs on every import).

## 1.2.0 (2026-11-30), minor
- For Nutrition & Weight. New optional table `nutrition`: one diary day of food per app and source (kcal, protein,
  carbs, fat, fibre, entries, the app's "day complete" flag). `body`: optional `measured_at` and `n_samples`.
- Food and body rules written once (README): the diary date is the day; an unlogged day has no row (never zero intake);
  one source per day by the person's priority, never added; the day's first weigh-in; units at the door (lb, st, kJ,
  %, cm, in); food names and notes never stored.
- Sources `myfitnesspal`, `cronometer`, `withings`, `weigh-ins-csv`. New conformance checks at `warn`:
  `nutrition_plausible`, `body_plausible`. Fixtures: one food day from MyFitnessPal and its Apple Health copy, a
  Cronometer day marked complete, one weigh-in from Withings and Apple Health.
- Migration `migrations/1.1-to-1.2.sql` for a stored 1.1 database (boards rebuild theirs on every import).

## 1.1.0 (2026-11-30), minor
- For Training Log. `workouts`: optional `external_id` (the source's activity id), `sport_raw` (the source's own
  activity type), `indoor`, `laps_n`.
- New optional tables `workout_zones` (seconds per heart-rate zone 1..5, as the source measured them) and
  `workout_laps` (laps or splits).
- Workout rules written once (README): one row per source, a board counts one row per real workout by source priority
  (matched by start time, sport and duration; never added or merged), units at the door, zones and laps are the source's.
- Vocabularies: sources `strava-archive`, `garmin-archive`, `fit-file`; new `sport_map.csv` (each source's activity
  types and the sport they map to).
- New conformance checks at `warn`: `zones_valid`, `laps_valid`, `workouts_plausible`.
- Fixtures: the same run from an Apple Watch and the Strava archive, with zones and laps. No migration: boards rebuild
  their database from the person's files on every import.

## 1.0.0 (2026-11-30)
- First published version, for Sleep & Recovery (Training Log reads `workouts` next): `metric_codes` (the controlled
  code list with units and day aggregation; HRV as two codes, `hrv_sdnn` and `hrv_rmssd`, never mixed),
  `daily_metrics` (one value per day, code, device and source), `sleep_sessions` (nights and naps with in bed,
  asleep, awake, light/deep/REM/unspecified stages, latency, efficiency, HRV, resting HR, breathing, local times and a
  time zone), `workouts`, optional `body`, `import_counts` (source accounting per file and record type), `data_issues`,
  `annotations`, `metric_registry`.
- `hrv_unverified`: HRV a non-Apple source wrote as SDNN, kept apart from `hrv_sdnn`.
- Night rules written once (README): awake wins where one device's samples overlap; periods formed on each device's
  timeline before night_of (a sleep past noon stays one); pieces 15 minutes apart for naps and evening dozes; interval union per device, one device per night chosen by the board, noon-to-noon
  `night_of`, sessions split by a gap, naps.
- Conformance checks: codes, units, HRV kinds, ranges, session arithmetic, the noon rule, time zones, one main sleep
  (warn), workouts, import counts, meta (warn). Fictional fixtures covering every check.
