Repository navigation
Conversation
…4015] Agents that read a channel's top-level messages had no connector path, so they kept their own Slack bot token in the vault. history() calls the gateway's conversations.history route; whoAmI() calls auth.test and returns the bot's user_id and bot_id, which an agent needs to pick out its own posts from history. whoAmI is named for what it returns, following the naming guide, rather than Slack's wire name. The offline stub answers both, and a no-arg stub override is called with no arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DacyUn1ab7Tw2AZtWXasj
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
| user: "U0STUBUSER", | ||
| text: "stub channel message", |
There was a problem hiding this comment.
🟡 Offline history misses the bot's posts
When local code matches history messages against whoAmI, the default message has a different user ID and no bot ID. Bot-post detection fails in local runs.
Learn more
The offline Slack client returns fake responses so workflow code can exercise its Slack branches without a network call. Its postMessage returns timestamp 1700000000.000100; the new history message uses that timestamp but credits U0STUBUSER. The whoAmI response instead identifies the bot as U0STUBBOT/B0STUBBOT. Code that uses those identifiers to recognize its own posts therefore takes a different branch locally.
Example: After postMessage({ channel: "C1", text: "hi" }), an agent scans history({ channel: "C1" }) for message.user === (await whoAmI()).user_id. Both default responses reference timestamp 1700000000.000100, but the scan finds no bot post.
Recommended fix: Make the default history message's user and bot_id agree with the default whoAmI identity, and add a stub test that matches them.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 373d14b: the default history message now has its own ts, so it reads as another user's message and no longer collides with the postMessage stub's ts.
… support-desk note [SAP-4015] The offline history() message reused postMessage's stub ts but named a different author, so local code matching history against whoAmI saw the bot's own post credited to someone else. The support-desk README said the connector has no conversations.history; it now has one, and the remaining gap is that the desk does not search it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DacyUn1ab7Tw2AZtWXasj
Primary change type
Problem and motivation
Agents that read a Slack channel's top-level messages had no connector path, so they kept their own Slack bot token in the vault. The Mushroom Cloud team bot does this today: it reads channel history to find its contest threads and calls
auth.testto recognise its own posts.Summary and scope
connectors.slackgainshistory()(Slackconversations.history: a channel's top-level messages, paginated, witholdest/latest/inclusive) andwhoAmI()(Slackauth.test: the bot's ownuser_idandbot_id).whoAmIis named for what it returns rather than Slack's wire name. The offline stub answers both;stubSlacknow calls a no-arg override with no arguments, the one non-additive line to check instub/index.ts.Out of scope:
conversations.join. It needs a new install scope that would make every connected workspace reinstall; inviting the app to the channel covers the case, and the README says so.Related work
Related issue or discussion: SAP-4015. Gateway routes: sapiom/Sapiom#5923, which must be deployed before this release is useful.
Validation
Tests and documentation
Wire tests for both methods (URL, method, body), stub defaults and a no-arg override test. The Slack connector README gains both rows plus a note on
not_in_channeland usingwhoAmIwithhistory.Compatibility and release impact
@sapiom/toolsminor).Security
will follow the
Security Policy for
private reporting.
AI assistance
Written by Claude Code (Claude Opus 5.5) in an Agent Orchestrator session, following the existing
replies/userInfopatterns, and verified with the commands above.Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.
🤖 Generated with Claude Code
https://claude.ai/code/session_011DacyUn1ab7Tw2AZtWXasj
Summary by CodeRabbit
New Features
whoAmI().Documentation