mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-11 13:41:53 +00:00
When /compress rotates the session, the handler repointed the live session entry onto the new (empty) continuation session_id and _save()d that BEFORE writing the compressed transcript — and rewrite_transcript swallowed DB write failures at DEBUG. A transient write failure (SQLite lock under concurrent writes, ENOSPC, disk/IO error) left the session pointing at an empty id while the handler still reported a cheerful 'Compressed: N → M' success. The active conversation vanished from view. - gateway/session.py: rewrite_transcript now returns bool (True on write success or no-DB, False on canonical write failure). /retry, /undo, and yuanbao recall ignore the result, so their behavior is unchanged. - gateway/slash_commands.py: _handle_compress_command persists the compressed transcript FIRST and treats a write failure as fatal (raises into the outer handler's 'compress failed' banner). Only repoints + _save()s the session on a successful write. Widened beyond the original rotation case to also cover in-place compaction (#38763): a failed in-place write would otherwise leave the DB untouched while still reporting success. - tests: regression tests for both the rotation and in-place write-failure paths — assert a failure banner, unchanged session_id, and no _save(). Co-authored-by: Hermes Agent <agent@nousresearch.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| builtin_hooks | ||
| platforms | ||
| relay | ||
| __init__.py | ||
| authz_mixin.py | ||
| cgroup_cleanup.py | ||
| channel_directory.py | ||
| code_skew.py | ||
| config.py | ||
| dead_targets.py | ||
| delivery.py | ||
| display_config.py | ||
| drain_control.py | ||
| hooks.py | ||
| kanban_watchers.py | ||
| memory_monitor.py | ||
| message_timestamps.py | ||
| mirror.py | ||
| pairing.py | ||
| platform_registry.py | ||
| response_filters.py | ||
| restart.py | ||
| rich_sent_store.py | ||
| run.py | ||
| runtime_footer.py | ||
| scale_to_zero.py | ||
| session.py | ||
| session_context.py | ||
| shutdown_forensics.py | ||
| slash_access.py | ||
| slash_commands.py | ||
| status.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||
| stream_dispatch.py | ||
| stream_events.py | ||
| whatsapp_identity.py | ||