Skip to content

DOS-1526: add provider retry session tests - #13

Draft
mdostal wants to merge 1 commit into
mainfrom
agent/dostal-dev/2daf7768
Draft

DOS-1526: add provider retry session tests#13
mdostal wants to merge 1 commit into
mainfrom
agent/dostal-dev/2daf7768

Conversation

@mdostal

@mdostal mdostal commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds real-DB coverage for CreateRetryTask provider failure retries so the retry child keeps the parent session_id and work_dir for transient provider errors.

Covers:

  • agent_error.provider_capacity_or_rate_limit
  • agent_error.provider_server_error
  • agent_error.provider_network

Preserves the existing codex_semantic_inactivity fresh-session behavior by keeping that regression test in the narrow validation run.

Validation

cd server && go test ./cmd/server -run 'TestCreateRetryTask(FreshensCodexSemanticInactivity|KeepsOrdinaryTimeoutSession|KeepsProviderFailureSession)$' -count=1 -v

Closes DOS-1526

Summary by CodeRabbit

  • Tests
    • Added integration coverage confirming retry tasks retain the original session and working directory after capacity, rate-limit, server, or network failures.
    • Verified retry attempts increment correctly without forcing a new session.

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

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a5b9f8c-5047-42da-9524-21231b20e0a9

📥 Commits

Reviewing files that changed from the base of the PR and between 9696a37 and e59b766.

📒 Files selected for processing (1)
  • server/cmd/server/rerun_session_test.go

Walkthrough

Adds an integration test for CreateRetryTask covering provider capacity, rate-limit, server, and network failures. The test verifies preservation of session_id and work_dir, disables forced fresh sessions, and increments the child attempt to 2.

Changes

Retry session preservation

Layer / File(s) Summary
Provider failure retry-session test
server/cmd/server/rerun_session_test.go
Adds table-driven coverage ensuring retry tasks preserve session context and set Attempt to 2 for provider failure reasons.

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

Possibly related PRs

Suggested reviewers: bohan-j

Poem

A rabbit checked the retry trail,
Where sessions stayed on course.
Workdirs hopped from parent to child,
While attempts gained their force.
“No fresh burrow needed here!”
The test suite cheered, of course.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding provider retry session tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/dostal-dev/2daf7768

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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.

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