(janitor/dead-code): remove unused wl-sdk ops/dolthub barrel files - #5831
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dead-code): remove unused wl-sdk ops/dolthub barrel files#5831kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
packages/wl-sdk/src/dolthub/index.ts and packages/wl-sdk/src/ops/index.ts are dead code. They are barrel re-export files that nothing imports; the package's public surface (src/index.ts) re-exports every symbol directly from the individual modules instead. Evidence of unreachability: - src/index.ts (resolved by package.json "exports"["."]) re-exports each symbol from its own module (./dolthub/api, ./ops/join, ...) and never imports ./dolthub or ./ops (the barrels). - package.json "exports" only maps ".", "./client", and "./types", so the ops/ and dolthub/ directories are not importable subpaths. - Repo-wide searches for "ops/index", "dolthub/index", "wl-sdk/ops", "wl-sdk/dolthub", "wl-sdk/src/ops", "wl-sdk/src/dolthub", and directory imports from "./ops"/"./dolthub" return zero matches outside the barrels themselves. - The only consumers of @kilocode/wl-sdk (services/wasteland/*) all import from the root specifier "@kilocode/wl-sdk", which resolves to src/index.ts. Dynamic/configured entry points checked: - The package is private (not published) and version 0.0.0; main/types/ exports all resolve to src/index.ts (plus client.ts/types.ts), not these barrels. - No Cloudflare binding, Durable Object, queue, cron, alarm, RPC, workflow, or wrangler config references either file (wl-sdk is a pure-TypeScript SDK with no Worker configuration of its own). - No import(), require(), export * from, or side-effect import points at either file; they contain no module-level side effects (pure re-exports). - No .plans/.specs/docs/scripts/CI/dev-tooling reference the barrels; the README "Layout" lists the directories' modules, not these index files. - Kilo-Org/kilocode (the external API consumer) contains no reference to "wl-sdk", "WlClient", or "dolthub". Contract/compatibility: - Both barrels only re-export symbols already re-exported by src/index.ts, so removal deletes no public surface and orphans no other module. - ops/index.ts is already stale: it omits edit, state, accept-upstream, mutate, and several type aliases present in the root src/index.ts, consistent with it being abandoned in favor of the root barrel. - No persisted data, migration, or rollback concern: pure re-export files. Validation: - @kilocode/wl-sdk typecheck (tsgo --noEmit) passes before and after. - @kilocode/wl-sdk oxlint: 0 warnings, 0 errors (60 files after removal, down from 62). - @kilocode/wl-sdk vitest: 27 test files, 201 tests pass after removal. - cloudflare-wasteland (the sole consumer) typecheck passes 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 (2 files)
Reviewed by grok-4.6 · Input: 112.7K · Output: 4.4K · Cached: 101.5K Review guidance: REVIEW.md from base branch |
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
packages/wl-sdk/src/dolthub/index.ts(55 lines)packages/wl-sdk/src/ops/index.ts(64 lines)Two dead barrel re-export files in the private
@kilocode/wl-sdkpackage.No other files changed.
Evidence it was unreachable
src/index.ts(the package's public surface, resolved viapackage.jsonexports["."]) re-exports every symbol directly from the individualmodules (
./dolthub/api,./ops/join, ...) and never imports./dolthubor
./ops— the barrels are bypassed.package.jsonexportsonly maps".","./client", and"./types";the
ops/anddolthub/directories are not importable subpaths.ops/index,dolthub/index,wl-sdk/ops,wl-sdk/dolthub,wl-sdk/src/ops,wl-sdk/src/dolthub, and directoryimports
from './ops'/from './dolthub'return zero matches outsidethe barrels' own lines.
@kilocode/wl-sdk(services/wasteland/*) allimport from the root specifier
@kilocode/wl-sdk, which resolves tosrc/index.ts, never to either barrel.git logshows both barrels were added in the same commit (feat(wasteland): admin review inbox, drawer graph navigation, rigs page filters #2706) as theroot
src/index.ts, which took the direct re-export approach from thestart — the barrels were superseded immediately and never referenced.
Dynamic and configured entry points checked
private: true,version 0.0.0(not published);main/types/exportsall resolve tosrc/index.ts(plusclient.ts/types.ts), not these barrels.or wrangler configuration references either file —
wl-sdkis apure-TypeScript SDK with no Worker configuration of its own.
import(),require(),export * from, or side-effect import pointsat either file; both are pure re-export files with no module-level side
effects, so removal changes no initialization behavior.
.plans/.specs/docs/scripts/CI/dev-tooling reference the barrels;the README "Layout" lists the directories' modules, not these index files.
Kilo-Org/kilocode(the external API consumer) containsno reference to
wl-sdk,WlClient, ordolthub.Contract and compatibility considerations
src/index.ts, so deletion removes no public surface and orphans noother module.
ops/index.tsis already stale — it omitsedit,state,accept-upstream,mutate, and several type aliases that the rootsrc/index.tsexports — consistent with it being abandoned in favor ofthe root barrel.
Validation performed
@kilocode/wl-sdktypecheck (tsgo --noEmit): passes before and after.@kilocode/wl-sdkoxlint: 0 warnings, 0 errors (60 files after removal,down from 62 — exactly the two deleted files).
@kilocode/wl-sdkvitest: 27 test files / 201 tests pass after removal.cloudflare-wasteland(sole consumer) typecheck: passes after removal.git diff --checkclean; diff is a two-file, 119-line pure deletion.