Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
Mark abandoned meeting retries as interrupted
altic-dev1f05a9a6239f
diff --git a/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift b/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swiftindex cbe36949..95961b54 100644--- a/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift+++ b/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift@@ -819,6 +819,7 @@ final class MeetingSessionCoordinator: ObservableObject {let closedAt = Date()for index in session.processingAttempts.indices where session.processingAttempts[index].completedAt == nil {session.processingAttempts[index].completedAt = closedAt+ session.processingAttempts[index].errorCode = session.processingAttempts[index].errorCode ?? "interrupted"}// Record the language on the new attempt before the first save. A language change// otherwise leaves only the previous attempt's language, and persistence rejects the session.diff --git a/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift b/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swiftindex f496259c..b3b484a6 100644--- a/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift+++ b/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift@@ -2840,6 +2840,44 @@ final class MeetingRecoveryTests: XCTestCase {XCTAssertNil(coordinator.activeSession)}+ func testRetryAfterInterruptedEmptyResultDoesNotCommitAbandonedLanguage() async throws {+ let dir = self.makeTempDirectory()+ defer { try? FileManager.default.removeItem(at: dir) }+ let store = MeetingSessionStore(rootDirectory: dir)+ var session = try self.completedEnglishRetranscriptionFixture()+ session.transcriptSegments = []+ session.state = .interrupted+ var abandoned = try XCTUnwrap(session.processingAttempts.last)+ abandoned.id = UUID()+ abandoned.completedAt = nil+ abandoned.languageCode = "nl"+ abandoned.stage = .completed+ session.processingAttempts.append(abandoned)+ try await store.create(session)+ let arbiter = StubArbiter()+ let coordinator = MeetingSessionCoordinator(+ store: store,+ capture: StubCaptureController(),+ processing: DiagnosticFailingProcessingController(error: ProcessingFailure()),+ audioArbiter: arbiter+ )+ await coordinator.ensureRestored()+ do {+ _ = try await coordinator.retryProcessing(sessionID: session.id, languageCode: "nl")+ XCTFail("Expected processing failure")+ } catch { XCTAssertTrue(error is ProcessingFailure) }+ let saved = try await store.load(id: session.id)+ let result = try XCTUnwrap(saved)+ XCTAssertEqual(result.languageCode, "en")+ XCTAssertEqual(MeetingRetranscriptionLanguage.failedAttemptLanguage(for: result), "nl")+ XCTAssertEqual(result.state, .failed)+ XCTAssertEqual(result.processingAttempts.first(where: { $0.id == abandoned.id })?.errorCode, "interrupted")+ XCTAssertNotNil(result.processingAttempts.last?.errorCode)+ XCTAssertFalse(result.failures.isEmpty)+ XCTAssertEqual(arbiter.acquireCount, arbiter.releaseCount)+ await coordinator.shutdownForTermination()+ }+func testUnsupportedRetranscriptionLanguageDoesNotLeakAudioLease() async throws {let dir = self.makeTempDirectory()defer { try? FileManager.default.removeItem(at: dir) }