(janitor/dead-code): remove unused wasteland-client util in gastown - #5871
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dead-code): remove unused wasteland-client util in gastown#5871kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
services/gastown/src/util/wasteland-client.util.ts is dead code. It defines createWastelandClient and its helper schemas/types, but no module imports it; gastown's actual wasteland integration talks to the Wasteland service via the Cloudflare RPC service binding (WASTELAND_SERVICE) directly. Evidence of unreachability: - Repo-wide searches for "wasteland-client", "createWastelandClient", "WastelandClient", "WastelandClientError", and the exported schema names (WantedItemOutput, WastelandOutput, WastelandMemberOutput, ConnectedTownOutput) return zero matches outside the file itself. - The gastown worker entry (src/gastown.worker.ts) and the modules that actually call wasteland (src/handlers/wasteland-tools.handler.ts, src/dos/Town.do.ts, src/dos/town/wasteland-bead-origin.ts) all use the env.WASTELAND_SERVICE RPC stub (e.g. c.env.WASTELAND_SERVICE.browseWantedBoard), not this HTTP/tRPC client. - No barrel (src/index.ts or src/util/index.ts) exists or re-exports it; there is no export-from or dynamic import()/require() pointing at it. - No test, .plans, .specs, docs, scripts, or CI reference it. The file has no module-level side effects (pure schema/function/class declarations). Dynamic/configured entry points checked: - Wrangler config only defines the WASTELAND_SERVICE binding (its "service": "wasteland" + entrypoint), which is consumed by the RPC stub in the handler and Town.do.ts; this file is not a binding/DO/queue/cron/alarm/RPC/workflow target. - The file is a private, internal service module (package "cloudflare-gastown" is private); it is not exposed via package exports or a published contract. - Kilo-Org/kilocode (the external API consumer) contains no reference to "wasteland-client" or "createWastelandClient". Contract/compatibility: - Removal deletes no public surface and orphans no other module; the deleted file's only import is zod (external), so no internal module becomes unreachable. - The RPC-binding integration path is unaffected and remains the live path. Validation: - cloudflare-gastown typecheck (tsgo --noEmit) passes before and after. - cloudflare-gastown oxlint: 0 warnings, 0 errors before and after (112 files after removal, down from 113). - cloudflare-gastown vitest: 22 test files, 335 tests pass after removal.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by grok-4.6 · Input: 35.8K · Output: 3.4K · Cached: 155.6K 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.
Summary
services/gastown/src/util/wasteland-client.util.tsis dead code. It definescreateWastelandClientand its helper schemas/types, but no module imports it. Gastown's actual Wasteland integration talks to the Wasteland service through the Cloudflare RPC service binding (WASTELAND_SERVICE) directly.What was deleted
services/gastown/src/util/wasteland-client.util.ts(297 lines) — an unused HTTP/tRPC client plus its Zod schemas andWastelandClientErrorclass.Evidence of unreachability
wasteland-client,createWastelandClient,WastelandClient,WastelandClientError, and the exported schema names (WantedItemOutput,WastelandOutput,WastelandMemberOutput,ConnectedTownOutput) return zero matches outside the file itself.src/gastown.worker.ts) and the modules that actually call Wasteland (src/handlers/wasteland-tools.handler.ts,src/dos/Town.do.ts,src/dos/town/wasteland-bead-origin.ts) all use theenv.WASTELAND_SERVICERPC stub (e.g.c.env.WASTELAND_SERVICE.browseWantedBoard(...)), not this client.src/index.tsorsrc/util/index.ts) exists or re-exports it; noexport ... from, dynamicimport(), orrequire()points at it..plans,.specs, docs, scripts, or CI reference it. The file has no module-level side effects (pure schema/function/class declarations).Dynamic and configured entry points checked
WASTELAND_SERVICEbinding ("service": "wasteland"+entrypoint), which is consumed by the RPC stub in the handler andTown.do.ts. This file is not a binding, Durable Object, queue, cron, alarm, RPC, workflow, or Wrangler-configuration target.cloudflare-gastownis"private": true); it is not exposed through package exports or any published contract.wasteland-clientorcreateWastelandClient.Contract and compatibility considerations
zod(external), so no internal module becomes unreachable.Validation performed
cloudflare-gastowntypecheck (tsgo --noEmit) passes before and after.cloudflare-gastownoxlint: 0 warnings, 0 errors before and after (112 files after removal, down from 113).cloudflare-gastownvitest: 22 test files, 335 tests pass after removal.