rdmbair15m5-changelog-20260922-0535-feat-20260904-09-cloudkit-default-zone
rdmbair15m5-changelog-20260922-0535-feat-20260904-09-cloudkit-default-zone
Supported legacy default-zone reads in ECSCloudKit, unified process CloudKit entitlement checks, authored migration recipe to RTTySyncV1, and verified 28/28 tests passing across fleet hosts.
Metadata
- Date / Time: 2026-09-22 05:35 EDT
- Host:
rdmbair15m5(Apple Silicon M5, macOS 27.0) - Author / Harness: Antigravity
(
agy@rdmbair15m5/29f62094) - Ticket:
FEAT-20260904-09(Parent:EPIC-20260904-01) - Scope:
rdmbair15m5:~/dev/lib/ECSCloudKit,rdmsm4x:~/dev/lib/ECSCloudKit,git.ecs0.net:git/lib/ECSCloudKit.git
Summary of Changes
ECSCloudKit Default Zone Architecture (
FEAT-20260904-09):Sources/ECSCloudKit/SyncModels.swift:- Added
SyncZoneID.defaultZone(and alias.default) pointing to CloudKit's internal default zone_defaultZone. - Added
isDefault: Boolhelper property. - Added
Codableconformance toSyncZoneID.
- Added
Sources/ECSCloudKit/CloudKitSyncDatabase.swift:- Added
SyncZoneID.ckRecordZoneIDreturningCKRecordZone.default().zoneIDforisDefault == trueand scopedCKRecordZone.ID(zoneName:ownerName:)for custom zones. - Updated
makeCKRecord(zone:),fetchRecords(names:zone:),save(_:zone:), anddeleteRecord(name:zone:)to route throughzone.ckRecordZoneID. - Updated
ensureZone(_:): safe no-op on default zone sinceCKRecordZone.default()implicitly exists in private CloudKit databases and attempting to save it fails. - Updated
changes(zone:since:): fails closed with a clear error indicatingCKFetchRecordZoneChangesOperationis unsupported on the default zone (enforcing custom zone requirement for incremental sync).
- Added
- Unified Entitlement Probing:
- Updated
CloudSyncEntitlements.processHasCloudKit(containerIdentifier:allowedEnvironments:assumeEntitledWithoutEmbeddedProfile:)to inspectcom.apple.developer.icloud-container-environment(defaulting to["Development", "Production"]). This unifiesECSCloudKitwithRTTy's duplicatedSecTaskentitlement inspection.
- Updated
In-Memory and Test Support Mocks:
Sources/ECSCloudKit/InMemorySyncDatabase.swift:- Supported
zone.isDefaultinensureZone,fetchRecords,save, anddeleteRecord. - Throws informative error if
changesis requested on the default zone.
- Supported
Sources/ECSCloudKitTestSupport/MockSyncDatabase.swift:- Implemented
seed(_:zone:)helper to seed records on default zone or custom zones as if pushed from another device. - Added default zone handling matching
InMemorySyncDatabase.
- Implemented
Unit Test Suite:
- Created
Tests/ECSCloudKitTests/DefaultZoneSupportTests.swiftcovering:testSyncZoneIDDefaultPropertiestestMakeCKRecordWithDefaultZoneProducesDefaultZoneIDtestMakeCKRecordWithCustomZoneProducesCustomZoneIDtestInMemorySyncDatabaseDefaultZoneReadWritetestInMemorySyncDatabaseDefaultZoneChangesThrowsUnsupportedtestMockSyncDatabaseDefaultZoneOperations
- Test execution: 28/28 tests passed (0 failures, 0
skipped) on both
rdmbair15m5andrdmsm4x.
- Created
Migration Recipe & Operational Architecture:
- Authored
docs/MIGRATION-RECIPE-DEFAULT-TO-RTTYSYNCV1.md:- 4-Phase zero-loss migration protocol:
- Phase 1: Dual-Read Window (reads
RTTySyncV1with fallback todefaultZoneportable-v1andlatest). - Phase 2: Dual-Write Window (replicates local writes to
RTTySyncV1while updating legacy default zone). - Phase 3: Lockstep Mobile Release & Cutover Gate (all active
clients updated, writes switch exclusively to
RTTySyncV1). - Phase 4: Irreversible Archive & Legacy Cleanup (requires Rich authorization gate, executes backfill migration and retention tagging).
- Phase 1: Dual-Read Window (reads
- Verified signed-device roundtrip verification standards.
- Preserves
CloudStubGuardand fleet data safety boundaries (no live data mutated during library enhancement).
- 4-Phase zero-loss migration protocol:
- Authored
Verification Evidence
- Commit:
4ecc79c(git.ecs0.net:git/lib/ECSCloudKit.git, synced tofleet,origin,backup) rdmbair15m5swift test:Test Suite 'All tests' passed at 2026-09-22 05:31:39.554. Executed 28 tests, with 0 failures (0 unexpected) in 0.005 (0.007) secondsrdmsm4xSync andswift test:- Pulled
fleet mainintordmsm4x:~/dev/lib/ECSCloudKit. - Pushed to
origin mainandbackup main. - 28/28 tests passed.
- Pulled
Rollback & Undo
- Revert commit
4ecc79c:git -C /Users/richh/dev/lib/ECSCloudKit revert 4ecc79c git -C /Users/richh/dev/lib/ECSCloudKit push origin main ssh [email protected] "cd ~/dev/lib/ECSCloudKit && git pull fleet main && git push origin main && git push backup main"