From f31c10a0daf340a911bb9febdbb0cea9f677dfd6 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 22 Jul 2026 08:33:06 -0700 Subject: [PATCH] test/docs(slack): force-clear new gating env vars; document new options - Add SLACK_THREAD_REQUIRE_MENTION, SLACK_IGNORE_OTHER_USER_MENTIONS and SLACK_REQUIRE_MENTION_CHANNELS to the conftest behavioral-env force-clear list so config-loader side effects can't leak between tests (same class of leak the existing SLACK_* entries guard against). - Document thread_require_mention and require_mention_channels in the Slack messaging guide next to the other mention-gating options. --- tests/conftest.py | 3 +++ website/docs/user-guide/messaging/slack.md | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 662324dce6dc..1ad1260469b7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -317,6 +317,9 @@ _HERMES_BEHAVIORAL_VARS = frozenset({ # Force-clear on every test setup so the leak can't happen. "SLACK_REQUIRE_MENTION", "SLACK_STRICT_MENTION", + "SLACK_THREAD_REQUIRE_MENTION", + "SLACK_IGNORE_OTHER_USER_MENTIONS", + "SLACK_REQUIRE_MENTION_CHANNELS", "SLACK_FREE_RESPONSE_CHANNELS", "SLACK_ALLOW_BOTS", "SLACK_REACTIONS", diff --git a/website/docs/user-guide/messaging/slack.md b/website/docs/user-guide/messaging/slack.md index d81a9fb1fd72..0dd3865c9642 100644 --- a/website/docs/user-guide/messaging/slack.md +++ b/website/docs/user-guide/messaging/slack.md @@ -501,6 +501,21 @@ slack: # auto-engagement. Opt-in; default off. Env: SLACK_IGNORE_OTHER_USER_MENTIONS. ignore_other_user_mentions: false + # Require an explicit @mention for THREAD replies, while leaving + # top-level channel messages governed by require_mention / + # free_response_channels. Narrower than strict_mention: use it when a + # free-response bot should not join every follow-up in busy threads. + # Opt-in; default off. Env: SLACK_THREAD_REQUIRE_MENTION. + thread_require_mention: false + + # Per-channel force-mention override — the opposite direction of + # free_response_channels. Channels listed here ALWAYS require an + # explicit @mention, even when require_mention is false globally. + # Ongoing conversations still auto-follow (mentioned threads, active + # sessions, bot-authored threads). Comma-separated IDs or a list. + # Env: SLACK_REQUIRE_MENTION_CHANNELS. + require_mention_channels: "" + # Custom mention patterns that trigger the bot # (in addition to the default @mention detection) mention_patterns: