8000 [Feature] Apple Health context import · Issue #96 · shroominic/OpenGlucose · GitHub
[go: up one dir, main page]

Skip to content

[Feature] Apple Health context import #96

Open

Description

@shroominic

Outcome

Import source-attributed Apple Health context so users can understand glucose alongside sleep, workouts, movement, heart rate, and historical glucose.

Dependencies

Delivery stages

  1. Bounded, user-triggered import with progressive per-type permissions.
  2. Incremental HKAnchoredObjectQuery synchronization and deletion reconciliation.
  3. Background/observer refresh after foreground correctness and battery behavior are verified.

Initial data types

  • Sleep intervals and stages.
  • Workouts.
  • Steps, exercise time, active energy, and walking/running distance.
  • Heart rate, then resting heart rate and HRV.
  • Historical blood glucose, excluding OpenGlucose's own exported source.

Later, only with source-quality evidence: respiratory rate and oxygen.

Product behavior

  • Per-type enable/disable, last successful sync, source summary, accessible-data state, and retry.
  • Request permission only when a person enables the related context.
  • Use “No accessible data” when HealthKit cannot distinguish denied from empty.
  • Never blindly sum overlapping Watch, iPhone, Oura, Whoop, or other sources.
  • Sample/demo mode never reads or persists personal HealthKit data.

Parallelization

After #89 freezes the import identity contract, iOS native import and mapping can run in para 8000 llel with journal UI and Health Connect. Coordinate HealthKit entitlement/Info.plist changes with release work.

Acceptance criteria

  • Repeated bounded and anchored imports create zero duplicates.
  • Added, updated, and deleted HealthKit objects reconcile correctly.
  • Each datum preserves HealthKit UUID, source bundle/name, device, interval, and recording method.
  • OpenGlucose-exported glucose is excluded from re-import.
  • Progressive permission, no-accessible-data, partial failure, and retry UX are tested.
  • Source overlap policy is deterministic and visible on drill-down.
  • Background work is bounded and measured for battery impact.
  • Physical-device tests cover DST, multiple sources, locked device, revocation, deletion, and app reinstall/update.
  • Privacy/data-flow docs and R2 independent review are complete.

Repository-owner recreation of the legacy issue at #43. The original discussion remains available there.

Activity

  1. added this to the 0.2 Data & Context milestone on Sep 1, 2026
  2. added
    enhancementNew feature or request
    parallel:blockedWaiting on an explicit dependency
    area:integrationsApple Health, Health Connect, and external data sources
    risk:R2Health data, persistence, integration, AI, accessibility, or native risk
    priority:P1Next product-value delivery
    on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:integrationsApple Health, Health Connect, and external data sourcesenhancementNew feature or requestparallel:blockedWaiting on an explicit dependencypriority:P1Next product-value deliveryrisk:R2Health data, persistence, integration, AI, accessibility, or native risk

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0