Harden web search context prop parsing - #929
Conversation
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesWeb search context handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🤖 LLM Evaluation ResultsOpenAI
❌ Failed EvaluationsShow 6 failuresOPENAI1. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
2. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
3. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
4. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
5. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
6. TestDirectMessageConversations/[openai]_bot_dm_tool_introspection
Anthropic
❌ Failed EvaluationsShow 1 failuresANTHROPIC1. TestReactEval/[anthropic]_react_cat_message
This comment was automatically generated by the eval CI pipeline. |
Summary
Hardens how the Agents plugin parses the
web_search_contextpost prop. Certain unexpected prop values could produce an uninitialized parse result that was then written to, causing the message-handling path to stop responding. The parser now normalizes such values before use, so message handling stays robust regardless of the prop contents.Added a table-driven regression test in
conversations/web_search_context_test.gocovering the previously problematic input alongside the valid and malformed-input paths.Ticket Link
Jira https://mattermost.atlassian.net/browse/MM-69942
Release Note
Summary by CodeRabbit
Bug Fixes
null, or missing.Tests