Skip to content

refactor(utils): remove dead utility functions from metrics, trigger utils, and media#923

Merged
aaight merged 1 commit intodevfrom
feature/remove-dead-utility-functions
Mar 16, 2026
Merged

refactor(utils): remove dead utility functions from metrics, trigger utils, and media#923
aaight merged 1 commit intodevfrom
feature/remove-dead-utility-functions

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 16, 2026

Summary

Removes dead code identified in Story 3 — unused utility functions that have zero production callers and were misleading future contributors.

  • LLM metrics (src/utils/llmMetrics.ts): Removed estimateInputTokens, logLLMMetrics, logLLMCallStart, LLMCallMetrics interface, and SimpleLogger interface. Kept calculateCost and MODEL_PRICING (actively used).
  • Trigger utils (src/triggers/github/utils.ts): Removed extractTrelloCardUrl, hasTrelloCardUrl, requireTrelloCardId, and requireWorkItemId. Kept extractTrelloCardId, extractJiraIssueKey, extractWorkItemId, evaluateAuthorMode, and resolveWorkItemId (all actively used).
  • Media utils (src/pm/media.ts): Removed mediaToBase64DataUri (zero production callers).
  • Test files updated: Removed test blocks for all deleted functions in llmMetrics.test.ts, github-utils.test.ts, and media.test.ts.

Test plan

  • npm run lint:fix — no issues
  • npm run typecheck — zero errors
  • npm test — all 293 test files, 5422 tests passing
  • grep confirms zero remaining references to removed function names in src/

Closes: https://trello.com/c/MuA2T4at/436-as-a-developer-i-want-unused-utility-functions-removed-from-metrics-trigger-utils-and-media-modules-so-that-dead-code-does-not-m

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — Clean dead code removal. All deleted functions (, , , , , , , , , ) have zero remaining references in both src/ and tests/. Corresponding test blocks were properly removed and imports cleaned up. CI is green across all checks.

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit f59973a into dev Mar 16, 2026
6 checks passed
Sign up for free to 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.

2 participants