fix(cloud-agent-next): recover sandbox after wrapper cleanup exhaustion#4648
fix(cloud-agent-next): recover sandbox after wrapper cleanup exhaustion#4648eshurakov wants to merge 2 commits into
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe previously flagged double-destroy risk in the Files Reviewed (4 files)
Previous Review Summary (commit fe16a0c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fe16a0c)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe Overview
Issue Details (click to expand)WARNING
Files Reviewed (9 files)
Reviewed by claude-sonnet-5 · Input: 26 · Output: 4K · Cached: 585.4K Review guidance: REVIEW.md from base branch |
Summary
When wrapper stop/cleanup attempts are exhausted (wrapper unreachable, sandbox likely wedged), the lease previously stayed exhausted forever and queued message delivery remained held. This adds durable post-exhaustion sandbox recovery:
postExhaustionRecoveryentry in the DO sandbox-recovery state, classified from session metadata asisolated-destroy(delete the session sandbox) orshared-failover(record failover on the route, resolve the replacement assignment, persist it into session metadata).Verification
Visual Changes
N/A
Reviewer Notes
Focus on the new reducer transitions in
wrapper-runtime-state.tsand the alarm-drivenreconcilePostExhaustionSandboxRecoveryloop inwrapper-supervisor.ts.