hermes-agent/tui_gateway
asill-livestream 42d7054f65 fix(tui): eliminate TOCTOU race between goal followup and concurrent turn submission
H1: When a turn finished and a goal followup existed, the finally
block set running=False (under history_lock), then the goal followup
code re-acquired the lock and set running=True.  Between these two
lock acquisitions, a notification poller or concurrent prompt.submit
could acquire the lock, see running=False, and start a second turn on
the same session — leading to interleaved history writes.

Fix: instead of releasing and re-acquiring the turn guard, keep
running=True across the finally→goal-followup boundary.  Only set
running=False in the finally when there is NO goal followup to chain.
This eliminates the TOCTOU window entirely.

All 183 TUI tests pass, including goal command tests.
2026-06-05 00:50:03 +09:00
..
__init__.py feat: new tui based on ink 2026-04-02 19:07:53 -05:00
entry.py perf(tui): stop slow/dead MCP servers from freezing TUI startup 2026-05-30 02:53:37 -07:00
event_publisher.py chore: address copilot comments 2026-04-24 12:51:04 -04:00
render.py tui: inherit Python-side rendering via gateway bridge 2026-04-05 18:50:41 -05:00
server.py fix(tui): eliminate TOCTOU race between goal followup and concurrent turn submission 2026-06-05 00:50:03 +09:00
slash_worker.py feat: personality 2026-04-08 00:15:15 -04:00
transport.py fix(tui-gateway): harden stdio transport against half-closed pipes + SIGTERM races (#17118) 2026-04-28 17:54:06 -05:00
ws.py fix(dashboard): explain WHY a chat WS connection was refused (#38743) 2026-06-04 00:36:03 -07:00