Skip to content

fix(slack): support Grid reaction and pin event listeners - #120944

Merged
sjf-oa merged 5 commits into
mainfrom
sjf/slack-grid-reaction-pin-events
Aug 10, 2026
Merged

sjf-oa merged 5 commits into
mainfrom
sjf/slack-grid-reaction-pin-events

Conversation

@sjf-oa

@sjf-oa sjf-oa commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • enable reaction_added, reaction_removed, pin_added, and pin_removed listeners for Enterprise Grid org installs
  • validate each event against Bolt's listener-owned workspace scope before authorization or dispatch
  • keep workspace identity in Slack lookups, session routing, and system-event deduplication
  • document the required org-install scopes and event subscriptions

Release base

This change is based on sjf/openclaw-release-5-2026-08-04 at
d2605d9635539c32324b66b34b346d03c31977a2.

Root cause

Enterprise installs returned from event registration immediately after the message listeners were installed. Reaction and pin listeners also lacked the validated per-event workspace scope required to safely resolve users, channels, sessions, and deduplication keys when raw Slack IDs overlap across workspaces.

Impact

Org-installed Slack apps can deliver inbound reaction and pin notifications from every authorized workspace without mixing workspace state. Workspace-scoped Slack installs retain their existing listener behavior.

Validation

  • node scripts/run-vitest.mjs ...: 7 Slack test files passed, 143 tests passed
  • targeted scripts/run-oxlint.mjs: passed
  • extension production and test scripts/run-tsgo.mjs graphs: passed
  • node scripts/format-docs.mjs --check: passed for 752 documentation files
  • structured autoreview: clean, no accepted or actionable findings

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: slack Channel integration: slack size: L maintainer Maintainer-authored PR labels Aug 9, 2026
@sjf-oa
sjf-oa force-pushed the sjf/slack-grid-reaction-pin-events branch from 69d84f5 to e3cdb9d Compare August 9, 2026 06:49
@sjf-oa
sjf-oa changed the base branch from main to sjf/openclaw-release-5-2026-08-04 August 9, 2026 06:49
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 9, 2026
@clawsweeper

clawsweeper Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 9, 2026, 4:56 PM ET / 20:56 UTC.

ClawSweeper review

What this changes

The PR registers Slack Enterprise Grid reaction, pin, and membership listeners and carries workspace scope through lookup, routing, deduplication, tests, and setup documentation.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Blocked by patch quality or review findings - 7 items remain

Keep open: the revised head still drops Enterprise Grid reactions in the default own mode before authorization or enqueueing, so it does not deliver the behavior it claims to add.

