fix(cloud-agent): wire Code Reviewer sandbox cleanup#4292
Conversation
| const policy = resolveEphemeralSandboxPolicy(this.env, metadata); | ||
| if (!policy.enabled) return; | ||
| if (!isCodeReviewEphemeralSandboxId(metadata.workspace?.sandboxId)) return; | ||
| await this.getWrapperSupervisor().requestPhysicalWrapperStop('terminal-completed', { |
There was a problem hiding this comment.
WARNING: Cleanup also runs after failed and interrupted terminal events
handleWrapperTerminalEvent() schedules the Code Reviewer wrapper stop and delayed sandbox destruction for every terminal event once the session is on a crv-* sandbox, because this new block never checks params.status. That means failed and interrupted runs will also be torn down 60 seconds later, removing the retry/debug window that the supervisor still preserves for unsuccessful runs and conflicting with the PR's stated "after normal completions" intent.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (25 files)
Reviewed by gpt-5.4-20260305 · Input: 104K · Output: 15.5K · Cached: 1.1M Review guidance: REVIEW.md from base branch |
Summary
crv-*sandboxes, including status reporting and alarm-driven destruction.crv-*so rollout allowlist changes do not tear down shared sandboxes.Verification
N/A - backend lifecycle change with no manual UI path.
Visual Changes
N/A
Reviewer Notes
Focus on the terminal-event lifecycle wiring and the route-based
crv-*cleanup guard. The guard intentionally uses the allocated sandbox ID in addition to current org policy so rollout config changes cannot make older shared allocations destructible.