Skip to content

Skip Google Health weight sync for days with an existing manual entry - #2

Merged
isAdamBailey merged 2 commits into
mainfrom
claude/google-health-duplicates-rx8av1
Jun 26, 2026
Merged

Skip Google Health weight sync for days with an existing manual entry#2
isAdamBailey merged 2 commits into
mainfrom
claude/google-health-duplicates-rx8av1

Conversation

@isAdamBailey

Copy link
Copy Markdown
Owner

Google Health sync previously deduped only by exact recorded_at
timestamp or data point ID, so a manually-entered weight and a
Google-synced weight for the same calendar day (recorded at different
times) created two rows instead of one. Backfill now skips a Google
weight data point for any date that already has a manual entry.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01EZjN6b2GQSeeSDcV22VEhh

claude added 2 commits June 26, 2026 22:36
Google Health sync previously deduped only by exact recorded_at
timestamp or data point ID, so a manually-entered weight and a
Google-synced weight for the same calendar day (recorded at different
times) created two rows instead of one. Backfill now skips a Google
weight data point for any date that already has a manual entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZjN6b2GQSeeSDcV22VEhh
… past dupes

Generalize the per-day dedup check (previously manual-only) to skip a
Google weight/height entry whenever any entry already exists for that
calendar day, preventing Google-to-Google duplicates within a sync run
in addition to manual/Google duplicates.

Add a one-time data migration that removes duplicate weight/height
entries created before this fix: per user/day, keep the manual entry
if one exists, otherwise keep the entry with the latest recorded_at,
and delete the rest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZjN6b2GQSeeSDcV22VEhh
@isAdamBailey
isAdamBailey merged commit 7d6e171 into main Jun 26, 2026
4 checks passed
@isAdamBailey
isAdamBailey deleted the claude/google-health-duplicates-rx8av1 branch June 26, 2026 22:49
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