mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 13:26:40 +00:00
The cursor write deferred behind a held busy burst re-read the live channel state when it fired. By then the serial reader had already marked the next event seen (and advanced last_ts) before its dispatch committed, so a restart restored a cursor past an event with no admission row. The write now carries the cursor snapshotted when it was scheduled, and a write older than one already landed is skipped so the file never moves back. The invariant test holds e2 inside _resolve_user_name while e1's burst commits and asserts every saved cursor names only admitted events.