feat: report quota balance, burn rate, and runway #30
Reference in New Issue
Block a user
Delete Branch "feat/quota-balance-and-burn-rate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
quota-balance-and-burn-rate
Report live account balance, burn rate, and projected runway from the provider-reported
allowance_remaining_usd, instead of the misleading "X% of plan" warning.Behavior
/metricsquotanow reportsbalance_usd,balance_at,burn_rate_usd_per_hour,projected_hours_remaining,runway_low_warning,runway_note,burn_window_hoursderived fromallowance_remaining_usd.Nonewith an operator-readablerunway_note— never a wild extrapolation right after a top-up.metered_kwh_period(new, billing-period sincebilling_reset_day) +metered_kwh_30d(honest rolling).metered_fraction_of_planuses the period figure when configured.reset_dateKEEPS its key in all three emitters (quota_burn,local_energy_summary,pinch_summary) and now carries the billing-period start; newwindow_start_30dcarries the rolling start. No field lies about its meaning.runway_low_warning); TUI data layer + legend (period since <reset_date>vswindow start <window_start_30d>).scoring_coveragewarning corrected: overage is billed against the credit balance;plan_kwh_per_periodgates nothing.quota_burn_window_hours(24),quota_runway_warning_hours(6),quota_burn_min_segment_samples(3),quota_burn_min_segment_hours(0.5).Scope fence honored
plan_kwh_per_periodgates nothing.cost_usd.metrics.pydoes not importdispatcher.max_energy_per_requestbehavior unchanged.Verification
main(fail-on-main evidence captured: 11 failed / 45 deselected;KeyError/assert on missing fields andreset_datesemantics) and PASS after.local_energy.enabledboth true and false: 1199 passed each way.config/config.local.yamlbyte-identical before/after (sha256cc3d4c2a…5549).