Repository navigation
fix(omi-slack-app): resolve channel targets, link formats, and guard untyped inputs in chat tools - #14693
Conversation
|
Verified end to end — thanks for the tight failure class and the hermetic coverage. What I checked:
I also ran all four plugin suites against this head in an isolated container: One minor edge, non-blocking: in Clean fix on top of the earlier channel-resolution work, and the regression suite locks the contract in.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Good scoped channel-resolution/validation hardening reusing existing helper; DIRTY (conflict) and unrelated Desktop Swift CI failure (rerun triggered) - approve only.
42b48d1 to
c3a41dd
Compare
|
Verified end to end against the current head: all four registered omi-slack-app suites pass locally (33 tests, hermetic, no network) — including the new one and the pre-existing explicit-channel-search and channel-resolution regression suites whose contracts this change rewrites.
Thanks @TheRWX — this removes a real class of agent-facing 500s and makes channel targeting behave the way the chat tools advertise. One FYI for maintainers: the approval on record predates the current head commit (the branch was updated after it), so the head may deserve a quick re-glance before merge. 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
fix(omi-slack-app): confidence ~4/5 - detailed root cause per bullet, concrete fix(...) title, CI green, hermetic regression suite added; diff is 415 lines (over the 300 soft cap) across 4 files. NOT merging: mergeStateStatus is UNKNOWN (stale/recomputing) -- per prior guidance, do not merge on UNKNOWN.
aryanorastar
left a comment
There was a problem hiding this comment.
Verified on c3a41dd465c2.
Slack chat tools resolve channel targets from link formats and guard untyped inputs. I ran plugins/omi-slack-app/test_slack_chat_tools.py against this tip: 11/11 OK.
kodjima APPROVE is not a merge. I am not merging.
kodjima33
left a comment
There was a problem hiding this comment.
Genuine bug fix: guards untyped chat-tool inputs and resolves Slack channel mentions/IDs/URLs that previously 500'd or failed to match. Scoped core change (~135 lines) with a 225-line hermetic regression suite (11 tests) plus existing suites all passing. CI fully green. Confidence 5/5.
…untyped inputs in chat tools
Chat-tool inputs in plugins/omi-slack-app arrived loosely typed or in standard Slack mention/link syntax (<#C012345678|general>, <#C012345678>, archive URLs), and unvalidated non-string parameters crashed handlers with 500 AttributeErrors:
- POST /api/send_message strictly matched ch['name'] == channel.lstrip('#'), failing every raw channel ID (e.g. C012345678) or mention format even when valid in the workspace.
- Non-string or null channel in send_message and search_messages crashed on channel.lstrip('#') with AttributeError, returning HTTP 500.
- Non-string query in search_messages and search_channels crashed on query.lower() with AttributeError, returning HTTP 500.
- Raw channel mentions <#C...> in search_messages failed to match startswith(('C', 'G')), dropping to workspace search rejections.
Changes:
- Added parse_channel_target and resolve_channel_id in slack_client.py to extract and resolve channel IDs across raw IDs (C..., G..., D...), mention syntax (<#ID|name>, <#ID>), archive URLs, and channel names.
- Wired channel resolution and strict request parameter type validation into chat_tool_send_message, chat_tool_search_messages, and chat_tool_search_channels.
- Added hermetic regression suite plugins/omi-slack-app/test_slack_chat_tools.py and registered in .github/checks-manifest.yaml.
Failure-Class: FC-chat-tool-input-assumed-typed-and-complete
c3a41dd to
6e4b1f9
Compare
|
Rebased onto PayPal: [email protected] |
aryanorastar
left a comment
There was a problem hiding this comment.
Re-reviewed current head 6e4b1f9f62bf (prior APPROVE was c3a41dd465c2). parse_channel_target / resolve_channel_id are still absent on origin/main. Tests pin channel-link and untyped-input guards. Hygiene SUCCESS. Not merging.
fix(omi-slack-app): resolve channel targets, link formats, and guard untyped inputs in chat tools
Chat-tool inputs in
plugins/omi-slack-apparrived loosely typed or in standard Slack mention/link syntax (<#C012345678|general>,<#C012345678>, archive URLs), and unvalidated non-string parameters crashed handlers with 500 AttributeErrors:POST /api/send_messagestrictly matchedch["name"] == channel.lstrip('#'), failing every raw channel ID (e.g.C012345678) or mention format even when valid in the workspace.channelinsend_messageandsearch_messagescrashed onchannel.lstrip('#')withAttributeError, returning HTTP 500.queryinsearch_messagesandsearch_channelscrashed onquery.lower()withAttributeError, returning HTTP 500.<#C...>insearch_messagesfailed to matchstartswith(('C', 'G')), dropping to workspace search rejections.Changes:
parse_channel_targetandresolve_channel_idinslack_client.pyto extract and resolve channel IDs across raw IDs (C...,G...,D...), mention syntax (<#ID|name>,<#ID>), archive URLs, and channel names.chat_tool_send_message,chat_tool_search_messages, andchat_tool_search_channels.plugins/omi-slack-app/test_slack_chat_tools.pyand registered in.github/checks-manifest.yaml.Verification:
python3 plugins/omi-slack-app/test_slack_chat_tools.py: 11 tests passpython3 plugins/omi-slack-app/test_slack_search.py: 5 tests passpython3 plugins/omi-slack-app/test_channel_resolution.py: 9 tests passpython3 plugins/omi-slack-app/test_segments.py: 8 tests passFailure-Class: FC-chat-tool-input-assumed-typed-and-complete
PayPal: [email protected]