chore(swift-sdk): freeze App Store schema 3.0.0 - #5035
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: dashpay/platform/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (40)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis change adds the frozen SwiftData schema snapshot for version 3.0.0. It defines persistence models and supporting accessors for wallet and transaction data, identities and DashPay, data contracts and documents, tokens, and shielded activity. It also records schema and release metadata. ChangesDash SDK V3 persistence schema
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change records the database schema shipped in App Store version 9.1.1 as a frozen snapshot. It does not change the schema the app currently uses. No concrete defects were identified. The change appears safe to merge once the standard Swift SDK schema checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change establishes a compatibility baseline for sensitive wallet data, but the reviewed code does not add a live persistence route or change which schema opens stores. No introduced security issue was established. Compatibility still depends on the frozen snapshot matching the released store. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 95 functions across 38 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🕓 Queued for automated review — 5th in line, estimated start in ~15 min (commit 2ee0b56)
|
romchornyi
left a comment
There was a problem hiding this comment.
Reviewed at 3120a2272d. There are no blockers, and the chain from Apple release → manifest → fixture → snapshot → registry holds end to end:
freeze_schema_models.py --checkregenerates the snapshot byte-for-byte fromecb9d20b80, which is the platform commit App Store 9.1.1 (35) was built from.- The fixture's Core Data metadata equals
schemas["3.0.0"]: label3.0.0, checksumqyAucxE1…, 36 entity hashes and 95 indexes. - The registry equals the sha256-verified 9.1.1 (35) build manifest on dashwallet-ios
schema-release-data. - Live V3 on v4.2-dev has not drifted since
ecb9d20b80. The only change there is computed helpers inPersistentDocumentType(#5064). - The migration routes are untouched and still covered: legacy 1.0.0 bridge → V3, accepted V1 → V3, historical V2 → V3, and a 3.0.0 store opening without migration.
- There is no overlap with #5070, which fixes the 9.0.0/9.0.1 → 9.1.1 legacy bridge failure on devices.
Non-blocking recommendations:
- Forward-merge into v4.3-dev right after this lands. v4.3-dev has the same gate with empty
schemas/releases, so any dashwallet-ios upload pinned to a v4.3-dev platform commit will keep failingschema_release.rbuntil then. - Stale wording. The
DashSchemaV3doc comment inDashModelContainer.swiftstill says "Current working schema", andSCHEMA_RELEASES.mdstill says "Active models are V3". Once this merges, 3.0.0 is a published number, so it would help to name the 9.1.1 (35) binding andDashSchemaSnapshotV3there. A follow-up by the maintainer fits better than a change to this generated PR. - The generator copies non-schema helpers into snapshots. Examples are
TokenOncePerIdentityDistributionCachein+PersistentToken,DocumentTypeImmutability/DocumentTypedArrayin+PersistentDocumentType, and helpers in+PersistentPublicKey. Renaming any of those live APIs would break files that may never be edited. This already happens for V1/V2, so the fix belongs infreeze_schema_models.py(emit only stored properties, attributes and the init), not here. - Snapshot size in the shipping target. The snapshot's ~4.3k lines compile into the shipping SDK target, although nothing references them until V4 binds to them. This is by design; a possible follow-up is to keep release snapshots test-only until a runtime version needs them.
|
/self-reviewed |
|
/skip-bots |
|
Bots are done — your move: post |
|
/self-reviewed |
|
Policy satisfied — this can merge. |
(cherry picked from commit 052071c)
Issue being fixed or feature implemented
App Store version 9.1.1 (build 35) shipped SwiftData schema 3.0.0.
Preserve its model definitions and synthetic migration fixture before changing that schema.
What was done?
Generated the snapshot from Platform commit
ecb9d20b80b56e56c24cbd412c27bd5ce4d2f1e3and associated Apple releaseacc8c673-bebe-43f2-9384-3be68a76db6f.The publication proof and immutable build manifest are recorded in iOS release metadata.
This PR does not change the active runtime schema or invent a migration. If development has moved, reconcile the next schema version and migration before merging.
How Has This Been Tested?
Metadata checksums and snapshot regeneration were checked by the freeze worker. Normal Swift SDK CI checks the stored schema, indexes and migrations.
Breaking Changes
No runtime schema switch is included. This draft requires human review and a manual merge; no auto-merge is enabled.
PR Hygiene ·
2ee0b56When every box is checked the
PR Hygienecheck passes and this can merge.Summary by CodeRabbit