Skip to content

DOS-707: retry transient provider task failures - #12

Draft
mdostal wants to merge 3 commits into
mainfrom
agent/dostal-dev/e451dc8a
Draft

DOS-707: retry transient provider task failures#12
mdostal wants to merge 3 commits into
mainfrom
agent/dostal-dev/e451dc8a

Conversation

@mdostal

@mdostal mdostal commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • Extends TaskService auto-retry eligibility to transient provider failures: rate/capacity, provider 5xx, and provider network errors.
  • Leaves quota, auth/access, context overflow, and process failures non-retryable so hard failures still surface.
  • Adds service tests for retry classification and a provider-limit retry child enqueue path.

Validation

  • go test ./internal/service -run 'Test(TaskFailureClassifiers|MaybeRetryFailedTask)'

Summary by CodeRabbit

  • Bug Fixes
    • Improved automatic task retries for runtime recovery, timeouts, inactivity, provider capacity limits, rate limits, server errors, and network failures.
    • Prevented retries for unrecoverable agent process failures.
    • Improved handling of task metadata during retry and completion processing.

Co-authored-by: multica-agent <github@multica.ai>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mdostal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0ae52e69-915e-43ae-ada8-25750f3ed00b

📥 Commits

Reviewing files that changed from the base of the PR and between 572ebdd and c481aaf.

📒 Files selected for processing (11)
  • apps/web/app/api/plugins/route.ts
  • apps/web/next-env.d.ts
  • packages/views/approvals/components/approvals-page.tsx
  • packages/views/command/command-center-page.tsx
  • packages/views/command/envelope.test.ts
  • packages/views/command/envelope.ts
  • packages/views/layout/app-sidebar.test.tsx
  • packages/views/locales/ja/layout.json
  • packages/views/locales/ko/layout.json
  • packages/views/locales/zh-Hans/layout.json
  • packages/views/tsconfig.json

Walkthrough

The retryable failure allowlist now uses taskfailure constants and includes additional agent-provider failure categories. Tests expand classifier coverage and verify retry-child creation for provider limits while rejecting hard failures.

Changes

Retryable failure handling

Layer / File(s) Summary
Expand retryable failure reasons
server/internal/service/task.go
The retry allowlist now includes constant-based runtime, timeout, semantic inactivity, and agent-provider failure reasons.
Validate retry classification and child creation
server/internal/service/task_complete_race_test.go
Mocks support additional scanned fields and child-task query results; tests cover provider classifications, retry creation, and hard-failure rejection.

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

Possibly related PRs

Suggested reviewers: ldnvnbl, bohan-j

Poem

A bunny checks the retry queue,
Provider limits join the crew.
Hard failures stay asleep,
Child tasks hop from rows they keep.
Constants guide each lucky leap.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: retrying transient provider task failures.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/dostal-dev/e451dc8a

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
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.

1 participant