Skip to content

fix(cloud-agent-next): release unadmitted queued messages on quarantine - #5920

Merged
eshurakov merged 1 commit into
eshurakov/recovery-stackfrom
eshurakov/recovery-not-ready-retry
Sep 8, 2026
Merged

fix(cloud-agent-next): release unadmitted queued messages on quarantine#5920
eshurakov merged 1 commit into
eshurakov/recovery-stackfrom
eshurakov/recovery-not-ready-retry

Conversation

@eshurakov

@eshurakov eshurakov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When a runtime is quarantined, keep queued messages that never reached a committed attach or prompt.
  • Clear wrapperInstanceId so the replacement runtime can pick them up through the normal queue drain.
  • Still fail accepted work, committed attach proofs, prompt operations, unresolved dispatch, and exhausted attach failures.

Stack

Remaining control-plane recovery stack. #5912#5918 are merged. Merge from the bottom.

  1. fix(cloud-agent-next): control-plane recovery follow-ups #5919 eshurakov/recovery-stackmain
  2. fix(cloud-agent-next): release unadmitted queued messages on quarantine #5920 eshurakov/recovery-not-ready-retryeshurakov/recovery-stack
  3. fix(cloud-agent-next): recover cold attach after idle stop #5957 eshurakov/recovery-cold-bootstrap-attacheshurakov/recovery-not-ready-retry
  4. fix(web): keep Cloud Agent workspace tabs stable during progress #5958 eshurakov/ca-stable-workspace-tabseshurakov/recovery-cold-bootstrap-attach

Reviewer Notes

One commit. Unique vs parent.

Live local E2E did not prove replacement completion: killing only the primary left the proxy up, so pendingRuntimeCleanup blocked later dispatch until preparation_timeout. That stop-lifecycle gap is out of scope here. This PR covers the original kilo_unhealthy unadmitted-queue incident path.

@kilo-code-bot

kilo-code-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Quarantine release still drops leftover attach proofs so replacement drain can retry unadmitted messages; no remaining issues on current HEAD.

Files Reviewed (3 files)
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
Previous Review Summaries (6 snapshots, latest commit d331d9e)

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

Previous review (commit d331d9e)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Quarantine release drops leftover attach proofs so replacement drain can retry unadmitted messages; no remaining issues on current HEAD.

Files Reviewed (3 files)
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts

Previous review (commit ee70bfe)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental change only removes the control-plane retry plan doc; no remaining issues on current HEAD.

Files Reviewed (1 files)
  • docs/plans/control-plane-not-ready-retry.md

Previous review (commit 95fbae6)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Quarantine release drops leftover attach proofs so replacement drain can retry unadmitted messages; no remaining issues on current HEAD.

Files Reviewed (4 files)
  • docs/plans/control-plane-not-ready-retry.md
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts

Previous review (commit 5770e3f)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Quarantine release drops leftover attach proofs so replacement drain can retry unadmitted messages; no remaining issues on current HEAD.

Files Reviewed (4 files)
  • docs/plans/control-plane-not-ready-retry.md
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts

Previous review (commit 14244c1)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Quarantine release now drops leftover attach proofs, so replacement drain can retry unadmitted messages; no remaining issues in the incremental fix.

Files Reviewed (2 files)
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts

Previous review (commit eb9ca56)

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/cloud-agent-next/src/sandbox-session/session-message-queue.ts 306 Release keeps dying-wrapper attach proofs, so replacement drain fails instead of retrying
Files Reviewed (4 files)
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts - 1 issue
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts - 0 issues
  • services/cloud-agent-next/src/sandbox-session/recovery/quarantine-releases-unadmitted-queue.test.ts - 0 issues
  • docs/plans/control-plane-not-ready-retry.md - 0 issues

Fix these issues in Kilo Cloud


Reviewed by grok-4.6 · Input: 114K · Output: 13K · Cached: 487.8K

Review guidance: REVIEW.md from base branch eshurakov/recovery-stack

@eshurakov
eshurakov force-pushed the eshurakov/recovery-not-ready-retry branch from 14244c1 to 5770e3f Compare September 6, 2026 18:03
@eshurakov
eshurakov force-pushed the eshurakov/recovery-not-ready-retry branch from 5770e3f to 95fbae6 Compare September 7, 2026 21:43
@eshurakov
eshurakov force-pushed the eshurakov/recovery-not-ready-retry branch from ee70bfe to d331d9e Compare September 8, 2026 09:14
@eshurakov
eshurakov force-pushed the eshurakov/recovery-not-ready-retry branch from d331d9e to af667f9 Compare September 8, 2026 09:25
@eshurakov
eshurakov merged commit ed88dc0 into main Sep 8, 2026
19 checks passed
@eshurakov
eshurakov deleted the eshurakov/recovery-not-ready-retry branch September 8, 2026 10:15
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.

2 participants