hermes-agent/gateway/platforms
Wolfram Ravenwolf 16fc717091 fix(mattermost): harden delivery hygiene
PROBLEM: Mattermost threads can become invalid or enormous, exposing two failure modes: internal scratch/reasoning/commentary displays could leak into persistent Mattermost threads via global display toggles, while rejected threaded user-visible replies could disappear unless every failed send fell back flat. A broad flat fallback would pollute channels with tool/status/progress noise.

SOLUTION: Require explicit Mattermost platform opt-in for scratch displays, keep using the existing notify=True metadata marker for user-visible final text/media/file replies, and allow the Mattermost plugin adapter to flat-fallback only notify-worthy sends whose threaded POST failure looks like a broken root/thread. Keep tool/status/progress and other non-notify sends thread-strict. Add regression tests for display opt-in, notify-only broken-thread fallback, generic API failure suppression, and stream notify metadata.

Verification: tests/gateway/test_mattermost.py tests/gateway/test_stream_consumer.py tests/gateway/test_stream_consumer_thread_routing.py tests/gateway/test_stream_consumer_fresh_final.py tests/gateway/test_stream_consumer_draft.py; tests/gateway/test_session_api.py tests/gateway/test_status_command.py tests/gateway/test_resume_command.py tests/hermes_cli/test_commands.py; py_compile touched gateway files; git diff --check.

Session: Mattermost thread 6qg8e9dd1pd9pkhi74xyaa1mry, 2026-06-01.
2026-06-16 06:34:54 -07:00
..
qqbot
…
ADDING_A_PLATFORM.md
…
__init__.py
…
_http_client_limits.py
…
api_server.py perf(api-server): normalize chat content linearly (#46079) 2026-06-14 03:25:49 -07:00
base.py fix(mattermost): harden delivery hygiene 2026-06-16 06:34:54 -07:00
bluebubbles.py
…
dingtalk.py
…
email.py fix(gateway): accept `metadata` kwarg in WhatsApp/email send_image 2026-06-16 06:23:53 -07:00
feishu.py
…
feishu_comment.py
…
feishu_comment_rules.py
…
feishu_meeting_invite.py
…
helpers.py
…
matrix.py fix(matrix): preserve markdown table structure 2026-06-13 06:57:08 -07:00
msgraph_webhook.py
…
signal.py fix(gateway): classify Signal video attachments + catch-all DOCUMENT fallback 2026-06-12 01:07:50 -07:00
signal_rate_limit.py
…
slack.py fix(slack): make video attachments available to agents (#45512) 2026-06-13 03:33:27 -07:00
sms.py
…
telegram.py fix(telegram): edit streamed previews in place as rich (Bot API 10.1) (#46890) 2026-06-16 05:26:04 -07:00
telegram_network.py
…
webhook.py perf(webhook): prune request caches incrementally (#46065) 2026-06-14 02:40:54 -07:00
wecom.py
…
wecom_callback.py
…
wecom_crypto.py
…
weixin.py
…
whatsapp.py fix(gateway): accept `metadata` kwarg in WhatsApp/email send_image 2026-06-16 06:23:53 -07:00
whatsapp_cloud.py fix(whatsapp-cloud): review follow-ups for #43921 2026-06-11 07:51:01 -07:00
whatsapp_common.py fix(whatsapp-cloud): review follow-ups for #43921 2026-06-11 07:51:01 -07:00
yuanbao.py feat(Yuanbao): support wechat forward msg (#43508) 2026-06-12 02:06:47 -07:00
yuanbao_media.py
…
yuanbao_proto.py feat(Yuanbao): support wechat forward msg (#43508) 2026-06-12 02:06:47 -07:00
yuanbao_sticker.py
…