You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Status Update: System field integration is partially implemented.
Currently Implemented ✅
In RecordInfo.swift (lines 47-54):
recordName - Unique identifier
recordType - Schema name
recordChangeTag - For optimistic locking
fields - User-defined fields
Missing System Fields ❌
CloudKit provides additional system fields that are NOT currently exposed:
created - Creation timestamp and user info
modified - Last modification timestamp and user info
deleted - Deletion flag (used in change tracking)
What Needs to be Done
1. Verify OpenAPI Spec
Check if openapi.yaml includes these system fields in the Record schema. If not, they may need to be added based on Apple's CloudKit Web Services documentation.
2. Update Generated Types
If the fields are in the OpenAPI spec but not being used, the issue is in how we map from Components.Schemas.Record to RecordInfo.
Consider if CloudKitRecord protocol needs read-only system field accessors:
protocolCloudKitRecord{
// ... existing requirements ...
// Optional system field support
varcreated:SystemFieldTimestamp?{get}varmodified:SystemFieldTimestamp?{get}}
Priority
Medium - These fields are useful for:
Displaying creation/modification dates in UIs
Auditing and tracking changes
Change detection without full fetchRecordChanges calls
Debugging and troubleshooting
However, the core CRUD operations work without them.
Lines 100-138 - toFieldsDict() NEVER writes createdTimestamp:
publicfunctoFieldsDict()->[String:FieldValue]{varfields:[String:FieldValue]=["feedURL":.string(feedURL),"title":.string(title),
// ... many fields ...
"verifiedTimestamp":.date(lastVerified), // ✅ Custom field - written
"attemptedTimestamp":.date(lastAttempted), // ✅ Custom field - written
// ❌ NO createdTimestamp assignment!
]returnfields}
Conclusion: They read a field they never write → CloudKit must populate it automatically.
System Fields Behavior
CloudKit appears to provide automatic metadata fields in the fields dictionary:
createdTimestamp - Automatically populated on record creation
modifiedTimestamp - Automatically updated on modification
Plus other metadata fields
These are separate from user-defined custom fields like:
verifiedTimestamp (custom - manually set)
attemptedTimestamp (custom - manually set)
What MistKit Needs
MistKit's RecordInfo should expose these automatic system fields that CloudKit provides:
createdTimestamp - Read-only, automatic
modifiedTimestamp - Read-only, automatic
Other metadata fields CloudKit provides
Currently, MistKit only exposes the fields dictionary where these appear, but doesn't distinguish between:
Automatic system fields (CloudKit-managed)
User-defined custom fields (developer-managed)
Implementation Path
Option 1: Add computed properties to RecordInfo:
publicstructRecordInfo{publicletrecordName:StringpublicletrecordType:StringpublicletrecordChangeTag:String?publicletfields:[String:FieldValue]
// System field accessors
publicvarcreatedTimestamp:Date?{fields["createdTimestamp"]?.dateValue}publicvarmodifiedTimestamp:Date?{fields["modifiedTimestamp"]?.dateValue}}
Option 2: Update OpenAPI spec and regenerate (if REST API includes these in responses)
Activity
leogdion commentedon Nov 27, 2025
Status Update: System field integration is partially implemented.
Currently Implemented ✅
In
RecordInfo.swift(lines 47-54):recordName- Unique identifierrecordType- Schema namerecordChangeTag- For optimistic lockingfields- User-defined fieldsMissing System Fields ❌
CloudKit provides additional system fields that are NOT currently exposed:
created- Creation timestamp and user infomodified- Last modification timestamp and user infodeleted- Deletion flag (used in change tracking)What Needs to be Done
1. Verify OpenAPI Spec
Check if
openapi.yamlincludes these system fields in the Record schema. If not, they may need to be added based on Apple's CloudKit Web Services documentation.2. Update Generated Types
If the fields are in the OpenAPI spec but not being used, the issue is in how we map from
Components.Schemas.RecordtoRecordInfo.3. Add System Fields to RecordInfo
4. Update CloudKitRecord Protocol
Consider if
CloudKitRecordprotocol needs read-only system field accessors:Priority
Medium - These fields are useful for:
fetchRecordChangescallsHowever, the core CRUD operations work without them.
Related Issues
fetchRecordChangesneedsdeletedfieldfetchZoneChangesmay return these fieldsleogdion commentedon Jan 8, 2026
CONFIRMED:
createdTimestampIS an Automatic System FieldDefinitive Evidence from CelestraCloud
Feed+MistKit.swift analysis proves
createdTimestampis automatic:Line 59 - READS
createdTimestamp:Lines 100-138 -
toFieldsDict()NEVER writescreatedTimestamp:Conclusion: They read a field they never write → CloudKit must populate it automatically.
System Fields Behavior
CloudKit appears to provide automatic metadata fields in the
fieldsdictionary:createdTimestamp- Automatically populated on record creationmodifiedTimestamp- Automatically updated on modificationThese are separate from user-defined custom fields like:
verifiedTimestamp(custom - manually set)attemptedTimestamp(custom - manually set)What MistKit Needs
MistKit's
RecordInfoshould expose these automatic system fields that CloudKit provides:createdTimestamp- Read-only, automaticmodifiedTimestamp- Read-only, automaticCurrently, MistKit only exposes the
fieldsdictionary where these appear, but doesn't distinguish between:Implementation Path
Option 1: Add computed properties to
RecordInfo:Option 2: Update OpenAPI spec and regenerate (if REST API includes these in responses)
Sources:
leogdion commentedon Jan 9, 2026
This issue is now tracked as part of parent issue #199 - Complete CloudKit API Coverage
Reorganize repo and add talk prep content (#25)
leogdion commentedon Apr 29, 2026
Completed and verified in codebase.