[bug] healthsync/hae.ts matches Health Auto Export metrics by old display names, so…
What happened
healthsync hae.ts matches Health Auto Export metrics by old display names (Step Count); current exports send snake_case (step_count), so the Apple Health channel yields zero metrics
Summary
LIFEOS/TOOLS/healthsync/hae.ts looks each metric up by its exact name in METRIC_MAP ("Step Count", "Active Energy", "Resting Heart Rate", ...), and drops every name it does not find ("Unknown metrics are ignored").
Current Health Auto Export builds send snake_case names instead: step_count, weight_body_mass, body_fat_percentage, walking_running_distance, flights_climbed, and so on. On 30 real REST payloads from my install, the 8.761.0 file produces 0 day/metric pairs; the whole Apple Health channel looks configured and stays empty, with no warning.
What fixed it here, three small changes:
- Normalize the name before lookup (lowercase, spaces to underscores), so
Step Countandstep_countmap to the same key. - Look the metric up by that normalized key, and skip entries with an empty name.
- Keep metrics that are not in the map under their own normalized key instead of dropping them (body fat, BMI, lean mass and walking metrics arrive this way and are useful for health goals).
With these, the same 30 payloads give 1013 day/metric pairs (24 distinct keys). A fixture with both naming styles would keep this from regressing.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @IvanLeontev-stack for the report.
This is fixed in our source and goes out in the next release. Health Auto Export imports recognize both the older display names and the newer underscore-separated metric names, including for sleep.
Please reopen if it still happens after you upgrade.