refactor(concurrency): isolate ProviderConfig to the main actor and drop unneeded @unchecked Sendable

- ProviderConfig is now @MainActor instead of @unchecked Sendable; AppL10n reads the persisted UI language key directly so off-main string lookups stay valid.
- EnglishLearningStore serializes its read-modify-write with a type-wide lock (several instances share one defaults key).
- URLSession-only transports, GatewayGrantKeychainStore and Keychain conform to Sendable without @unchecked. UserDefaults/DeviceCheck wrappers keep @unchecked because those SDK types are not Sendable.
This commit is contained in:
2026-10-20 23:00:12 +02:00
parent 9a4107cef8
commit d6b614b8be
13 changed files with 38 additions and 14 deletions
@@ -13,7 +13,7 @@ public protocol GatewayGrantCredentialStore: Sendable {
func delete() async throws
}
public struct GatewayGrantKeychainStore: GatewayGrantCredentialStore, @unchecked Sendable {
public struct GatewayGrantKeychainStore: GatewayGrantCredentialStore, Sendable {
public enum Slot: String, Sendable {
case account = "scope-limited.active"
case oobe = "scope-limited.oobe"