mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 01:05:19 +00:00
Harden PTT audio and the 1.7.1 release (#1423)
Centralize PTT and voice audio-session ownership, harden courier/bridge/outbox delivery and recovery, correct location and delivery-state races, add privacy/release metadata, and ship reproducible universal Arti slices with Release CI coverage. Validated by the full iOS suite, repeated audio/fragment/performance regressions, BitFoundation tests, strict lint and dead-code analysis, universal iOS Release builds, and iOS/macOS archives.
This commit is contained in:
@@ -32,12 +32,27 @@ public protocol KeychainManagerProtocol {
|
||||
func save(key: String, data: Data, service: String, accessible: CFString?)
|
||||
/// Load data from a custom service
|
||||
func load(key: String, service: String) -> Data?
|
||||
/// Load data from a custom service while preserving Keychain status.
|
||||
/// Callers that own encrypted files need to distinguish a missing key
|
||||
/// from a temporarily inaccessible key before replacing those files.
|
||||
func loadWithResult(key: String, service: String) -> KeychainReadResult
|
||||
/// Delete data from a custom service
|
||||
func delete(key: String, service: String)
|
||||
/// Delete every item stored under a custom service
|
||||
func deleteAll(service: String)
|
||||
}
|
||||
|
||||
public extension KeychainManagerProtocol {
|
||||
/// Source-compatible fallback for lightweight/test implementations. The
|
||||
/// production manager overrides this with the underlying OSStatus.
|
||||
func loadWithResult(key: String, service: String) -> KeychainReadResult {
|
||||
if let data = load(key: key, service: service) {
|
||||
return .success(data)
|
||||
}
|
||||
return .itemNotFound
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Keychain Error Types
|
||||
// BCH-01-009: Proper error classification to distinguish expected states from critical failures
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
import BitFoundation
|
||||
|
||||
// TODO: Create a module for test helpers
|
||||
// Kept local until the test-helper module is split out.
|
||||
final class MockKeychain: KeychainManagerProtocol {
|
||||
private var storage: [String: Data] = [:]
|
||||
private var serviceStorage: [String: [String: Data]] = [:]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
// TODO: Create a module for test helpers
|
||||
// Kept local until the test-helper module is split out.
|
||||
struct TestConstants {
|
||||
static let defaultTimeout: TimeInterval = 5.0
|
||||
static let shortTimeout: TimeInterval = 1.0
|
||||
|
||||
@@ -10,7 +10,7 @@ import Foundation
|
||||
import CryptoKit
|
||||
@testable import BitFoundation
|
||||
|
||||
// TODO: Create a module for test helpers
|
||||
// Kept local until the test-helper module is split out.
|
||||
final class TestHelpers {
|
||||
|
||||
// MARK: - Key Generation
|
||||
|
||||
Reference in New Issue
Block a user