Seed starter splits deterministically with immutable clone-on-edit seeds
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.
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"activityType" : 3,
|
||||
"color" : "teal",
|
||||
"createdAt" : "2020-01-01T00:00:00Z",
|
||||
"exercises" : [
|
||||
{
|
||||
"category" : 1,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00AHY49HPHA00JGDQY",
|
||||
"loadType" : 0,
|
||||
"name" : "Cat-Cow",
|
||||
"order" : 0,
|
||||
"reps" : 10,
|
||||
"sets" : 1,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 1,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT0021S72PRVXDA0HCNB",
|
||||
"loadType" : 0,
|
||||
"name" : "Dead Bug",
|
||||
"order" : 1,
|
||||
"reps" : 8,
|
||||
"sets" : 1,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 1,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00K2AHTEHR3HRVKGEG",
|
||||
"loadType" : 0,
|
||||
"name" : "Bird Dog",
|
||||
"order" : 2,
|
||||
"reps" : 8,
|
||||
"sets" : 1,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 45,
|
||||
"id" : "01DXF6DT00V256F3TPS99MCP5F",
|
||||
"loadType" : 2,
|
||||
"name" : "Plank",
|
||||
"order" : 3,
|
||||
"reps" : 0,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 30,
|
||||
"id" : "01DXF6DT007YMYCAYYNJEFWTQ5",
|
||||
"loadType" : 2,
|
||||
"name" : "Hollow Body Hold",
|
||||
"order" : 4,
|
||||
"reps" : 0,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 30,
|
||||
"id" : "01DXF6DT00WXCASZG1VEZRPT0Y",
|
||||
"loadType" : 2,
|
||||
"name" : "Side Plank",
|
||||
"order" : 5,
|
||||
"reps" : 0,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00VMWCDF9QCB28WR20",
|
||||
"loadType" : 0,
|
||||
"name" : "Leg Raises",
|
||||
"order" : 6,
|
||||
"reps" : 12,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00MJH9N622QTMM7XB3",
|
||||
"loadType" : 0,
|
||||
"name" : "Bird Dog",
|
||||
"order" : 7,
|
||||
"reps" : 8,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00Z98NR23ESEEKGQH1",
|
||||
"loadType" : 0,
|
||||
"name" : "Reverse Crunch",
|
||||
"order" : 8,
|
||||
"reps" : 12,
|
||||
"sets" : 3,
|
||||
"weight" : 0,
|
||||
"weightReminderWeeks" : 2
|
||||
}
|
||||
],
|
||||
"id" : "01DXF6DT00RV99WG172YFW4NKA",
|
||||
"name" : "Bodyweight Core",
|
||||
"order" : 3,
|
||||
"schemaVersion" : 1,
|
||||
"systemImage" : "figure.core.training",
|
||||
"updatedAt" : "2020-01-01T00:00:00Z"
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"activityType" : 0,
|
||||
"color" : "green",
|
||||
"createdAt" : "2020-01-01T00:00:00Z",
|
||||
"exercises" : [
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00GV3336R9C25W4X2A",
|
||||
"loadType" : 1,
|
||||
"name" : "Abductor",
|
||||
"order" : 0,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 140,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00Z28DJ7PSP7Q11CJH",
|
||||
"loadType" : 1,
|
||||
"name" : "Adductor",
|
||||
"order" : 1,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 140,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00D53Q4QMWAE1BHXR6",
|
||||
"loadType" : 1,
|
||||
"name" : "Leg Press",
|
||||
"order" : 2,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 160,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT006HW2KWNA5BCCDCJE",
|
||||
"loadType" : 1,
|
||||
"name" : "Leg Curl",
|
||||
"order" : 3,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 70,
|
||||
"weightReminderWeeks" : 2
|
||||
}
|
||||
],
|
||||
"id" : "01DXF6DT006QRF1PMGK17FV505",
|
||||
"name" : "Lower Body",
|
||||
"order" : 2,
|
||||
"schemaVersion" : 1,
|
||||
"systemImage" : "figure.run",
|
||||
"updatedAt" : "2020-01-01T00:00:00Z"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"activityType" : 0,
|
||||
"color" : "blue",
|
||||
"createdAt" : "2020-01-01T00:00:00Z",
|
||||
"exercises" : [
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00N1B90PA7K5ABWSSP",
|
||||
"loadType" : 1,
|
||||
"name" : "Lat Pull Down",
|
||||
"order" : 0,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 110,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00R81QRWGCCQG933FZ",
|
||||
"loadType" : 1,
|
||||
"name" : "Tricep Press",
|
||||
"order" : 1,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 100,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT000FX4241G5MPG4WG2",
|
||||
"loadType" : 1,
|
||||
"name" : "Chest Press",
|
||||
"order" : 2,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 40,
|
||||
"weightReminderWeeks" : 2
|
||||
},
|
||||
{
|
||||
"category" : 0,
|
||||
"durationSeconds" : 0,
|
||||
"id" : "01DXF6DT00AD5TSVJPZZVA2S41",
|
||||
"loadType" : 1,
|
||||
"name" : "Seated Row",
|
||||
"order" : 3,
|
||||
"reps" : 10,
|
||||
"sets" : 4,
|
||||
"weight" : 90,
|
||||
"weightReminderWeeks" : 2
|
||||
}
|
||||
],
|
||||
"id" : "01DXF6DT0038BDC2WC3EVX8ZJ5",
|
||||
"name" : "Upper Body",
|
||||
"order" : 0,
|
||||
"schemaVersion" : 1,
|
||||
"systemImage" : "figure.strengthtraining.traditional",
|
||||
"updatedAt" : "2020-01-01T00:00:00Z"
|
||||
}
|
||||
Reference in New Issue
Block a user