Skip to content

feat: adaptive backend scoring and cost budget alerts (v1.7.0)#239

Merged
fatihkan merged 1 commit intomainfrom
dev
Mar 6, 2026
Merged

feat: adaptive backend scoring and cost budget alerts (v1.7.0)#239
fatihkan merged 1 commit intomainfrom
dev

Conversation

@fatihkan
Copy link
Owner

@fatihkan fatihkan commented Mar 6, 2026

Summary

  • Adaptive backend scoring: Replaces round-robin with score-weighted random selection based on cost efficiency, speed, reliability, and quality metrics (30-day window, 5-min refresh)
  • Cost budget alerts: Configurable spending limits (global/per-project, daily/weekly/monthly) with warn/critical thresholds, notification alerts, and auto-pause when exceeded
  • Full-stack implementation: Swift v22 + Rust v23 migrations, 3 new models, 2 new actor services, 6 Tauri commands, 3 React components, i18n (en + tr)
  • Includes prior v1.6.1 fixes: 28 bug fixes, crash fix, README updates

Changes

  • DB: backendScore, costBudget, budgetAlert tables (Swift v22 / Rust v23)
  • Swift: BackendScoringService actor (composite scoring algorithm), BudgetMonitorService actor (threshold detection + pause signaling), weighted selection in BackendRouter, budget-aware dispatch in Orchestrator, Efficiency + Budgets tabs in CostDashboardView, score badges in SettingsView
  • Rust: Model structs with CRUD, 6 new Tauri commands, NotificationCategory::Budget
  • React: BackendScoreBadge, CostEfficiencyTab, CostBudgetTab components, updated CostDashboard + BackendSettings
  • Store: Extended costStore with scores, budgets, utilizations state + actions
  • i18n: costs.efficiency.* and costs.budget.* keys in en.json + tr.json

Test plan

  • cd CreedFlow && swift build — 0 errors
  • cd creedflow-desktop/src-tauri && cargo build — 0 errors
  • cd creedflow-desktop && npx tsc --noEmit — 0 errors
  • Create 10+ tasks with mixed backends → scoring service computes scores after 5 min
  • Set $1 daily budget → orchestrator defers tasks when exceeded, notification sent
  • Backend settings shows score badges next to each backend
  • Cost dashboard Efficiency tab shows score cards with 4 dimension bars
  • Cost dashboard Budget tab shows utilization bars, CRUD form, alert list

🤖 Generated with Claude Code

…ion)

Add score-weighted backend selection replacing pure round-robin, with
periodic scoring based on cost efficiency, speed, reliability, and quality
metrics. Add configurable spending budgets (global/per-project, daily/weekly/
monthly) with warn/critical threshold alerts and auto-pause when exceeded.

Swift: v22 migration, 3 models (BackendScore, CostBudget, BudgetAlert),
BackendScoringService actor (5-min polling), BudgetMonitorService actor
(60s polling), weighted selection in BackendRouter, budget-aware dispatch
in Orchestrator, Efficiency + Budgets tabs in CostDashboardView, score
badges in SettingsView.

Rust/React: v23 migration, model structs with CRUD, 6 Tauri commands,
TypeScript types + invoke wrappers, Zustand store, BackendScoreBadge +
CostEfficiencyTab + CostBudgetTab components, i18n (en + tr).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fatihkan fatihkan merged commit 4189888 into main Mar 6, 2026
2 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.

1 participant