OpenHands / OpenHands/extensions

slack-channel-monitor: search lag / @mention / thread / bot identity fixes

Open
#542 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
148
Forks
90
Avg merge
1d 17h
Merged PRs (30d)
36

Description

Problem

The slack-channel-monitor skill silently drops trigger messages in four real scenarios. All four were observed on a production deployment polling 33 channels once per minute.

Actual Behavior

Deploy the skill and check slack_poller_debug.log, or run the poller manually:

python skills/slack-channel-monitor/scripts/main.py --debug
  1. Search index lag: search.messages results are bounded by last_poll, but Slack's search index lags the live stream by ~1-2 min. A trigger message becomes searchable only after last_poll moved past it — dropped forever.
  2. @mention triggers unsearchable: search.messages does not index the leading @ of a mention, and a quoted phrase ("openhands") does not match an @openhands mention either. With the default trigger phrase, the search path matches nothing.
  3. Thread context lost: search results carry no thread_ts, so a trigger posted as a thread reply looks like a root message and starts a fresh conversation instead of continuing the tracked one.
  4. Wrong bot identity with user token: auth.test on a user token returns the human owner, so their own messages are misclassified as bot output and skipped.
Expected Behavior

Trigger messages in a monitored channel reliably start/continue a conversation — whether posted at root level, inside a thread, detected 1-2 min after posting, or when running with a user token.

Acceptance Criteria
  • A trigger posted at root level is detected within 1-2 poll runs even though the message is brand-new (search-lag fix).
  • An @mention trigger is found by the search path (trigger term searched without the leading @).
  • A trigger posted as a thread reply continues the existing tracked conversation, not a new one (thread parent resolved via conversations.replies).
  • With SLACK_USER_TOKEN configured, the bot identity is resolved from SLACK_BOT_TOKEN and the human owner's messages are not skipped.
  • python -m py_compile skills/slack-channel-monitor/scripts/main.py passes.
Notes

This exact patch has been running in production for ~3 weeks. A PR fixing all four issues is incoming.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with skills/slack-channel-monitor/scripts/main.py and reproduce the reported cases using python skills/slack-channel-monitor/scripts/main.py --debug, checking slack_poller_debug.log. Trace search-lag, mention, thread, and token-identity handling against the acceptance criteria, then verify with python -m py_compile skills/slack-channel-monitor/scripts/main.py.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.