fix: meeting stream reconnect on session expiry + onnx worker packaging#830
Open
xAlcahest wants to merge 4 commits into
Open
fix: meeting stream reconnect on session expiry + onnx worker packaging#830xAlcahest wants to merge 4 commits into
xAlcahest wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Meetings longer than 60 minutes hit the OpenAI Realtime API session limit and the WebSocket dies silently. Audio keeps flowing to a dead socket, no reconnection happens, and the user loses all transcription from that point on. This PR adds automatic reconnection with a proactive timer at 55 minutes (graceful, zero audio loss) and a reactive fallback on
session_expired(safety net with pre-connect buffering).Separately, the ONNX worker was missing from production builds because
src/workers/wasn't in the electron-builder file list or asarUnpack config. The worker crashed in a loop on every app launch after any note was saved. This broke semantic search on all platforms.Changes
src/helpers/openaiRealtimeStreaming.js: proactive session timer at 55min,onSessionExpiredcallback,session_expirederror interception, pre-connect audio buffer when ws is nullsrc/helpers/ipcHandlers.js:reconnectMeetingStreams()function that swaps streaming instances before token fetch, fetches new credentials, connects, then disconnects old instances. Guard against concurrent reconnects and cap at 5 reconnects per sessionelectron-builder.json: addedsrc/workers/**/*tofilesandasarUnpacksrc/helpers/onnxWorkerClient.js: path fix fromapp.asartoapp.asar.unpackedforutilityProcess.fork()test/helpers/openaiRealtimeStreaming.test.js: 17 tests covering session expiry handling, pre-connect buffer, cold-start flush, zero-audio-loss verification across reconnect boundary, concurrent expiry guard