Added#
The comparison is computed once, and reaches the MCP. driversBetween
moves to @trazum/core — one implementation of the union-and-subtract whose
sign convention (positive means the bill grew) has flipped once already when
restated by hand — and the CLI, the web and now the MCP all import it. The
MCP's profile_usage gains previous_log: totals with the convention stated
first, drivers per label and per model with appeared and vanished workloads
named, label/since/until filtering both logs so the comparison stays one
workload and one period, and a previous log with nothing priced reported as
its own answer rather than zero growth. The web comparison gains the same
by-model split the CLI got, from the same shared code.
The window reaches the browser. Two date fields on the web Bill tab —
--since/--until under the CLI's exact rules: a bare date is that whole UTC
day, the same window applies to both logs of a comparison, clockless calls
are excluded and counted out loud, and the CLI's refusals are kept in step (a
window matching nothing names what the log covers instead of rendering a $0
report; a clockless log cannot be windowed; a window that starts after it
ends is an error). Verified in a real browser: $11.00 → $1.00 when windowed
to the cheap day, the refusal naming the span, clearing restoring the whole
log, zero network requests throughout.
The change by model — where the mix moved. A workload that keeps its name
and switches from Haiku to Opus reads as "chat grew" in the per-label drivers,
and the reason is the model. --against now splits the same change by model —
appeared and vanished models named, one model on both sides deliberately
silent because it would restate the totals line — and both driver sets ride
--json as against.byLabel / against.byModel, computed once beside the
gates so no rendering derives its own.
The drill-downs reach the GitHub Action. label, since and until
inputs on the spend gate — one workload's budget, or one period's, in a
workflow. The CLI owns the honesty rules, so a label or window matching
nothing fails the run naming what exists, and clockless calls under a window
are counted out loud in the report. Self-tested in CI with the same hand
arithmetic as the gates: a $5.00 workload passes a $9 budget the $15.00 log
would fail, one day passes it, the dear day fails it, and a window the log
does not cover is refused rather than passing a $0 gate.