feat: smart recreate and dedupe

This commit is contained in:
2026-06-16 19:36:12 +02:00
parent 2e25e7eb34
commit 9141a09b56
4 changed files with 100 additions and 3 deletions

View File

@ -216,6 +216,7 @@ def test_sync_recreates_date_name_match_with_different_steps(tmp_path, monkeypat
assert result["created"] == 1
assert garmin.client.unscheduled == ["s1"]
assert garmin.client.deleted == ["w-old"]
assert garmin.client.scheduled == [("w1", "2026-06-16")]
@ -295,6 +296,7 @@ def test_current_mapping_recreates_when_calendar_entry_is_missing(
assert garmin.client.uploads
assert garmin.client.scheduled == [("w1", "2026-06-16")]
assert garmin.client.unscheduled == []
assert garmin.client.deleted == ["w-old"]
mapping = repo.get_clone_mapping("2026-06-16")
assert mapping is not None
assert mapping["clone_workout_id"] == "w1"