Skip to content

fix(slack): safer name search and creator attribution - #1396

Merged
dcramer merged 10 commits into
mainfrom
fix/slack-name-search-external-ranking
Aug 10, 2026
Merged

dcramer merged 10 commits into
mainfrom
fix/slack-name-search-external-ranking

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1394.

Scheduled fire name-searched colin and tagged the wrong person. This change fills two gaps:

  • Rank exact field and token matches above prefixes. Keep Unicode name tokens. Leave ambiguous first names as multiple matches.
  • Build the scheduled dispatch input with the creator's known Slack mention. The agent uses that mention directly when the task refers to its creator.

The creator stays on the scheduled task. Agent dispatch has no new creator field or metadata.

Verify

  • 48 user-lookup and heartbeat integration tests passed
  • Junior typecheck passed
  • Junior lint passed

Requested by David Cramer.

--

View Junior Session [Sentry]

sentry-junior Bot and others added 2 commits August 10, 2026 18:25
Common first-name searches could prefer an external display-name prefix
over a full workspace member. Score exact tokens above field prefixes,
demote guests/strangers, and expose is_external on lookup results.

Evidence: #1394
Co-Authored-By: David Cramer <[email protected]>
Unexport scoring helpers, drop the duplicate unit suite, and cover the
member-over-external and multi-token contracts in userLookup integration
tests.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 10, 2026 8:41pm

Request Review

@dcramer
dcramer marked this pull request as ready for review August 10, 2026 18:35
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 10, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4be0c58. Configure here.

Comment thread packages/junior/src/chat/slack/users.ts Resolved
Comment thread packages/junior/src/chat/slack/users.ts Resolved
Drop the flat external score penalty so exact guest hits still beat weaker
member prefixes, and tokenize names with Unicode letters so accented tokens
stay intact.
@sentry-junior sentry-junior Bot changed the title fix(slack): rank full members above external name matches fix(slack): resolve users and task creator mentions safely Aug 10, 2026
Keep delivery evals on outcome rubrics. Do not force determinism with a
tool blacklist.
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: high PR risk score: high labels Aug 10, 2026
Comment thread packages/junior/src/chat/slack/users.ts Resolved
Name search should rank by match quality only. Creator attribution is
the deterministic path for known people; membership flags were overkill.
@sentry-junior sentry-junior Bot changed the title fix(slack): resolve users and task creator mentions safely fix(slack): safer name search and creator attribution Aug 10, 2026
Build scheduled fire input like event tasks: explain the due run,
then the stored instruction, then creator as supporting context.
Match resource-event notification shape for scheduled dispatch input.
Assert the generated text with an inline snapshot, and encode that
generated-output testing rule in policies/testing.md.
Lead with the execution role, keep creator as task metadata, and drop
the extra handling prose from the dispatch prompt.
@dcramer
dcramer merged commit c3202f1 into main Aug 10, 2026
39 checks passed
@dcramer
dcramer deleted the fix/slack-name-search-external-ranking branch August 10, 2026 20:50

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 13107163 Deployed Aug 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack name search can tag the wrong person

1 participant