mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-10 13:31:38 +00:00
#55115 added the dead-target registry so confirmed-dead delivery targets are short-circuited. Its documented scope (gateway/dead_targets.py) is deliberately narrow: only *whole-chat* deaths -- the `forbidden` and chat-level `not_found` (`chat not found`) kinds -- should be recorded; "Thread/topic-level not_found is NOT recorded here ... a deleted topic does not mean the parent chat is dead." But the implementation doesn't honor that scope. classify_send_error collapses chat-level "chat not found" AND thread/message-level not_found ("thread not found", "topic_deleted", "message_id_invalid", "message to edit/reply not found") into one "not_found" kind, _DEAD_ERROR_KINDS contains "not_found" wholesale, and deliver()'s except marks the PARENT chat_id dead. So a single deleted Telegram topic or edited-away message permanently marks the entire chat (and every future scheduled / cron / agent delivery to it) dead -- silently. The adapter self-heal the docstring relies on only covers the non-private-group thread retry; named-DM-topic and message-level failures propagate to deliver()'s except and wrongly kill the whole chat. Add is_chat_level_not_found() (factoring the not_found substrings into chat-level vs sub-chat-level constants) and gate the delivery dead-path: a "not_found" only marks the target dead when it is chat-level. classify_send_error's public contract is unchanged (still returns "not_found" for every shape); only the mark_dead decision is refined, restoring the registry's documented scope. Cross-platform: telegram/slack/discord delivery all flow through classify_send_error -> mark_dead. Adds regression tests through the real deliver() path plus helper/classifier units. |
||
|---|---|---|
| .. | ||
| 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 | ||