ReviewOS

stacks/ts-cloud

Implement `cost:breakdown` — N-day window with previous-window trend comparison

#109
Closed glennmichael123 opened this 2 months ago ·
2 months ago

Implementation issue split out from #107.

Replace the mock-data body in packages/ts-cloud/bin/commands/cost.ts (cost:breakdown command) with real implementation:

  • Honor the existing --days <n> option (default 30).
  • Query Cost Explorer for last N days and the N days before that to compute the trend column.
  • Group by service.

Acceptance

  • cloud cost:breakdown and cloud cost:breakdown --days 7 return real numbers.
  • --profile flag honored.
  • Cached via #106.
  • Trend column reflects real comparison, not hardcoded ^ +12%.
  • Replaces the cli.warn('not implemented') guard introduced by #107.
  • #107 — tactical guard
8 days ago

Roadmap relationship: tracked by #135 under master roadmap #132.

8 days ago

Implemented on main in b24dc74 and beb8162. cloud cost:breakdown now validates and honors --days (1–366), queries adjacent real Cost Explorer windows grouped by service, honors --profile and --no-cache, and renders per-service and total trends with explicit handling for new spend. Covered by aggregation, rolling-window, comparison, and cache tests; documented in docs/features/cost.md. Strict Pickier checks and the production declaration/UI build pass.

Sign in to comment on this issue.