Skip to content

fix(cloud-agent-next): preserve cleanup retirement target - #5916

Merged
eshurakov merged 1 commit into
eshurakov/recovery-native-cleanupfrom
eshurakov/recovery-session-delivery
Sep 7, 2026
Merged

fix(cloud-agent-next): preserve cleanup retirement target#5916
eshurakov merged 1 commit into
eshurakov/recovery-native-cleanupfrom
eshurakov/recovery-session-delivery

Conversation

@eshurakov

@eshurakov eshurakov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the intended retirement target through session-delivery cleanup so a later wrapper does not inherit the dying runtime's cleanup.
  • Keep session operation dispatch and integration coverage aligned with scoped receipts.

Stack

Control-plane recovery stack. Merge from the bottom. Each PR targets its parent, not main (except #5912).

  1. fix(cloud-agent-next): isolate observation from liveness #5912 eshurakov/recovery-observationmain
  2. feat(cloud-agent-next): retain session operation results #5913 eshurakov/recovery-resultseshurakov/recovery-observation
  3. feat(cloud-agent-next): coordinate scoped Stop requests #5914 eshurakov/recovery-stop-scopeeshurakov/recovery-results
  4. fix(cloud-agent-next): retire native runtimes safely #5915 eshurakov/recovery-native-cleanupeshurakov/recovery-stop-scope
  5. fix(cloud-agent-next): preserve cleanup retirement target #5916 eshurakov/recovery-session-deliveryeshurakov/recovery-native-cleanup
  6. fix(cloud-agent-next): recover and bound native event feeds #5917 eshurakov/recovery-native-feedeshurakov/recovery-session-delivery
  7. feat(cloud-agent-next): recover control connections with event receipts #5918 eshurakov/recovery-control-connectioneshurakov/recovery-native-feed
  8. fix(cloud-agent-next): control-plane recovery follow-ups #5919 eshurakov/recovery-stackeshurakov/recovery-control-connection
  9. fix(cloud-agent-next): release unadmitted queued messages on quarantine #5920 eshurakov/recovery-not-ready-retryeshurakov/recovery-stack

Do not merge out of order.

Reviewer Notes

One commit. Unique vs parent.

@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

Incremental rebase review: unique session-delivery commit is unchanged versus the prior review; the only tree delta is a parent-inherited void on a floating stop() promise, and no high-confidence issues were found.

Files Reviewed (1 file)
  • services/cloud-agent-next/wrapper/src/control/worktree-runtime-cleanup.ts
Previous Review Summaries (6 snapshots, latest commit 9438fc4)

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

Previous review (commit 9438fc4)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Rebased unique session-delivery commit is unchanged versus the prior review; cleanup stays pinned to the retiring runtime, and no high-confidence issues were found.

Files Reviewed (20 files)
  • packages/worker-utils/src/do-retry-scope.test.ts
  • packages/worker-utils/src/do-retry.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-control/diagnostics.ts
  • services/cloud-agent-next/src/sandbox-control/lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/control-dispatch.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/session-observation.test.ts
  • services/cloud-agent-next/wrapper/src/control/control-handler-result.ts
  • services/cloud-agent-next/wrapper/src/control/operation-registry.test.ts

Previous review (commit ff4fd8d)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Full review of the rewritten session-delivery commit: cleanup stays pinned to the retiring runtime, and no high-confidence issues were found.

Files Reviewed (20 files)
  • packages/worker-utils/src/do-retry-scope.test.ts
  • packages/worker-utils/src/do-retry.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-control/diagnostics.ts
  • services/cloud-agent-next/src/sandbox-control/lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/control-dispatch.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/session-observation.test.ts
  • services/cloud-agent-next/wrapper/src/control/control-handler-result.ts
  • services/cloud-agent-next/wrapper/src/control/operation-registry.test.ts

Previous review (commit 81e9788)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Full review of the rewritten session-delivery commit: cleanup stays pinned to the retiring runtime, and no high-confidence issues were found.

Files Reviewed (20 files)
  • packages/worker-utils/src/do-retry-scope.test.ts
  • packages/worker-utils/src/do-retry.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-control/diagnostics.ts
  • services/cloud-agent-next/src/sandbox-control/lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/control-dispatch.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/session-observation.test.ts
  • services/cloud-agent-next/wrapper/src/control/control-handler-result.ts
  • services/cloud-agent-next/wrapper/src/control/operation-registry.test.ts

Previous review (commit 1db50ec)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the sandbox-control integration test that now asserts cleanup remains pinned to the retiring runtime until stop completes; no issues found.

Files Reviewed (1 file)
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts

Previous review (commit 757bb70)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (20 files)
  • packages/worker-utils/src/do-retry-scope.test.ts
  • packages/worker-utils/src/do-retry.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-control/diagnostics.ts
  • services/cloud-agent-next/src/sandbox-control/lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/control-dispatch.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/session-observation.test.ts
  • services/cloud-agent-next/wrapper/src/control/control-handler-result.ts
  • services/cloud-agent-next/wrapper/src/control/operation-registry.test.ts

Previous review (commit f8de89b)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (20 files)
  • packages/worker-utils/src/do-retry-scope.test.ts
  • packages/worker-utils/src/do-retry.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/persistence/SandboxControl.ts
  • services/cloud-agent-next/src/sandbox-control/diagnostics.ts
  • services/cloud-agent-next/src/sandbox-control/lifecycle.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/control-dispatch.ts
  • services/cloud-agent-next/src/sandbox-session/control-rpc.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-delivery.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-operation.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/integration/session-observation.test.ts
  • services/cloud-agent-next/wrapper/src/control/control-handler-result.ts
  • services/cloud-agent-next/wrapper/src/control/operation-registry.test.ts

Reviewed by grok-4.6 · Input: 52.9K · Output: 6.6K · Cached: 332.3K

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

@eshurakov
eshurakov force-pushed the eshurakov/recovery-session-delivery branch 2 times, most recently from 757bb70 to 1db50ec Compare September 7, 2026 08:55
@eshurakov
eshurakov force-pushed the eshurakov/recovery-session-delivery branch from 1db50ec to 81e9788 Compare September 7, 2026 09:11
@eshurakov
eshurakov force-pushed the eshurakov/recovery-session-delivery branch from 81e9788 to ff4fd8d Compare September 7, 2026 09:34

@iscekic iscekic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eshurakov
eshurakov force-pushed the eshurakov/recovery-session-delivery branch from ff4fd8d to 9438fc4 Compare September 7, 2026 12:50
@eshurakov
eshurakov force-pushed the eshurakov/recovery-session-delivery branch from 9438fc4 to 3a942b4 Compare September 7, 2026 13:21
@eshurakov
eshurakov merged commit a255176 into main Sep 7, 2026
44 checks passed
@eshurakov
eshurakov deleted the eshurakov/recovery-session-delivery branch September 7, 2026 13:39
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