Skip to content

refactor(opencode): simplify retry error matching (#40694) - #169

Merged
DevFlex-AI merged 1 commit into
bolt-builder:devfrom
anomalyco:dev
Aug 5, 2026
Merged

refactor(opencode): simplify retry error matching (#40694)#169
DevFlex-AI merged 1 commit into
bolt-builder:devfrom
anomalyco:dev

Conversation

@DevFlex-AI

@DevFlex-AI DevFlex-AI commented Aug 5, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Summary by CodeRabbit

  • Bug Fixes
    • Improved retry handling for rate-limited and overloaded service responses.
    • Added recognition for additional temporary service errors, including too many requests, exhausted resources, and unavailable services.
    • Preserved the original error details when reporting rate-limit failures.
  • Tests
    • Expanded coverage for serialized, nested, and provider-specific retry error messages.

@DevFlex-AI
DevFlex-AI merged commit a9a270c into bolt-builder:dev Aug 5, 2026
13 of 15 checks passed
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

@rekram1-node is attempting to deploy a commit to the adevloper152's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ca83a82-8b61-4a54-a4a5-0bd80e93046d

📥 Commits

Reviewing files that changed from the base of the PR and between d546173 and f929f8f.

📒 Files selected for processing (2)
  • packages/opencode/src/session/retry.ts
  • packages/opencode/test/session/retry.test.ts

📝 Walkthrough

Walkthrough

The retry classifier now recognizes additional rate-limit and provider-overload messages. Tests cover serialized, provider, and nested error payloads.

Changes

Retry classification

Layer / File(s) Summary
Retry detection and validation
packages/opencode/src/session/retry.ts, packages/opencode/test/session/retry.test.ts
The classifier matches additional lowercase rate-limit and overload patterns. Tests cover serialized too_many_requests, provider resource_exhausted, and nested rate_limit_exceeded messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Aug 5, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in d546173...f929f8f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade  

Focus Area: Reliability
Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Aug 5, 2026 7:00p.m. Review ↗
Shell Aug 5, 2026 7:00p.m. Review ↗
Secrets Aug 5, 2026 7:00p.m. Review ↗
Docker Aug 5, 2026 7:00p.m. Review ↗
Python Aug 5, 2026 7:00p.m. Review ↗
CSS Aug 5, 2026 7:00p.m. Review ↗
Rust Aug 5, 2026 7:00p.m. Review ↗
Ruby Aug 5, 2026 7:00p.m. Review ↗
Swift Aug 5, 2026 7:00p.m. Review ↗
PHP Aug 5, 2026 7:00p.m. Review ↗
Lua Aug 5, 2026 7:00p.m. Review ↗
Java Aug 5, 2026 7:00p.m. Review ↗
Go Aug 5, 2026 7:00p.m. Review ↗
C & C++ Aug 5, 2026 7:00p.m. Review ↗
Ansible Aug 5, 2026 7:00p.m. Review ↗
Apex Aug 5, 2026 7:00p.m. Review ↗
Elixir Aug 5, 2026 7:00p.m. Review ↗
Groovy Aug 5, 2026 7:00p.m. Review ↗
Objective-C Aug 5, 2026 7:00p.m. Review ↗
PowerShell Aug 5, 2026 7:00p.m. Review ↗
Terraform Aug 5, 2026 7:00p.m. Review ↗
VB.NET Aug 5, 2026 7:00p.m. Review ↗
SQL Aug 5, 2026 7:00p.m. Review ↗
Scala Aug 5, 2026 7:00p.m. Review ↗
Perl Aug 5, 2026 7:00p.m. Review ↗
Kotlin Aug 5, 2026 7:00p.m. Review ↗
Helm Aug 5, 2026 7:00p.m. Review ↗
Erlang Aug 5, 2026 7:00p.m. Review ↗
Dart Aug 5, 2026 7:00p.m. Review ↗
C# Aug 5, 2026 7:00p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 5, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants