Skip to content

Slack name search can tag the wrong person #1394

Closed

Description

@sentry-junior

Slack userLookup name search can return the wrong workspace member when several people share a common first name. A scheduled-task fire then posted a real mention for that wrong person.

Observed

Root cause (high confidence)

  • Name search walks users.list with bounded pagination and ranks fuzzy matches (exact > prefix > word-boundary > substring) in packages/junior/src/chat/slack/users.ts
  • Common first names can produce multiple high-scoring hits; the top rank is not always the intended person
  • Related but separate: fire already has dispatch.metadata.creatorSlackUserId, yet the model still used name search instead of that id. See also Scheduler fabricates mention links in task outputs #554 (fabricated mentions) and closed Support identity-backed Slack mentions #1163 (identity-backed mentions).

Impact

  • Wrong people get notified in Slack
  • Especially risky for scheduled reminders and other fire turns that resolve names without a unique id or email

Reported by Colin Kawai.

Requested by David Cramer.

--

View Junior Session [Sentry]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions