Skip to content

fix(slack): throttle repeated channel directory warnings - #18683

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/slack-channel-directory-warning-throttle-18485
Closed

LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/slack-channel-directory-warning-throttle-18485

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • Throttle repeated Slack channel-directory refresh warnings by team/error so recurring Slack API failures do not flood gateway logs.
  • Keep the first warning visible and emit suppressed repeats at debug level.
  • Add regression coverage for repeated workspace failures.

Fixes #18485
Signal Deck card: ops-ops-channel-directory-failed-to-list-slack-channels-for-team-the-request-to-the-slack-api-

Tests

  • scripts/run_tests.sh tests/gateway/test_channel_directory.py::TestBuildSlack::test_repeated_workspace_errors_are_warning_throttled tests/gateway/test_channel_directory.py::TestBuildSlack::test_per_workspace_error_does_not_block_others tests/gateway/test_channel_directory.py::TestBuildSlack::test_response_not_ok_breaks_pagination_for_that_workspace
  • scripts/run_tests.sh tests/gateway/test_channel_directory.py
  • git diff --check origin/main...HEAD

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/slack Slack app adapter labels May 2, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused Slack log-noise fix. Current main still logs each users.conversations non-OK response at gateway/channel_directory.py:243 and each workspace-client exception at gateway/channel_directory.py:264; gateway housekeeping refreshes the directory every five minutes (gateway/run.py:20123-20133). The PR routes both paths through the same team/error-keyed monotonic throttle and adds regression coverage for repeated non-OK workspace responses.

No correctness problems were verified in the proposed change. This is an automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users label Jul 12, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Merged via #70192 — your commit was cherry-picked/reapplied onto current main with your authorship preserved in git history: your channel-directory warning throttle was cherry-picked.

Thanks for the contribution!

@teknium1 teknium1 closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/slack Slack app adapter sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce recurring Hermes gateway/log noise

3 participants