(janitor/dead-code): remove unused withSandbox helper in cloud-agent-next - #5795
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dead-code): remove unused withSandbox helper in cloud-agent-next#5795kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
…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>
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by grok-4.6 · Input: 52.2K · Output: 4.1K · Cached: 139.1K Review guidance: REVIEW.md from base branch |
pandemicsyn
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
withSandboxmatches only its own definition. The only lookalike,withSandboxOperationTimeoutLog(sandbox-timeout-logging.ts), is unrelated and remains in use.../helpers/...import in the service points totest/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.jsoncmainissrc/index.ts; no Durable Object, queue, cron, migration, RPC, or binding referenceshelpers.tsorwithSandbox.import(),require(),export * from, or string-based reference to the file.Kilo-Org/kilocode(external API consumer) has no reference;cloud-agent-nextis not consumed via import from any app.Contract and compatibility considerations
withSandboxis 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) — cleanpnpm --filter cloud-agent-next lint(oxlint) — 0 warnings, 0 errorspnpm --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.)