Skip to content

refactor(cloud-agent-next): drop elapsed ms from process diagnostic#4359

Open
eshurakov wants to merge 1 commit into
mainfrom
session/agent_4cd37895-0bdc-46a2-9d57-1f4899a3be6a
Open

refactor(cloud-agent-next): drop elapsed ms from process diagnostic#4359
eshurakov wants to merge 1 commit into
mainfrom
session/agent_4cd37895-0bdc-46a2-9d57-1f4899a3be6a

Conversation

@eshurakov

Copy link
Copy Markdown
Contributor

Summary

Drop the elapsed Nms clause from the user-facing process diagnostic emitted by createSafeProcessDiagnostic in services/cloud-agent-next/wrapper/src/utils.ts. This clause carried no operational signal for recipients — duration varied by host, command, and redaction — and it inflated the termination detail that gets re-prefixed by safe-failure-projection for every workspace-setup and command-runner error path. The result surfaces as shorter, more focused details in user-visible messages such as:

  • Workspace setup failed: sandbox storage full: termination nonzero exit, exit code 128 (down from ... elapsed 182966ms)

ExecResult.elapsedMs is preserved on the wrapper side for telemetry.

Verification

  • pnpm --filter cloud-agent-next exec vitest run test/unit/wrapper/utils.test.ts wrapper/src/session-bootstrap.test.ts wrapper/src/server.test.ts src/kilo/wrapper-ready-error.test.ts — 20/20 pass.
  • pnpm --filter cloud-agent-next run format — clean.
  • pnpm --filter cloud-agent-next run lint — clean.
  • pnpm --filter cloud-agent-next exec typecheck was not run; the change is one source line and matching test-assertion text updates, with no signature/type surface changes.

Visual Changes

N/A — affects an internal log/diagnostic string only; no UI change.

Reviewer Notes

  • Touches 1 production line and 4 test files (5 assertion updates). The two wrapper test files (server.test.ts, session-bootstrap.test.ts) and kilo/wrapper-ready-error.test.ts only have expected-detail string updates.
  • ExecResult.elapsedMs is intentionally retained: it is still set by runProcess and consumed by other call sites for timing (e.g. kilo import finished outcome=... elapsedMs=... structured logs in restore-session.ts).
  • The commit was force-pushed with --force-with-lease after rebasing onto the latest main ("Skip Bedrock for Fable" moved in) and replacing a stale wip commit that had also bundled an unrelated oxfmt pass on the auto-generated default-slash-commands.generated.ts.

The 'elapsed Nms' clause in createSafeProcessDiagnostic offered no
operational signal to recipients (it varied by host, command, and
redaction) and inflated the user-facing termination detail that gets
re-prefixed by safe-failure-projection for every workspace-setup and
command-runner error path.

Internal ExecResult.elapsedMs is preserved for telemetry.

Updates affected unit tests in wrapper/src and test/unit/wrapper/.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@kilo-code-bot

kilo-code-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed a single-line removal of the elapsed Nms clause from createSafeProcessDiagnostic and its four matching test-assertion updates; no logic, security, or test-consistency issues found.

Files Reviewed (5 files)
  • services/cloud-agent-next/wrapper/src/utils.ts
  • services/cloud-agent-next/wrapper/src/server.test.ts
  • services/cloud-agent-next/wrapper/src/session-bootstrap.test.ts
  • services/cloud-agent-next/test/unit/wrapper/utils.test.ts
  • services/cloud-agent-next/src/kilo/wrapper-ready-error.test.ts

Reviewed by claude-sonnet-5-20260630 · Input: 20 · Output: 3.6K · Cached: 477.9K

Review guidance: REVIEW.md from base branch main

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