8000 feat(health): add bounded Apple Health context import by shroominic · Pull Request #71 · shroominic/OpenGlucose · GitHub
[go: up one dir, main page]

Skip to content

feat(health): add bounded Apple Health context import - #71

Draft
shroominic wants to merge 3 commits into
feature/issue-36-source-aware-spinefrom
feature/issue-43-apple-health-import
Draft

shroominic wants to merge 3 commits into
feature/issue-36-source-aware-spinefrom
feature/issue-43-apple-health-import

Conversation

@shroominic
@shroominic shroominic commented Aug 24, 2026 •
Copy link
Copy Markdown
Owner

Summary

  • Add an iOS-only, user-triggered Apple Health context importer for sleep, workouts, and heart rate.
  • Use bounded 30-day HKAnchoredObjectQuery reads, stable HealthKit UUID/provenance mapping, source deletions, and per-type opaque anchors.
  • Add separate opt-in/retry UX, restricted-state persistence, fail-closed native/Dart contract validation, ADR, privacy documentation, and tests.

Scope and dependency

Partial implementation of #96. This PR is stacked on #68 and must not merge before #68. It implements only the first bounded foreground stage.

Not included: Health Connect, blood-glucose import, steps/energy/distance/HRV, background or observer delivery, chart/overlay UI, source-overlap policy, retention/delete-all, or cloud/AI processing.

Privacy and behavior

  • Import requires its own explicit toggle and an Import now action.
  • Apple does not disclose read authorization; the UI reports No accessible data without claiming grant or denial.
  • No health values, UUIDs, provenance fields, or anchors are logged.
  • Mock/demo mode does not request, read, or persist Apple Health context.

Verification

  • make check (Android/web/iOS/macOS builds; unit/integration/native tests; Android signing guard)
  • Normal pre-commit and pre-push Lefthook gates

Physical-device follow-up

Before enabling a release, validate opt-in/revocation, empty reads, multiple sources, changed/deleted records, DST boundaries, locked-device behavior, reinstall/update behavior, and battery impact on an iPhone with representative Health data.

Refs #96
Depends on #68

8000

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant 3612

0