Skip to content

Bound HealthKit observer deltas to the existing recent sync window - #2642

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
AlexSchmidt1999:codex/upstream-healthkit-observer-window
Oct 4, 2026
Merged

ryanbr merged 1 commit into
ryanbr:mainfrom
AlexSchmidt1999:codex/upstream-healthkit-observer-window

Conversation

@AlexSchmidt1999

Copy link
Copy Markdown

What this PR does

The observer anchored query adds the same recent 31-day window its aggregate consumer already processes. A fresh anchor otherwise decodes older samples before that consumer clamps the window. NOOP-authored samples remain excluded, and explicit historical imports keep their separate queries.

How it was tested

The combined fork passed iOS/macOS builds and package checks. This extracted patch applies to the documented upstream base; separate contribution CI is still pending.

Before submission, validate fresh/existing anchors, overlapping boundary samples, day rollover, time-zone changes, and historical imports on a HealthKit-authorized iPhone. The predicate moves while the anchor key stays unchanged; review whether a reset or new key is needed. Existing deletion handling is unchanged. Battery savings have not been measured.

@ryanbr
ryanbr marked this pull request as ready for review October 4, 2026 03:14
@ryanbr
ryanbr merged commit 549549e into ryanbr:main Oct 4, 2026
5 checks passed
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.

2 participants