Skip to content

(janitor/comments) remove section banners and narration comments in cloud-agent-next - #7712

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/comments-cloud-agent-next-2
Oct 16, 2026
Merged

kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/comments-cloud-agent-next-2

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Package or topic area cleaned

services/cloud-agent-next (Cloud Agent Next Worker — control-plane DOs, schemas, shared protocol, ingest tests).

Files touched (9)

  • src/control-plane/sandbox/sandbox-do.ts (14)
  • src/control-plane/session/session-do.ts (16)
  • src/control-plane/sandbox/routes.ts (2)
  • src/persistence/schemas.ts (3)
  • src/persistence/CloudAgentSession.ts (5)
  • src/session/session-registration.ts (2)
  • src/shared/control-plane-protocol.ts (1)
  • src/shared/runtime-profile.ts (2)
  • src/websocket/ingest.test.ts (5)

Comment lines removed: 50

(diff total is 95 deletions; the other 45 are blank-line collapses directly resulting from banner removal)

Categories of noise removed

  • Section banners / visual separators (// --- lifecycle entry points --- style, 45 lines) — the method names and JSDoc already convey the grouping, and the spec tags on banners ((B10), (spec §10)) are duplicated in the adjacent JSDoc of the methods they labeled.
  • Narration restating the next statement (5 lines): "Extract sessionId from DO name pattern…", "The DO name is set by the worker when creating the stub.", "Route ingest WebSocket (internal only - from queue consumer)", "Stream connections are server-push only, ignore client messages", and a speculative "Future: could handle client commands…" note.
  • In src/persistence/schemas.ts, the banner's "(read-only fallback, no longer written)" note was already covered by the JSDoc immediately above ("retained only for legacy record parsing").

Important comments intentionally retained

The area was sampled broadly first; nearly all comments in this service are high-quality "why" comments (spec references, failure/recovery rationale, security notes, external-platform behavior). All of those are untouched, including the spec-section JSDoc contracts, ledger/admission rationale in session-registration.ts, and the lastIndexOf(':') userId-with-colons invariant in CloudAgentSession.ts.

Follow-up refactor candidates

None — every removed comment was replaced by nothing because no symbol required narration to be understood.

Validation

  • pnpm run lint (oxlint): 0 warnings, 0 errors
  • pnpm run typecheck (tsgo + wrapper): exit 0
  • pnpm run test (unit, Vitest): 224 files, 6808 passed / 3 skipped
  • pnpm run format:check fails on 4 pre-existing drizzle meta/*.json files on a clean tree too; none of the 9 touched files are flagged
  • Diff reviewed: comment deletions and directly resulting blank-line collapses only; no added lines

…loud-agent-next

Delete 50 comment lines that only restated code or served as visual
separators: 45 '// ---' section banners across the control-plane DOs,
schemas, shared protocol, and ingest tests, plus narration lines
restating the DO-name parse, the /ingest route dispatch, and the
server-push-only stream handling. No behavior change.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 16, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge October 16, 2026 08:06
@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Comment-only cleanup across 9 services/cloud-agent-next files; every changed line is a deleted banner or narration comment (0 additions), no executable code altered, and surviving JSDoc still covers the removed intent.

Files Reviewed (9 files)
  • services/cloud-agent-next/src/control-plane/sandbox/routes.ts
  • services/cloud-agent-next/src/control-plane/sandbox/sandbox-do.ts
  • services/cloud-agent-next/src/control-plane/session/session-do.ts
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts
  • services/cloud-agent-next/src/persistence/schemas.ts
  • services/cloud-agent-next/src/session/session-registration.ts
  • services/cloud-agent-next/src/shared/control-plane-protocol.ts
  • services/cloud-agent-next/src/shared/runtime-profile.ts
  • services/cloud-agent-next/src/websocket/ingest.test.ts

Reviewed by deepseek-v4.1-flash · Input: 38.5K · Output: 3.1K · Cached: 179.6K

Review guidance: REVIEW.md from base branch main

@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Meta Janitor: Safety review passed; requesting approval.

@github-actions github-actions Bot 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.

Meta-janitor safety approval for 57f9c65. Signal: #7712 (comment). GitHub auto-merge remains responsible for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants