Skip to content

(janitor/dead-code): remove unused wasteland-client util in gastown - #5871

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/gastown-wasteland-client
Open

(janitor/dead-code): remove unused wasteland-client util in gastown#5871
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/gastown-wasteland-client

Conversation

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Summary

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 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 and WastelandClientError class.

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 client.
  • No barrel (src/index.ts or src/util/index.ts) exists or re-exports it; no export ... from, dynamic import(), or require() points 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 and configured entry points checked

  • Wrangler config only defines the WASTELAND_SERVICE binding ("service": "wasteland" + entrypoint), which is consumed by the RPC stub in the handler and Town.do.ts. This file is not a binding, Durable Object, queue, cron, alarm, RPC, workflow, or Wrangler-configuration target.
  • The module lives in a private, internal service package (cloudflare-gastown is "private": true); it is not exposed through package exports or any published contract.
  • Kilo-Org/kilocode (the external API consumer) contains no reference to wasteland-client or createWastelandClient.

Contract and compatibility considerations

  • 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 integration path. No persisted data, migration, or rollback concern.

Validation performed

  • 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.

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.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 4, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 4, 2026 07:45
@kilo-code-bot

kilo-code-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • services/gastown/src/util/wasteland-client.util.ts

Reviewed by grok-4.6 · Input: 35.8K · Output: 3.4K · Cached: 155.6K

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.

0 participants