fix(assistant): retry provider timeouts#46
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR refines retry classification for deadline-exceeded errors, changes partial-prompt error propagation to return a distinct persistence-failure error when saving partial progress fails, and preserves streamed message progress on prompt cancellation/failure by snapshotting and selectively restoring streamed blocks. ChangesError handling and retry classification
Partial progress error propagation
Streaming block preservation on error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (62.50%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 60.68% 60.72% +0.03%
==========================================
Files 172 172
Lines 16901 16928 +27
==========================================
+ Hits 10257 10280 +23
Misses 5624 5624
- Partials 1020 1024 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/assistant/retry.go`:
- Around line 119-122: The function retryableDeadlineExceeded is using a
call-site label ("request provider response") as a retry signal which causes
wrapped caller deadlines to be treated as provider retries; remove the check for
"request provider response" from retryableDeadlineExceeded and instead rely only
on provider-specific indicators (e.g. "client.timeout exceeded" and "awaiting
headers") or, better, update retryableDeadlineExceeded to inspect/unwrap the
provided error (using errors.Is/errors.As) to detect provider-specific error
types rather than matching call-site messages; adjust the function signature and
callers as needed to use the unwrapped error checks and add a clarifying comment
in retryableDeadlineExceeded about avoiding call-site labels as retry signals.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6a816dde-a03f-4001-993b-17ac62483e09
📒 Files selected for processing (6)
internal/assistant/retry.gointernal/assistant/retry_timeout_test.gointernal/assistant/runtime.gointernal/assistant/runtime_test.gointernal/terminal/async_events.gointernal/terminal/render_test.go
|



Summary
Validation