Files
hermes-agent/tests
kshitijk4poor 9b59ce6426 fix(tui_gateway): end turn audio before settlement, defer only the trim
Gate finding (2c + quality, convergent): the settle-before-trim split moved
the thinking-sound stop and the TTS end-of-text sentinel after
session["running"] = False. Both are non-blocking (a lock + Event.set; an
unbounded queue put), so deferring them gained nothing, and it opened a
window where a prompt admitted on the same session during the trim had its
thinking sound stopped by the old thread and the old stream's final chunk
cut as a barge-in. They run in _release_turn_scopes again, before
settlement; _post_turn_housekeeping keeps only the trim and the
HERMES_HOME override reset. (The original commit subject says "trim/TTS";
only the trim is deferred now.)

The settle-before-trim test now also asserts both audio teardown steps ran
while the session was still running.
2026-10-03 16:52:17 +05:30
..
…
…