Starter splits ship as byte-canonical SplitDocument JSON with fixed ULIDs (Workouts/Resources/StarterSplits, regenerated by Scripts/generate_starter_splits.swift) and auto-seed after connect into a verifiably empty container, re-checked after a settle delay — wrong guesses are harmless because identical bytes make same-path conflicts empty and tombstones reap resurrected seeds. Seeds are immutable: SyncEngine.save(split:) forks an edited seed to a fresh ULID and soft-deletes the original, whose stub is exempt from pruning (IndieSync 0.3.0 prune(exempting:)) and vetoes resurrection forever; split views resolve by id through a redirect map to follow the swap. Add Starter Splits in Settings restores deleted seeds by lifting the veto stub and rewriting the bundle bytes. Also fixes ingestFromWatch bypassing the tombstone veto (a phone-deleted workout resurrected when a stale watch resent it) and reaps a live file immediately when its tombstone arrives. SplitDetailView also picks up the category-grouped exercise sections from the exercise-category work.
37 lines
813 B
JSON
37 lines
813 B
JSON
{
|
|
"activityType" : 3,
|
|
"color" : "orange",
|
|
"createdAt" : "2020-01-01T00:00:00Z",
|
|
"exercises" : [
|
|
{
|
|
"category" : 0,
|
|
"durationSeconds" : 0,
|
|
"id" : "01DXF6DT00C4K0NY1NRCFPB3XY",
|
|
"loadType" : 1,
|
|
"name" : "Abdominal",
|
|
"order" : 0,
|
|
"reps" : 10,
|
|
"sets" : 4,
|
|
"weight" : 0,
|
|
"weightReminderWeeks" : 2
|
|
},
|
|
{
|
|
"category" : 0,
|
|
"durationSeconds" : 0,
|
|
"id" : "01DXF6DT001AY3SXTEYHA94MHZ",
|
|
"loadType" : 1,
|
|
"name" : "Rotary",
|
|
"order" : 1,
|
|
"reps" : 10,
|
|
"sets" : 4,
|
|
"weight" : 0,
|
|
"weightReminderWeeks" : 2
|
|
}
|
|
],
|
|
"id" : "01DXF6DT001MA0TM7FHJZT098Z",
|
|
"name" : "Core",
|
|
"order" : 1,
|
|
"schemaVersion" : 1,
|
|
"systemImage" : "figure.core.training",
|
|
"updatedAt" : "2020-01-01T00:00:00Z"
|
|
} |