Skip to content

fix(cloud-agent-next): persist kilo import diagnostics#4199

Open
eshurakov wants to merge 2 commits into
mainfrom
respected-eocursor
Open

fix(cloud-agent-next): persist kilo import diagnostics#4199
eshurakov wants to merge 2 commits into
mainfrom
respected-eocursor

Conversation

@eshurakov

Copy link
Copy Markdown
Contributor

Summary

  • Persist bounded, redacted kilo import failure diagnostics in restricted wrapper log archives.
  • Serialize final log uploads, keep final R2 storage bounded, and align wrapper shutdown grace with the upload deadline.
  • Protect the wrapper-owned diagnostic path from materialized environment overrides.

Verification

Not manually tested; this change targets deterministic wrapper failure and shutdown paths without a practical UI flow.

Visual Changes

N/A

Reviewer Notes

Final archives overwrite the stable session-final R2 key. Truncated process output is omitted, and unterminated private-key blocks redact through end of output.

Comment thread services/cloud-agent-next/wrapper/src/restore-session.ts
@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • services/cloud-agent-next/wrapper/src/main.ts
  • services/cloud-agent-next/wrapper/src/restore-session.ts
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts
Previous Review Summaries (3 snapshots, latest commit 2b27157)

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

Previous review (commit 2b27157)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrapper/src/main.ts 739 Final-upload grace starts after startup cleanup, so the sandbox can still cut off session-final uploads during runtime startup shutdowns
services/cloud-agent-next/wrapper/src/restore-session.ts 712 Successful imports leave stale failure diagnostics behind
Files Reviewed (13 files)
  • services/cloud-agent-next/src/agent-sandbox/cloudflare/cloudflare-agent-sandbox.test.ts - 0 issues
  • services/cloud-agent-next/src/agent-sandbox/cloudflare/cloudflare-agent-sandbox.ts - 0 issues
  • services/cloud-agent-next/src/shared/protocol.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/lifecycle.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/lifecycle.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/log-uploader.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/log-uploader.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/main.ts - 1 issue
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/restore-session.ts - 1 issue
  • services/cloud-agent-next/wrapper/src/session-bootstrap.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/session-bootstrap.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/utils.ts - 0 issues

Previous review (commit 3927c91)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts

Previous review (commit 36fdeec)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrapper/src/restore-session.ts 712 Successful imports leave stale failure diagnostics behind
Files Reviewed (13 files)
  • services/cloud-agent-next/src/agent-sandbox/cloudflare/cloudflare-agent-sandbox.test.ts - 0 issues
  • services/cloud-agent-next/src/agent-sandbox/cloudflare/cloudflare-agent-sandbox.ts - 0 issues
  • services/cloud-agent-next/src/shared/protocol.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/lifecycle.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/lifecycle.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/log-uploader.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/log-uploader.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/main.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/restore-session.ts - 1 issue
  • services/cloud-agent-next/wrapper/src/session-bootstrap.test.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/session-bootstrap.ts - 0 issues
  • services/cloud-agent-next/wrapper/src/utils.ts - 0 issues

Reviewed by gpt-5.4-2026-03-05 · Input: 79.6K · Output: 9.4K · Cached: 461.8K

Review guidance: REVIEW.md from base branch main

@eshurakov eshurakov force-pushed the respected-eocursor branch from 3927c91 to 2b27157 Compare June 24, 2026 11:57
Comment thread services/cloud-agent-next/wrapper/src/main.ts Outdated
@eshurakov eshurakov changed the title fix(cloud-agent-next): persist secure import diagnostics fix(cloud-agent-next): persist kilo import diagnostics Jun 24, 2026
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