Priority: P1
Reviewed head: cfc35b9d0edfbf6c1cd5473575fd9a8eb8a1458c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch has a high-confidence P1 delivery defect in its default Enterprise Grid path.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository metadata identifies the author as a member, so the external-contributor proof gate does not apply; the patch still lacks the required default-mode regression evidence.
Patch quality 🧂 unranked krab (1/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository metadata identifies the author as a member, so the external-contributor proof gate does not apply; the patch still lacks the required default-mode regression evidence.
Evidence reviewed 6 items Current-main baseline: Current main returns immediately for Enterprise installations before registering reactions, pins, or members; the PR is needed for this capability but must preserve default delivery semantics.
Default mode: Slack defaults reaction notifications to own.
Enterprise identity owner: The runtime intentionally returns no process-wide bot identity for Enterprise installs, and startup leaves botUserId empty.
Findings 1 actionable finding [P1] Use listener-scoped identity for Grid own reactions
Security None None.

How this fits together

Slack’s monitor accepts Bolt event envelopes and converts authorized events into OpenClaw system events. Enterprise Grid events must retain their listener workspace identity through filtering, authorization, session routing, and deduplication.

flowchart LR
A[Slack Grid event] --> B[Listener workspace scope]
B --> C[Reaction ownership filter]
C --> D[Authorization and lookup]
D --> E[Session routing and deduplication]
E --> F[OpenClaw system event]
Loading

Decision needed

Question Recommendation
Should this member-authored, explicitly non-mergeable branch be revised around the confirmed Bolt listener identity source, or remain paused? Revise the Grid ownership boundary: Pass a verified listener-scoped bot identity into the default own-reaction filter and prove it across two workspaces.

Why: The exact per-listener identity source is a Bolt contract decision, and the PR carries a protected maintainer label plus an explicit non-merge marker.

Before merge

  • Use listener-scoped identity for Grid own reactions (P1) - Enterprise startup intentionally leaves the process-wide bot identity empty, but the default own filter still reads it here. Every Grid reaction therefore returns before authorization and enqueueing. Carry the validated listener identity into this decision and cover the default mode across two workspaces.
  • Resolve merge risk (P1) - Merging as written silently suppresses every Enterprise Grid reaction under the default reactionNotifications: "own" setting.
  • Resolve merge risk (P1) - The branch changes workspace-qualified session and deduplication behavior; the required default-mode two-workspace proof is absent.
  • Complete next step (P2) - A protected, member-authored branch marked non-mergeable needs the Slack owner to confirm the Bolt listener-identity contract before any repair lane proceeds.
  • Improve patch quality - Use the verified Bolt listener identity in own-mode filtering.
  • Improve patch quality - Add a two-workspace default-own regression proving delivery and isolation.

Findings

  • [P1] Use listener-scoped identity for Grid own reactions — extensions/slack/src/monitor/events/reactions.ts:64-65
Agent review details

Security

None.

PR surface

Source +235, Tests +374, Docs +19. Total +628 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 12 435 200 +235
Tests 5 377 3 +374
Docs 1 31 12 +19
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 843 215 +628

Review metrics

Metric Value Why it matters
Production versus test delta production +432/-200; tests +380/-3; docs +31/-12 The production increase is tied to the workspace-scoped routing boundary, but its default reaction path remains incorrect.

Merge-risk options

Maintainer options:

  1. Repair default Grid reaction delivery (recommended)
    Verify the listener-scoped bot identity before the own-mode filter and add the missing two-workspace default-mode regression before merge.
  2. Pause the proposal
    Keep the branch closed to merge until maintainers choose the permanent Grid ownership contract.

Technical review

Best possible solution:

Use a verified listener-scoped bot identity for the own reaction decision, then add a two-workspace regression that queues only reactions on each workspace’s own bot messages.

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

Yes, from source: an Enterprise install leaves the global bot identity empty, while the default own-mode reaction filter requires that identity and returns early. No live Grid run was supplied.

Is this the best way to solve the issue?

No: carrying workspace scope into lookup and routing is necessary, but the ownership decision still reads the process-wide identity that Enterprise setup deliberately leaves empty.

Full review comments:

  • [P1] Use listener-scoped identity for Grid own reactions — extensions/slack/src/monitor/events/reactions.ts:64-65
    Enterprise startup intentionally leaves the process-wide bot identity empty, but the default own filter still reads it here. Every Grid reaction therefore returns before authorization and enqueueing. Carry the validated listener identity into this decision and cover the default mode across two workspaces.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bff0494f33b2.

Labels

Label justifications:

  • P1: The default Enterprise Grid reaction workflow is silently suppressed by this PR.
  • merge-risk: 🚨 message-delivery: The changed listener path can drop reactions before they become OpenClaw system events.
  • merge-risk: 🚨 session-state: The PR changes workspace-qualified system-event session and deduplication identities.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository metadata identifies the author as a member, so the external-contributor proof gate does not apply; the patch still lacks the required default-mode regression evidence.

Evidence

What I checked:

Likely related people:

  • Sarah Fortune: Authored the current branch’s Grid reaction/pin, session-routing, and member-event commits; pre-branch history could not be completed from this partial checkout. (role: recent Slack implementation contributor; confidence: medium; commits: a6432a6b0265, 165fad32b675, cfc35b9d0edf; files: extensions/slack/src/monitor/events/reactions.ts, extensions/slack/src/monitor/provider.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-09T07:46:21.849Z sha 6562c78 :: found issues before merge. :: [P1] Use listener-scoped bot identity for Grid own reactions
  • reviewed 2026-08-09T07:54:24.331Z sha 6562c78 :: found issues before merge. :: [P1] Use listener-scoped bot identity for Grid own reactions
  • reviewed 2026-08-09T19:51:02.486Z sha 6562c78 :: found issues before merge. :: [P1] Carry listener-scoped bot identity into Grid own reactions

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 9, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Aug 9, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Aug 9, 2026
@sjf-oa sjf-oa changed the title fix(slack): support Grid reaction and pin event listeners [DO NOT MERGE] fix(slack): support Grid reaction and pin event listeners Aug 9, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Aug 9, 2026
@sjf-oa
sjf-oa force-pushed the sjf/slack-grid-reaction-pin-events branch from 6562c78 to cfc35b9 Compare August 9, 2026 20:19
@sjf-oa
sjf-oa requested review from a team as code owners August 9, 2026 20:19
@sjf-oa
sjf-oa changed the base branch from sjf/openclaw-release-5-2026-08-04 to main August 9, 2026 20:19
@sjf-oa

sjf-oa commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Real Slack end-to-end verification completed on 2026-08-09 (PDT).

Test surface Human Slack UI actions Direct listener evidence
Personal test bot — Technical workspace Reaction added and removed; message pinned and unpinned reaction_added, reaction_removed, pin_added, and pin_removed all returned for the unique fixture
Personal test bot — Corporate workspace Reaction added and removed; message pinned and unpinned reaction_added, reaction_removed, pin_added, and pin_removed all returned for the unique fixture
Staging test bot — standard test workspace Reaction added and removed; message pinned and unpinned reaction_added, reaction_removed, pin_added, and pin_removed all returned for the unique fixture

The Slack UI action result and the bot listener result were checked separately; UI success alone was not treated as listener proof. All 12 event/target checks passed.

@sjf-oa sjf-oa changed the title [DO NOT MERGE] fix(slack): support Grid reaction and pin event listeners fix(slack): support Grid reaction and pin event listeners Aug 10, 2026
@sjf-oa
sjf-oa merged commit 6efd013 into main Aug 10, 2026
135 of 137 checks passed
@sjf-oa
sjf-oa deleted the sjf/slack-grid-reaction-pin-events branch August 10, 2026 00:07
sjf-oa added a commit that referenced this pull request Aug 10, 2026
* fix(slack): support Grid reaction and pin events

* refactor(slack): isolate system event routing

* test(slack): align Grid event scope fixture

* refactor(slack): pass optional event scope directly

* fix(slack): support Grid member events

---------

Co-authored-by: Sarah Fortune <[email protected]>
sjf-oa added a commit that referenced this pull request Aug 10, 2026
* fix(slack): support Grid reaction and pin event listeners (#120944)

* fix(slack): support Grid reaction and pin events

* refactor(slack): isolate system event routing

* test(slack): align Grid event scope fixture

* refactor(slack): pass optional event scope directly

* fix(slack): support Grid member events

---------

Co-authored-by: Sarah Fortune <[email protected]>

* test(slack): align Grid reaction event fixture

---------

Co-authored-by: Sarah Fortune <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 10, 2026
…20944)

* fix(slack): support Grid reaction and pin events

* refactor(slack): isolate system event routing

* test(slack): align Grid event scope fixture

* refactor(slack): pass optional event scope directly

* fix(slack): support Grid member events

---------

Co-authored-by: Sarah Fortune <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants