Skip to content

Remove dead code: unused exports - #190

Merged
platypii merged 1 commit into
masterfrom
cleanup/dead-code
Jun 29, 2026
Merged

Remove dead code: unused exports#190
platypii merged 1 commit into
masterfrom
cleanup/dead-code

Conversation

@platypii

Copy link
Copy Markdown
Contributor

What

Removes seven exported functions that have zero references anywhere in the repository (verified across .js, .json, .ts, .md, excluding node_modules and llp/), along with imports and a comment orphaned by the deletions.

SymbolLocationWhy dead
pluginInstallRootsrc/core/plugin_install/paths.jsNo callers; pluginInstallDir covers real use
statusLogDirsrc/core/daemon/status.jsNo callers
platformIsSupported re-exportsrc/core/daemon/status.jsExisted only "for symmetry" with statusLogDir; nobody imports it from here
stopServiceDaemonsrc/core/daemon/install.jsNo callers (start/restart/status are used, stop never was)
isAttachedcodex plugin settings.jsNo callers
clearAiGatewayRuntimeai-gateway runtime.jsTeardown stub never wired into lifecycle
clearGraphRuntimecontext-graph runtime.jsTeardown stub never wired into lifecycle
clearGascityRuntimegascity runtime.jsTeardown stub; the comment claiming tests use it was stale

Also removed now-orphaned imports (defaultLogDir, platformIsSupported in status.js; isManagedAttached in codex settings.js) and fixed the stale gascity comment.

Checks

  • npm test — 1485 pass, 0 fail
  • npm run lint — clean
  • npm run typecheck — clean

First of three planned cleanup PRs (dead code, then em dashes, then type-import specifiers).

…lugins
Delete seven exported functions with zero references anywhere in the repo
(verified across .js, .json, .ts, .md), plus the now-orphaned imports and a
stale comment that referenced one of them:
- pluginInstallRoot (src/core/plugin_install/paths.js)
- statusLogDir and the platformIsSupported re-export (src/core/daemon/status.js)
- stopServiceDaemon (src/core/daemon/install.js)
- isAttached (codex plugin settings.js) + orphaned isManagedAttached import
- clearAiGatewayRuntime, clearGraphRuntime, clearGascityRuntime (plugin runtimes)
The three clearXxxRuntime functions were leftover teardown stubs never wired
into activation/deactivation. statusLogDir and the platformIsSupported
re-export existed only "for symmetry" and had no callers.
Tests, lint, and typecheck all pass.
@platypii

Copy link
Copy Markdown
ContributorAuthor

Code review (high effort) — clean

Ran a recall-biased review focused on the angles that matter for a deletion-only diff: removed-behavior, cross-file references, and orphaned imports.

Result: no findings. Verified grep-backed:

  • All 7 deleted symbols (pluginInstallRoot, statusLogDir, platformIsSupported re-export, stopServiceDaemon, isAttached, clearAiGatewayRuntime, clearGraphRuntime, clearGascityRuntime) have zero remaining references anywhere in the repo (incl. dynamic imports, manifests, registries, tests).
  • install.js: every remaining import (platformIsSupported, DaemonInstallError, getLogger, withSpan, Attr, defaultLabelFor, macos, linux) is still used by other functions after removing stopServiceDaemon — no orphans.
  • status.js: defaultLogDir and platformIsSupported appear nowhere else in the file.
  • codex settings.js: isManagedAttached is unused there (still defined/used in toml-config.js).

Checks: npm test (1485 pass), npm run lint, npm run typecheck all green. Merging.

@platypii
platypii merged commit b51c648 into masterJun 29, 2026
6 checks passed
@platypii
platypii deleted the cleanup/dead-code branch June 29, 2026 08:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@platypii