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
{{ message }}
Repository navigation
Commit 62aa2d8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: core/architecture/api/src/commonMain/kotlin/net/thunderbird/core/architecture/model/BaseUuidIdentifierFactory.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,5 +25,5 @@ abstract class BaseUuidIdentifierFactory<T : BaseUuidIdentifier>(
Copy file name to clipboardExpand all lines: core/architecture/api/src/commonTest/kotlin/net/thunderbird/core/architecture/model/BaseUuidIdentifierFactoryTest.kt
+31-5Lines changed: 31 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -30,14 +30,40 @@ class BaseUuidIdentifierFactoryTest {
30
30
}
31
31
32
32
@Test
33
-
fun`given create is called twice then returns different Ids`() {
33
+
fun`given create is called then returns UUIDv7 Id`() {
|`AccountId`|`feature:account:api`| The existing UUID-backed account identifier. Global-mail records retain its existing persisted value to establish account scope. Cutover neither replaces nor regenerates it. Account settings and profile runtime state remain outside the global mail database. |
46
-
|`FolderId`|Mail domain | Identifies one local folder record across all accounts. It replaces the legacy account-local folder number at repository boundaries. |
47
-
|`MessageId`|Mail domain | Identifies one local message record across all accounts. A message copied to another folder is a separate local record and therefore has a separate `MessageId`. |
48
-
|`ThreadId`|Mail domain | Identifies one account-scoped conversation, which can contain local message records from Inbox, Sent, Archive, and other folders. It is a durable conversation aggregate, not a legacy numeric thread-root key. Thread operations use `ThreadId`. Operations on an individual local record use `MessageId`. |
49
-
|`AttachmentId`|Mail domain | An opaque attachment-access URI or equivalent reference. It resolves unambiguously after cutover and is not a raw message-part primary key. Message-part keys stay internal unless a future focused attachment contract requires one.|
50
-
51
-
RFC 0009 owns the UUID representation and generation policy for `FolderId`, `MessageId`, and `ThreadId`. These types,
52
-
along with `AccountId` and `AttachmentId`, are the only identifiers that cross the mail repository boundary for this
|`AccountId`|`feature:account:api`| The existing UUID-backed account identifier. Global-mail records retain its existing persisted value to establish account scope. Cutover neither replaces nor regenerates it. Account settings and profile runtime state remain outside the global mail database. |
46
+
|`FolderId`|`feature:mail:folder:api`| Identifies one local folder record across all accounts. It replaces the legacy account-local folder number at repository boundaries. |
47
+
|`MessageId`|`feature:mail:message:api`| Identifies one local message record across all accounts. A message copied to another folder is a separate local record and therefore has a separate `MessageId`. |
48
+
|`ThreadId`|`feature:mail:message:api`| Identifies one account-scoped conversation, which can contain local message records from Inbox, Sent, Archive, and other folders. It is a durable conversation aggregate, not a legacy numeric thread-root key. Thread operations use `ThreadId`. Operations on an individual local record use `MessageId`. |
49
+
|`AttachmentId`|`feature:mail:message:api`| Identifies one persisted attachment record across all accounts. It is distinct from attachmentaccess URIs and internal message-part primary keys. |
50
+
51
+
RFC 0009 owns the UUID representation and generation policy for `FolderId`, `MessageId`, `ThreadId`, and `AttachmentId`.
52
+
These types, along with `AccountId`, are the only identifiers that cross the mail repository boundary for this
53
53
design. Repository contracts never expose legacy numeric IDs or persistence keys.
54
54
55
55
The thread builder uses the imported messages' threading headers across all folders of the same account. When a newly
@@ -71,7 +71,8 @@ For imported data, the migrator records an account-qualified source key before l
| Thread |`(AccountId, legacy folder id, legacy thread root)`|`ThreadId`| rebuild cross-folder memberships from message threading headers and rewrite threaded-list and thread-cache values |
74
-
| Message part |`(AccountId, legacy message-part id)`| internal only | part root and parent references, message root-part reference, attachment-file lookup and URI resolution |
74
+
| Message part |`(AccountId, legacy message-part id)`| internal only | part root and parent references, message root-part reference |
75
+
| Attachment |`(AccountId, legacy message-part id)`|`AttachmentId`| attachment-file lookup and access URI resolution |
75
76
| Pending command |`(AccountId, legacy command id)`| internal only | command row identity and serialized folder references |
76
77
77
78
The exact physical representation is internal, but it must enforce uniqueness of every source key and reject an import
@@ -103,7 +104,7 @@ failure state. A migration gate holds startup, sync, and other background mail w
103
104
6. Establish the durable cutover state and switch repository bindings to the global implementation.
104
105
7. Start post-cutover cleanup of all legacy database and attachment artifacts.
105
106
106
-
The import writes folderand message identifier mappings before importing dependents. After all message records for an
107
+
The import writes folder, message, and attachment identifier mappings before importing dependents. After all message records for an
107
108
account are available, it builds cross-folder `ThreadId` memberships from their threading headers and records the
108
109
legacy folder-local thread-root mappings before rewriting threaded-list and cache values. It then validates all
109
110
rewritten relationships before the global database is published. It translates serialized pending-command folder
0 commit comments