fix: keyboard stability, host-only analytics, and auto-reply dedupe
- record analytics/usage only in the host app; the extension no longer opens the SQLite queues, so hiding the keyboard cannot hold WAL locks (0xdead10cc) - sync clipboard history writes across processes so deletes made on one side are not reverted by the other - guard memory-relief reentrancy on controller and telemetry sides to break the recursive crash loop - resolve credentials off the main thread and migrate legacy keys once per install, so Keychain reads cannot be caught in the suspend window - gate Volcengine ASR ping completion to once (SIGTRAP on double resume) - treat same-text captures as the same logical copy and dedupe auto actions by content fingerprint within 30s, stopping Universal Clipboard storms - realign version line to 2.1.0 (build 110)
This commit is contained in:
@@ -112,6 +112,22 @@ final class KeyboardExtensionMemoryReliefTests: XCTestCase {
|
||||
XCTAssertEqual(levels(), [.critical, .critical, .critical])
|
||||
}
|
||||
|
||||
func testReliefIsNeverRequestedFromInsideRelief() {
|
||||
let box = LevelBox()
|
||||
KeyboardExtensionMemoryTelemetry.begin(context: "test")
|
||||
KeyboardExtensionMemoryTelemetry.stopSampling()
|
||||
KeyboardExtensionMemoryTelemetry.reliefHandler = { level in
|
||||
box.levels.append(level)
|
||||
// Shedding records milestones, and recording samples memory again.
|
||||
// Without the reentrancy gate this re-entered the handler until the
|
||||
// main thread's stack ran out — the crash this test pins down.
|
||||
KeyboardExtensionMemoryTelemetry.simulateFootprintForTesting(49)
|
||||
return true
|
||||
}
|
||||
KeyboardExtensionMemoryTelemetry.simulateFootprintForTesting(49)
|
||||
XCTAssertEqual(box.levels, [.critical])
|
||||
}
|
||||
|
||||
func testRepeatedHighFootprintShedsOnce() {
|
||||
let (levels, _) = armedLevels()
|
||||
KeyboardExtensionMemoryTelemetry.simulateFootprintForTesting(41)
|
||||
|
||||
Reference in New Issue
Block a user