fix(slack): quiet Slack display defaults — no heartbeat/busy-ack breadcrumbs in channels

Slack posts are durable workspace messages, not an ephemeral terminal
status area. Default long_running_notifications and busy_ack_detail to
off for Slack so long-running agent work does not leave permanent
operational breadcrumbs like 'Working — 9 min — iteration 12/90' in
channels. Both remain opt-in per platform via
display.platforms.slack.*.

Also covers the platform-generic shutdown-notification mute path with a
regression test (gateway_restart_notification=false must suppress both
the active-session interruption notice and the home-channel copy).

Salvaged from #69028 (quiet-defaults half only). The PR's other half —
the channel_session_scope_channels session-scoping feature — is a new
config feature outside this log-noise cluster and overlaps the session
scoping territory reworked by merged wave-1/2 Slack session work; it is
deliberately not taken here.
This commit is contained in:
wpeterr 2026-07-23 08:03:04 -07:00 committed by Teknium
parent ece3dd1a4f
commit 390ddfd028
3 changed files with 35 additions and 1 deletions

View file

@ -140,7 +140,12 @@ _PLATFORM_DEFAULTS: dict[str, dict[str, Any]] = {
# Tier 2 — edit support, often customer/workspace channels
# Slack: tool_progress off by default — Bolt posts cannot be edited like CLI;
# "new"/"all" spam permanent lines in channels (hermes-agent#14663).
"slack": {**_TIER_MEDIUM, "tool_progress": "off"},
"slack": {
**_TIER_MEDIUM,
"tool_progress": "off",
"long_running_notifications": False,
"busy_ack_detail": False,
},
"mattermost": _TIER_MEDIUM,
"matrix": _TIER_MEDIUM,
"feishu": _TIER_MEDIUM,

View file

@ -328,6 +328,14 @@ class TestPlatformDefaults:
assert resolve_display_setting({}, "discord", "long_running_notifications") is True
assert resolve_display_setting({}, "discord", "busy_ack_detail") is True
def test_slack_workspace_chatter_defaults(self):
"""Slack should not leave permanent heartbeat/debug breadcrumbs in channels."""
from gateway.display_config import resolve_display_setting
assert resolve_display_setting({}, "slack", "tool_progress") == "off"
assert resolve_display_setting({}, "slack", "long_running_notifications") is False
assert resolve_display_setting({}, "slack", "busy_ack_detail") is False
def test_telegram_mobile_chatter_can_opt_in(self):
"""Per-platform config can re-enable Telegram busy-ack detail
and re-disable the kept-on defaults."""

View file

@ -665,6 +665,27 @@ async def test_shutdown_notifications_use_cached_live_thread_source_when_origin_
)
@pytest.mark.asyncio
async def test_shutdown_notifications_are_fully_muted_when_flag_disabled():
runner, adapter = make_restart_runner()
source = make_restart_source(chat_id="active-42", chat_type="group", thread_id="topic-7")
session_key = build_session_key(source)
runner.config.platforms[Platform.TELEGRAM].gateway_restart_notification = False
runner.config.platforms[Platform.TELEGRAM].home_channel = HomeChannel(
platform=Platform.TELEGRAM,
chat_id="home-42",
name="Ops Home",
)
runner._running_agents[session_key] = object()
runner.session_store._entries[session_key] = MagicMock(origin=source)
adapter.send = AsyncMock()
await runner._notify_active_sessions_of_shutdown()
adapter.send.assert_not_awaited()
@pytest.mark.asyncio
async def test_restart_shutdown_notification_anchors_telegram_dm_topic():
runner, adapter = make_restart_runner()