Repository navigation
fix(slack): prevent bot message authorization from hanging on repeated cursors - #120686
Conversation
|
Merged via squash.
|
|
Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 4:39 PM ET / 20:39 UTC. ClawSweeper reviewWhat this changesThe PR replaces Slack channel-member authorization’s unbounded pagination loop with the existing bounded cursor helper and adds regressions for repeated/cyclic cursors and retry recovery. Merge readinessKeep this active, maintainer-labelled PR open for normal owner approval. Source inspection supports the canonical Slack-plugin fix and found no blocking patch defect. Priority: P2 Review scores
Verification
How this fits togetherSlack bot-room authorization queries channel membership to decide whether an incoming bot message is allowed. The shared cursor paginator turns paginated Slack responses into a bounded member set, which then feeds the authorization cache and allow/deny decision. flowchart LR
A[Slack bot-room message] --> B[Authorization check]
B --> C[Channel-members request]
C --> D[Shared bounded paginator]
D --> E[Normalized member set]
E --> F[Authorization cache]
F --> G[Allow or deny message]
Decision needed
Why: The protected maintainer label requires explicit maintainer handling even though the source and regression coverage support the patch. Before merge
Agent review detailsSecurityNone. PR surfaceSource -4, Tests +53. Total +49 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Merge the focused authorization repair once the Slack owner accepts the exact-head CI state; retain the shared paginator as the sole cursor-termination policy. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: returning the same non-empty cursor repeatedly re-enters current main’s member loop, while the added regressions encode the repeated and cyclic cases. Is this the best way to solve the issue? Yes. Reusing the existing plugin-local paginator is the narrowest maintainable fix; another authorization-specific cursor guard would duplicate termination policy and drift from sibling resolvers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e455cafa1386. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #120445 (separate Slack directory pagination owner; this change covers channel-member authorization).
What Problem This Solves
Fixes an issue where Slack channel bot messages could stall indefinitely when the channel-member lookup received a repeated or cyclic pagination cursor. The stuck lookup also prevented a later authorization attempt from starting cleanly.
Why This Change Was Made
The Slack plugin already has a canonical cursor paginator that detects repeated cursors, bounds pagination, and is shared by its user and channel resolution flows. Route the channel-member authorization lookup through that same owner-local helper instead of maintaining another unbounded pagination loop. Normal multi-page owner discovery remains supported; failed lookups deny authorization and release their pending cache entry so the next attempt can retry.
User Impact
Slack operators retain normal bot-message authorization across multiple member pages, while malformed pagination can no longer hang message processing indefinitely or poison subsequent authorization attempts.
Evidence