Skip to content

Fix cached activity pruning after resumed Garmin backfills - #44

Open
bensynapse wants to merge 1 commit into
aspain:mainfrom
bensynapse:fix-garmin-resumed-pruning
Open

bensynapse wants to merge 1 commit into
aspain:mainfrom
bensynapse:fix-garmin-resumed-pruning

Conversation

@bensynapse

Copy link
Copy Markdown

I run Live Tennis API.

A Garmin backfill that resumes at a nonzero offset can finish scanning the remaining pages and then delete cached activities from earlier pages. Those IDs are absent from this run’s fetched_ids, even though their activities still exist on Garmin.

Only prune after a complete scan starting at offset zero, matching the protection already present in the Strava path. Normal complete-scan pruning and backfills restarted after a boundary change still work.

Validation:

  • All 270 project tests pass with Python 3.11 and Node 22 in a clean container with networking disabled.
  • Four filesystem regression tests cover interrupted/resumed scans, empty resumed pages, zero-offset cursors and boundary changes. The two preservation tests fail before the fix.
  • The local sync-to-dashboard pipeline retains and renders all three fixture activities after an interrupted backfill resumes.

On my host, three existing bootstrap tests fail because they expect GitHub CLI to be absent from /usr/bin; the untouched base has the same failures. All pass in the clean container. Garmin responses were simulated; no live account was used.

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