refactor: use savedMessageId directly instead of re-fetching messages#803
Conversation
Capture the first saved message ID from the agent SDK's response and pass it through to metadata saving and approval linking, eliminating the need to list and search through messages after generation. Also increases workflow completion deadline from 60s to 7 minutes.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR modifies the agent response completion flow across three files. It increases the deadline timeout for workflow completion responses from 60 to 420 seconds. It refactors message ID handling in the completion handler to accept an optional messageId field instead of deriving it through message list inspection. The response generation module is updated to capture and propagate the first saved message ID through the completion payload, and to use this ID directly when linking approvals rather than querying for the message. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
Summary
savedMessageIdfrom the agent SDK's response and pass it through to metadata saving and approval linking, removing the need tolistMessagesand search after generationonAgentCompleteby acceptingmessageIddirectly instead of re-fetching messages to find the right oneTest plan
message_metadatatable)Summary by CodeRabbit
Bug Fixes
Refactor