mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
A client response.create waited on a separate mutex-guarded channel that only the last client commit recorded, so it ignored in-flight VAD commits. The commit chain already ends in session.commitTail, whose done channel closes after every earlier commit has finished. Read the tail under commitOrderMu when the response is issued and wait on it. This drops the extra mutex, the clientCommitDone field and the slotSink callback of issueCommit, and the response is now ordered against both commit producers. Fix the commitSlot.done comment: it closes when the commit function returns, not when the user item is appended. Add a spec for commit, commit, response ordering. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>