Skip to content

(janitor/dead-code): remove unused withSandbox helper in cloud-agent-next - #5795

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/cloud-agent-next-withsandbox
Open

(janitor/dead-code): remove unused withSandbox helper in cloud-agent-next#5795
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/cloud-agent-next-withsandbox

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What was deleted

services/cloud-agent-next/src/helpers.ts — a single-file module exporting one function, withSandbox, that is never called.

Evidence it was unreachable

  • Repo-wide search for withSandbox matches only its own definition. The only lookalike, withSandboxOperationTimeoutLog (sandbox-timeout-logging.ts), is unrelated and remains in use.
  • The file is never imported — statically, dynamically, or via side-effect import. The sole ../helpers/... import in the service points to test/helpers/session-setup.ts, a different path.
  • src/index.ts (the Worker entry point) and no barrel re-export it.

Dynamic and configured entry points checked

  • wrangler.jsonc main is src/index.ts; no Durable Object, queue, cron, migration, RPC, or binding references helpers.ts or withSandbox.
  • No import(), require(), export * from, or string-based reference to the file.
  • No module-level side effects (imports + one async function only), so removal changes no initialization behavior.
  • Kilo-Org/kilocode (external API consumer) has no reference; cloud-agent-next is not consumed via import from any app.

Contract and compatibility considerations

withSandbox is not part of any published package, tRPC route, or Durable Object RPC surface. No persisted data or migration references it. No tests or scripts depend on it.

Validation performed

  • pnpm --filter cloud-agent-next typecheck (tsgo) — clean
  • pnpm --filter cloud-agent-next lint (oxlint) — 0 warnings, 0 errors
  • pnpm --filter cloud-agent-next test (vitest) — 3306 passed, 3 skipped

(Postgres/Redis could not be started in this environment; the affected Worker's unit suite, typecheck, and lint are unaffected and were run.)

…next

services/cloud-agent-next/src/helpers.ts is dead code. It exports a single
function, `withSandbox`, that has zero call sites anywhere in the repo.

Evidence of unreachability:
- Repo-wide search for the symbol `withSandbox` matches only its own
  definition; the only similar symbol, `withSandboxOperationTimeoutLog`
  (sandbox-timeout-logging.ts), is unrelated and still in use.
- The file is never imported, statically or dynamically, by any source,
  test, or script. The only `../helpers/...` import in the service resolves
  to `test/helpers/session-setup.ts`, a different path.
- `src/index.ts` (the Worker entry point) does not re-export it, and no
  barrel re-exports it.

Dynamic/configured entry points checked:
- wrangler.jsonc `main` is `src/index.ts`; no Durable Object, queue, cron,
  migration, or RPC config references helpers.ts or `withSandbox`.
- No `import()`, `require()`, `export * from`, or side-effect import points
  at the file.
- The file has no module-level side effects (only imports plus one async
  function declaration), so removal changes no initialization behavior.
- Kilo-Org/kilocode (the external API consumer) contains no reference to
  `withSandbox`; cloud-agent-next is not consumed by import from any app.

Contract/compatibility: `withSandbox` is not part of any published package,
tRPC route, or Durable Object RPC surface, and no persisted data or
migration references it.

Validation: cloud-agent-next typecheck (`tsgo --noEmit`), oxlint (0 warnings,
0 errors), and vitest unit suite (3306 passed / 3 skipped) all pass after
removal.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 1, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • services/cloud-agent-next/src/helpers.ts

Reviewed by grok-4.6 · Input: 52.2K · Output: 4.1K · Cached: 139.1K

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

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant