hermes-agent/gateway
Shakti Prasad Mohapatra 8e9702d227 fix: persist session hygiene compression cooldown to state DB
The session hygiene compression path tracked its per-session failure
cooldown in an in-memory dict (_hygiene_compression_failure_cooldowns).
When the gateway restarted, the dict was gone, so the next message
re-triggered the same failing compression, wedging session storage.

The state DB already has a persistent column
(sessions.compression_failure_cooldown_until) and full read/write/clear
methods (record_/get_/clear_compression_failure_cooldown in hermes_state.py)
used by the in-conversation compression path (context_compressor.py) but
not by the session hygiene path in gateway/run.py.

Fix: replace the in-memory dict with calls to the persistent DB methods:
- Cooldown check: use get_compression_failure_cooldown instead of dict lookup
- Timeout failure: use record_compression_failure_cooldown instead of dict write
- Abort failure: use record_compression_failure_cooldown instead of dict write

After a restart, a session whose compression is in cooldown is now skipped
for the cooldown's remaining duration rather than re-attempted immediately.

Fixes #74136
2026-07-31 23:16:58 -07:00
..
assets
…
builtin_hooks
…
platforms fix(yuanbao): await the forwarded-records loading heartbeat 2026-07-31 22:35:20 -07:00
relay fix(gateway): relay TTS attachments + semantic auto-thread rename on the title turn (#74482) 2026-07-29 18:00:18 -07:00
__init__.py
…
authz_mixin.py fix(gateway): kanban notifier delivery reliability 2026-07-26 16:14:15 -07:00
cgroup_cleanup.py
…
channel_directory.py
…
code_skew.py
…
config.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
cwd_placeholder.py
…
dead_targets.py
…
delivery.py
…
delivery_ledger.py
…
display_config.py
…
drain_control.py
…
hooks.py
…
kanban_watchers.py fix(kanban): deliver notifications from non-dispatch gateways 2026-07-31 21:52:11 -07:00
lifecycle_ledger.py fix(gateway): treat pid=None lifecycle sentinel as unknown ownership in mark_exited 2026-07-28 22:41:09 -07:00
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py fix(gateway): align multiplex pairing stores 2026-07-29 18:43:50 -05:00
platform_registry.py
…
profile_routing.py
…
readiness.py
…
response_filters.py refactor(gateway): promote autonomous silence matcher to shared response_filters helper 2026-07-26 16:55:42 -07:00
restart.py fix(test): hermetic env-detection tests — pin container/supervisor/HOME probes (#422) 2026-07-29 18:55:10 -07:00
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix: persist session hygiene compression cooldown to state DB 2026-07-31 23:16:58 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix(gateway): scope session lists before limiting 2026-07-31 22:36:55 -07:00
session_context.py fix(delegation): prevent child HERMES_SESSION_ID leak into parent process env 2026-07-31 22:32:55 -07:00
session_state.py refactor(gateway): consolidate 19 session-keyed dicts into SessionState (turn/conversation/persistent scopes; eliminates wholesale-reset races) 2026-07-29 12:11:15 -07:00
shutdown_flush.py fix: consolidate agent-history preservation into shutdown_flush module 2026-07-29 16:45:35 +05:30
shutdown_forensics.py
…
shutdown_watchdog.py fix(gateway): detect and report unclean shutdowns via lifecycle ledger (NS-608) 2026-07-28 22:41:09 -07:00
slash_access.py
…
slash_commands.py fix(gateway): offload preflight-compression warning enrichment; behavioral offload tests 2026-07-31 22:39:34 -07:00
status.py fix(windows): native Windows correctness for CLI, gateway status, banner, and WSL browser paths 2026-07-29 23:16:18 -07:00
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py refactor(gateway): shared fence-aware markdown chunker core (yuanbao-derived) + canonical table-row splitter 2026-07-29 11:53:59 -07:00
stream_dispatch.py
…
stream_events.py
…
streaming_tts_consumer.py feat(gateway): streaming TTS adapter contract and consumer (#60671) 2026-07-28 22:31:40 -07:00
systemd_notify.py
…
turn_context.py refactor(gateway): extract run_sync onto TurnRunner (completes the TurnContext seam; AST-identical body) 2026-07-29 16:21:46 -07:00
turn_lease.py
…
wake.py
…
whatsapp_identity.py
…