Skip to content

chore(swift-sdk): freeze App Store schema 3.0.0 - #5035

Merged
llbartekll merged 3 commits into
v4.2-devfrom
codex/freeze-swift-schema-v3.0.0
Sep 28, 2026
Merged

llbartekll merged 3 commits into
v4.2-devfrom
codex/freeze-swift-schema-v3.0.0

Conversation

@llbartekll

@llbartekll llbartekll commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

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 ecb9d20b80b56e56c24cbd412c27bd5ce4d2f1e3 and associated Apple release acc8c673-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 · 2ee0b56

  • Bots — coderabbitai ✓ · thepastaclaw skipped by llbartekll
  • Self-review — posted; again after any push
  • Within your 5 open PRs
  • Build green
  • Approvals — you own every area touched; none needed

When every box is checked the PR Hygiene check passes and this can merge.

Summary by CodeRabbit

  • New Features
    • Added a version 3.0.0 persistence schema covering wallet and account data, transactions, identities, tokens, contacts, and other app records.
    • Added schema release metadata for app version 9.1.1, build 35, including compatibility and integrity information.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 configuration

Configuration used: Repository: dashpay/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7827e8cc-fbd5-497a-ba47-ea7e61a0f6bb

📥 Commits

Reviewing files that changed from the base of the PR and between fc6e394 and 2ee0b56.

⛔ Files ignored due to path filters (1)
  • packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DashReleasedSchemaRegistry.generated.swift is excluded by !**/*.generated.*
📒 Files selected for processing (40)
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentAccount.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentAssetLock.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentCoreAddress.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDPNSName.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDashpayContactProfile.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDashpayContactRequest.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDashpayIgnoredSender.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDashpayPayment.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDashpayProfile.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDataContract.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDocument.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentDocumentType.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentIdentity.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentIdentityBalanceMetadata.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentIndex.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentInvitation.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentKeyword.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentMasternode.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentPendingInput.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentPlatformAddress.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentPlatformAddressesSyncState.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentProperty.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentPublicKey.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentShieldedActivity.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentShieldedNote.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentShieldedOutgoingNote.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentShieldedSyncState.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentShieldedViewingKey.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentToken.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentTokenBalance.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentTokenHistoryEvent.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentTrackedMasternode.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentTransaction.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentTxo.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentWallet.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+PersistentWalletManagerMetadata.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+Schema.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Persistence/FrozenSchemas/DashSchemaSnapshotV3+TokenTypes.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKTests/Fixtures/SchemaStores/releases/fb711a3d216f05936c5ad8f6dcee161203b8f5295c744f9fba3acafd475d72a9.store
  • packages/swift-sdk/schema-releases.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This 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.

Changes

Dash SDK V3 persistence schema

Layer / File(s) Summary
Wallet and transaction persistence
.../FrozenSchemas/DashSchemaSnapshotV3+Persistent{Account,AssetLock,CoreAddress,Invitation,PendingInput,PlatformAddress*,Transaction,Txo,Wallet*}.swift
Adds wallet, account, address, transaction, output, invitation, asset-lock, pending-input, and sync metadata models with their stored fields, relationships, defaults, and query helpers.
Identity, DashPay, and masternode persistence
.../FrozenSchemas/DashSchemaSnapshotV3+Persistent{DPNSName,Dashpay*,Identity*,Masternode*,PublicKey,TrackedMasternode}.swift
Adds identity, public-key, DPNS, DashPay contact and payment, and masternode models with computed accessors, predicates, and update operations.
Data contracts and documents
.../FrozenSchemas/DashSchemaSnapshotV3+Persistent{DataContract,Document*,Index,Keyword,Property}.swift
Adds contract, document, document-type, index, keyword, and property models, including JSON-backed accessors, state updates, local identity linking, and fetch predicates.
Token persistence and value types
.../FrozenSchemas/DashSchemaSnapshotV3+{PersistentToken*,TokenTypes}.swift
Adds token value types and token, balance, and history-event models with formatting, localization, update methods, accessors, and query predicates.
Shielded persistence
.../FrozenSchemas/DashSchemaSnapshotV3+PersistentShielded*.swift
Adds shielded activity, note, outgoing-note, sync-state, and viewing-key models with their constraints, indexes, initial values, and unspent-note predicates.
Schema and release registration
.../FrozenSchemas/DashSchemaSnapshotV3+Schema.swift, packages/swift-sdk/schema-releases.json
Defines the V3 schema model list and records historical schema provenance, V3 schema metadata, and associated application release metadata.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Other

Suggested reviewers: quantumexplorer

Merge Risk: ⚪ Minimal · up to 2ee0b

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 Review

Security architecture risk: 🔵 Low · up to 2ee0b

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
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — A future mismatch in this historical contract could affect migration of one device's persisted wallet and identity records. The reviewed code does not establish expanded remote, cross-user, or service-level access.

Trust Boundaries and Controls

  • observed — Store opening continues through the existing container and migration-plan selection; the new snapshot declaration is internal and is absent from that plan.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: freezing the Swift SDK App Store schema at version 3.0.0.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v4.2.0 milestone Sep 27, 2026
@thepastaclaw

thepastaclaw commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Queued for automated review — 5th in line, estimated start in ~15 min (commit 2ee0b56)
Estimated review time once started: ~30 min (two-phase automated review; median of recent runs).

  • Request priority review — click to move this review to the front of the queue.

@romchornyi romchornyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --check regenerates the snapshot byte-for-byte from ecb9d20b80, 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"]: label 3.0.0, checksum qyAucxE1…, 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 in PersistentDocumentType (#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:

  1. 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 failing schema_release.rb until then.
  2. Stale wording. The DashSchemaV3 doc comment in DashModelContainer.swift still says "Current working schema", and SCHEMA_RELEASES.md still 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 and DashSchemaSnapshotV3 there. A follow-up by the maintainer fits better than a change to this generated PR.
  3. The generator copies non-schema helpers into snapshots. Examples are TokenOncePerIdentityDistributionCache in +PersistentToken, DocumentTypeImmutability / DocumentTypedArray in +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 in freeze_schema_models.py (emit only stored properties, attributes and the init), not here.
  4. 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.

@llbartekll
llbartekll marked this pull request as ready for review September 28, 2026 07:25
@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 28, 2026
@llbartekll

Copy link
Copy Markdown
Contributor Author

/self-reviewed

@llbartekll

Copy link
Copy Markdown
Contributor Author

/skip-bots

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Sep 28, 2026
@llbartekll

Copy link
Copy Markdown
Contributor Author

/self-reviewed

@github-actions

Copy link
Copy Markdown
Contributor

Policy satisfied — this can merge.
Full checklist in the description.

@github-actions github-actions Bot removed the waiting-self-review Waiting for the author to post /self-reviewed label Sep 28, 2026
@llbartekll
llbartekll merged commit 052071c into v4.2-dev Sep 28, 2026
37 of 38 checks passed
@llbartekll
llbartekll deleted the codex/freeze-swift-schema-v3.0.0 branch September 28, 2026 08:40
romchornyi pushed a commit that referenced this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants