Files
hermes-agent/tests
Emir Saffar fa939860ca fix(cron): never lose a bot-chat alert to a delivery timeout
A bot-chat delivery child that times out is killed mid-turn. The killed
child cannot complete, but its turn may have persisted the query into the
session before the kill — so replaying the full payload risks a duplicate,
while staying silent loses the alert entirely (the message was only saved
to job output; the Bot Chat consumer never saw it).

- Timeout on the CLI fallback lane queues a short degraded-delivery marker
  through the existing deferred lane: it references `hermes cron runs`
  and carries a 280-char excerpt instead of the full payload, so a turn
  that persisted the query before the kill cannot duplicate content.
  Recursion-guarded: a marker that itself times out is never re-marked.
- `_run_bot_chat_turn`: a turn report landing in the kill window books
  the delivery instead of raising TimeoutExpired (delivered turns were
  misreported as timeouts).
- `jobs.py`: fire-fence timeout logs ONE ERROR per episode (600s
  interval; repeats log DEBUG, a successful acquire clears the episode).
  One delivery turn holding the fence for minutes previously produced an
  8-ERROR storm plus restore warnings from every failed tick.
2026-09-20 17:55:54 +05:30
..
…
…