Skip to content

fix(code-review): pin sandbox retries#4264

Open
alex-alecu wants to merge 2 commits into
mainfrom
fix/code-review-kv-sandbox-retry
Open

fix(code-review): pin sandbox retries#4264
alex-alecu wants to merge 2 commits into
mainfrom
fix/code-review-kv-sandbox-retry

Conversation

@alex-alecu

Copy link
Copy Markdown
Contributor

Summary

  • Makes Code Reviewer fresh retries tell Cloud Agent which failed session they came from, so the retry can prove it is using a different sandbox.
  • Uses the shared sandbox failover slot for base shared sandboxes and stops early if the new sandbox cannot be proven safe.
  • Requires Cloud Agent to confirm the safe sandbox choice before Code Reviewer starts the retry session.

Verification

N/A

Visual Changes

N/A

Reviewer Notes

Deploy Cloud Agent before Code Reviewer. If the old Cloud Agent is still running, the retry fails before it starts instead of using the failed sandbox again.

Comment thread services/code-review-infra/src/code-review-orchestrator.ts
@kilo-code-bot

kilo-code-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • services/code-review-infra/src/code-review-orchestrator.ts
  • services/code-review-infra/test/integration/code-review-orchestrator.test.ts
Previous Review Summary (commit 155b102)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 155b102)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
services/code-review-infra/src/code-review-orchestrator.ts 1304 Automatic fresh-session retries still omit sandboxRetryOfCloudAgentSessionId, so retryable sandbox failures can still restart on the same sandbox this PR is trying to avoid.

Fix these issues in Kilo Cloud

Files Reviewed (10 files)
  • packages/worker-utils/src/cloud-agent-next-client.ts - 0 issues
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts - 0 issues
  • services/cloud-agent-next/src/router/handlers/session-prepare.ts - 0 issues
  • services/cloud-agent-next/src/router/schemas.ts - 0 issues
  • services/cloud-agent-next/src/session-prepare.test.ts - 0 issues
  • services/cloud-agent-next/src/session/session-registration.ts - 0 issues
  • services/cloud-agent-next/src/shared-sandbox-route.ts - 0 issues
  • services/code-review-infra/src/code-review-orchestrator.ts - 1 issue
  • services/code-review-infra/src/types.ts - 0 issues
  • services/code-review-infra/test/integration/code-review-orchestrator.test.ts - 0 issues

Reviewed by gpt-5.4-20260305 · Input: 90.8K · Output: 6.5K · Cached: 275.7K

Review guidance: REVIEW.md from base branch main

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