Skip to content

fix: slack mention-gating thread participation#77660

Merged
steipete merged 1 commit into
mainfrom
fix/slack-mention-gating
May 5, 2026
Merged

fix: slack mention-gating thread participation#77660
steipete merged 1 commit into
mainfrom
fix/slack-mention-gating

Conversation

@bek91
Copy link
Copy Markdown
Contributor

@bek91 bek91 commented May 5, 2026

Summary

  • Record Slack thread participation after successful visible threaded sends in the shared Slack send path.
  • Remove narrower duplicate recording from the Slack action runtime so message-tool, outbound, and media delivery paths share the same behavior.
  • Add focused coverage for threaded text sends, media uploads, and outbound replyToId-to-threadTs routing.

Root Cause

Slack inbound mention gating already supports implicit thread mentions through the bot thread participation cache, but not every visible outbound Slack path seeded that cache. In particular, sends routed through the shared message/outbound delivery path could visibly reply in a thread without recording participation, so later unmentioned thread replies could be dropped as no-mention despite documented bot participation behavior.

Fixes #77648.

Validation

  • pnpm exec vitest run extensions/slack/src/send.blocks.test.ts extensions/slack/src/send.upload.test.ts extensions/slack/src/action-runtime.test.ts extensions/slack/src/outbound-delivery.test.ts extensions/slack/src/monitor/message-handler/prepare.test.ts --testTimeout=120000
  • pnpm check:test-types
  • pnpm build
  • codex review --base origin/main

AI-assisted: yes.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels May 5, 2026
@bek91 bek91 marked this pull request as ready for review May 5, 2026 03:30
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 5, 2026

Codex review: needs maintainer review before merge.

Summary
The PR moves Slack thread-participation recording into sendMessageSlack after successful threaded sends, removes narrower action-runtime recording, and adds focused Slack send/outbound/media coverage plus a changelog entry.

Reproducibility: yes. Source inspection gives a high-confidence path: current main can post through sendMessageSlack(..., { threadTs }) without seeding the cache that inbound mention gating uses for bot-participated threads.

Next step before merge
No repair lane: the PR is already a narrow implementation with no discrete review finding for automation to fix, and the protected label requires maintainer handling.

Security
Cleared: The diff only touches Slack channel source/tests and the changelog, with no dependency, CI, permission, secret, or supply-chain changes.

Review details

Best possible solution:

Land this PR or an equivalent Slack-owned fix after maintainer review and targeted Slack checks so every successful visible threaded send path seeds participation state consistently.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection gives a high-confidence path: current main can post through sendMessageSlack(..., { threadTs }) without seeding the cache that inbound mention gating uses for bot-participated threads.

Is this the best way to solve the issue?

Yes. Centralizing the cache write after the shared Slack send returns a resolved channel is narrower and more maintainable than duplicating participation recording in each caller.

What I checked:

Likely related people:

  • steipete: Recent commits touch the central Slack send, outbound adapter, and thread-anchor behavior that this PR changes. (role: recent maintainer; confidence: high; commits: 374529d61255, e40d7abda9ff, 2dfa2663ecff; files: extensions/slack/src/send.ts, extensions/slack/src/outbound-adapter.ts, extensions/slack/src/action-runtime.ts)
  • amknight: Commit d0ec3d1 added best-effort persistent Slack thread participation, which is the cache this PR seeds from more send paths. (role: introduced adjacent behavior; confidence: medium; commits: d0ec3d1f09b0; files: extensions/slack/src/sent-thread-cache.ts, extensions/slack/src/monitor/message-handler/prepare.ts)
  • bek91: Before this PR, bek91 authored merged Slack action-thread target normalization work in the same action/threading area. (role: adjacent owner; confidence: medium; commits: d6c2280aab91; files: extensions/slack/src/action-runtime.ts)

Remaining risk / open question:

  • This read-only review did not execute the PR validation commands; CI and maintainer review still need to gate the exact head.

Codex review notes: model gpt-5.5, reasoning high; reviewed against b546aa91e19b.

@bek91 bek91 self-assigned this May 5, 2026
@steipete steipete merged commit cf3ce08 into main May 5, 2026
151 of 156 checks passed
@steipete steipete deleted the fix/slack-mention-gating branch May 5, 2026 04:11
@steipete
Copy link
Copy Markdown
Contributor

steipete commented May 5, 2026

Landed via admin rebase onto main despite unrelated red CI in diagnostics-otel exhaustive-switch lint.

  • Gate: pnpm test extensions/slack/src/send.blocks.test.ts extensions/slack/src/send.upload.test.ts extensions/slack/src/action-runtime.test.ts extensions/slack/src/outbound-delivery.test.ts extensions/slack/src/monitor/message-handler/prepare.test.ts --testTimeout=120000 (5 files, 130 passed); pnpm test extensions/slack/src/thread-ts.test.ts extensions/slack/src/sent-thread-cache.test.ts extensions/slack/src/outbound-adapter.test.ts extensions/slack/src/channel.test.ts --testTimeout=120000 (4 files, 54 passed); pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/slack/src/action-runtime.test.ts extensions/slack/src/action-runtime.ts extensions/slack/src/outbound-delivery.test.ts extensions/slack/src/send.blocks.test.ts extensions/slack/src/send.ts extensions/slack/src/send.upload.test.ts
  • Source SHA: 686279c
  • Landed SHA: cf3ce08

Thanks @bek91!

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

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack mention gating can ignore bot-participated threads for some visible threaded replies

2 participants