Skip to content

Feat/savings command#91

Merged
TannerTorrey3 merged 3 commits intomainfrom
feat/savings-command
Mar 29, 2026
Merged

Feat/savings command#91
TannerTorrey3 merged 3 commits intomainfrom
feat/savings-command

Conversation

@TannerTorrey3
Copy link
Copy Markdown
Contributor

@TannerTorrey3 TannerTorrey3 commented Mar 29, 2026

Summary

What does this PR change?

Type

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Test
  • CI

Changes

Validation

How did you test this?

Checklist

  • Tests pass
  • Smoke tests pass
  • No raw errors introduced
  • CLI output follows Ix format

TannerTorrey3 and others added 3 commits March 28, 2026 16:26
Backend:
- SavingsAccumulator: in-memory session + ArangoDB lifetime persistence
- NaiveCostEstimator: hybrid graph-derived + multiplier estimation
- SavingsMiddleware: transparent http4s middleware, no existing route changes
- SavingsRoutes: GET/DELETE /v1/savings endpoints
- New "savings" ArangoDB collection

CLI:
- ix savings: shows session + lifetime token/money/water savings
- ix savings --detail: per-command-type breakdown
- ix savings --model <model>: configurable pricing (opus default)
- ix savings reset: clear lifetime totals
- Supports --format json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Some AQL UPSERTs fail silently under concurrent load (fire-and-forget
middleware). Floor lifetime to session values when returning the
response so all-time is never less than this session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TannerTorrey3 TannerTorrey3 merged commit a48d2e2 into main Mar 29, 2026
9 checks passed
@TannerTorrey3 TannerTorrey3 deleted the feat/savings-command branch April 3, 2026 01:29
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.

1 participant