Skip to content

gut: remove session cost analytics (MBP audit) #2307

@alexey-pelykh

Description

@alexey-pelykh

Context

`src/infra/session-cost-usage.*` (1,586 lines) reads JSONL session transcripts post-hoc to compute cost summaries, model usage stats, and latency metrics. This is analytics/billing UX that reads local artifacts — it doesn't route through sessions, channels, or gateway. It's a platform feature for the consumer dashboard.

Found during MBP deep dive audit of `src/infra/`.

Scope

Delete session-cost-usage files (3 files, 1,586 lines):

  • `session-cost-usage.ts` (999 lines)
  • `session-cost-usage.types.ts` (158 lines)
  • `session-cost-usage.test.ts` (429 lines)

Clean up callers:

  • `/usage` command in auto-reply — remove cost summary section or stub
  • Status commands that display session cost — remove the section

Acceptance Criteria

  • `grep -r "session-cost-usage" src/` returns nothing
  • Build passes
  • Tests pass

Size

~1,586 lines removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gutRemoving dead upstream subsystems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions