(janitor/dead-code): remove unused getProfileByName and getProfileIdByName - #5930
Merged
kilo-code-bot[bot] merged 1 commit intoSep 7, 2026
Merged
Conversation
…Name Both functions are exported from @kilocode/cloud-agent-profile but have no consumers anywhere in the monorepo. Their doc comment claimed use in the prepare session API, but that code now resolves profiles via getEffectiveDefaultProfileId / getDefaultProfile instead.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryDead-code removal of unused Files Reviewed (2 files)
Reviewed by grok-4.6 · Input: 54.8K · Output: 3.8K · Cached: 181.4K Review guidance: REVIEW.md from base branch |
eshurakov
approved these changes
Sep 7, 2026
kilo-code-bot
Bot
deleted the
janitor/dead-code/cloud-agent-profile-by-name
branch
September 7, 2026 13:31
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
Two exported functions from the private
@kilocode/cloud-agent-profilepackage, plus their re-exports from the package barrel:getProfileByName(packages/cloud-agent-profile/src/profile-service.ts)getProfileIdByName(packages/cloud-agent-profile/src/profile-service.ts)Both are removed from
src/index.ts. Net change is 42 deletions, no production behavior change.Evidence they were unreachable
getProfileByNameandgetProfileIdByName(all file types, excludingnode_modules/.git) returns only the two definitions and the two barrel re-export lines. No call sites exist inapps/web,apps/mobile,apps/extension,services/*,packages/*,scripts/*,dev/*, ortools/*.@kilocode/kilocoderepo (the primary external consumer) was cloned and searched: zero occurrences of either symbol.services/cloud-agent-next/src/router/handlers/session-prepare.tsdoes not import them; it resolves profiles throughgetEffectiveDefaultProfileId/getDefaultProfile/mergeProfileConfigurationinstead. The comment was stale.Dynamic and configured entry points checked
import(),require(), or string-based lookup references either symbol anywhere.@kilocode/cloud-agent-profileis a Postgres query helper package. Neither symbol appears in anywrangler.toml/wrangler.jsonc, binding list, or service config.export * from '@kilocode/cloud-agent-profile'exists; the only namespace importers (apps/web/src/routers/agent-profiles-router.tsviaimport * as profileService) access members by name, and neither name is referenced there.Contract and compatibility considerations
"private": trueand is not published to npm, so these exports are not part of any published SDK/CLI/plugin surface.profile-service.ts) retains many other used exports, so nothing else is orphaned (getProfile,ProfileResponse,ProfileOwner, and all imports remain used by other functions in the file).Validation performed
pnpm --filter @kilocode/cloud-agent-profile typecheck— passedpnpm --filter @kilocode/cloud-agent-profile test— 3 files, 36 tests passedpnpm --filter @kilocode/cloud-agent-profile lint— 0 warnings, 0 errorspnpm --filter @kilocode/trpc typecheck— passed (direct dependent)pnpm --filter cloud-agent-next typecheck— passed (documented consumer + wrapper)git diff --check— clean; files formatted withoxfmt