Prevent cold LocalVQE startup from overflowing capture pipes - #70
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37d63ca7bf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // in tests; production performs no artificial wait. | ||
| #[cfg(test)] | ||
| thread::sleep(Duration::from_millis(1500)); | ||
| Some(MeetingEnhancer::new()?) |
There was a problem hiding this comment.
Start LocalVQE before the capture producers
When MeetingEnhancer::new() takes five seconds or longer on a cold or contended machine, the microphone and loopback writer threads that start_meeting_capture already spawned hit their FRAME_PIPE_CONNECT_TIMEOUT while this initialization runs. They then close their server ends before the relay reaches open_frame_pipe_reader, so the meeting proceeds into a relay/source failure instead of recording. Initialize the relay/model before starting those producer sessions, or make their connection lifetime cover initialization while retaining the no-read-before-ready ordering.
AGENTS.md reference: AGENTS.md:L391-L392
Useful? React with 👍 / 👎.
Cold LocalVQE initialization could outlast the Meeting source pipes' bounded buffer/write window. Both producers then timed out before the relay could read its first frame, which blocked release v0.5.126 in the canonical main quality gate.
Initialize the model and connect output consumers before opening upstream capture pipes. The existing end-to-end three-track test now forces a 1.5-second initialization delay: it reproduces the original producer timeout before this fix and passes afterwards while retaining timeline and Stop-tail assertions. Failure diagnostics also stop the capture before reporting its relay/source status.
Validation: 94 audio tests, pinned model parity, release clippy, 10 worker/version-cache checks, and Ruff. The app advances to v0.5.127 and the independent audio worker to 0.2.1; the unpublished v0.5.126 tag is preserved.