Skip to content

Remove synced runs that intervals.icu now lists as another sport - #46

Merged
stretch0 merged 1 commit into
mainfrom
intervals-remove-non-runs
Oct 31, 2026
Merged

stretch0 merged 1 commit into
mainfrom
intervals-remove-non-runs

Conversation

@stretch0

Copy link
Copy Markdown
Owner

Why

Sync only ever added runs. A ride the watch recorded as a run stayed in openRun after it was corrected in Garmin or intervals.icu, and its "best efforts" (a 4:32 mile at 110 bpm and no cadence) set the race predictions.

What changed

  • Each sync already lists every activity since the start date with its current type. A run that openRun imported, and that intervals.icu now lists as another sport (Ride, say), is removed, matching how other sports are handled: they're never imported.
    • Its best efforts, laps, stream and original file go with it, so predictions recalculate.
    • Club shares of it are withdrawn, so club highlights don't count a bike ride. (Deleting a run by hand still leaves shares alone, as before.)
    • The sync forgets it, so if it turns back into a run the next sync imports it again.
  • Untouched: uploads, runs added by hand, runs matched as duplicates of an upload, and runs already deleted by hand.
  • The sync log counts removals ("1 removed, now another sport on intervals.icu"). Migration 0009_sync_removed adds integration_sync.removed.

Note

PR 15 (intervals.icu OAuth) also adds a migration numbered 0009. Whichever merges second needs its migration regenerated as 0010.

Checks

  • New test: a run becoming a Ride is removed with its shares, best efforts and file; a second sync removes nothing; turning it back into a Run re-imports it; a run deleted by hand stays deleted; an upload is untouched.
  • api, web, schemas, db and domain lint, typecheck, test and build pass; db-migrations:check passes; e2e: 12 passed.

🤖 Generated with Claude Code

Sync only ever added runs, so a ride the watch recorded as a run stayed
in openRun after being corrected in Garmin or intervals.icu, and its
"best efforts" skewed the race predictions. Other sports are never
imported, so a run that intervals.icu now calls something else is
removed as if it had never been a run: its best efforts, original file
and club shares go too. Forgetting it means it's imported again if it
turns back into a run. Uploads and runs deleted by hand are untouched.

The sync log counts removals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stretch0
stretch0 merged commit 3a98fd9 into main Oct 31, 2026
5 checks passed
@stretch0
stretch0 deleted the intervals-remove-non-runs branch October 31, 2026 14:02
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