codeburn/scripts
ozymandiashh f7a66e51f5 feat(cli): compare-periods command with a deterministic B-minus-A diff engine
Add src/period-diff.ts: pure period-vs-period difference engine. Totals come
from the shared buildPeriodData rules; contributions per project and per model
carry status new/gone/up/down/flat with pct=null at A=0 (labeled New, never an
infinite percentage); normalized views per day and per 100 calls print their
denominators; day arithmetic walks local midnights so DST and month boundaries
count calendar days. historyBasis cross-checks the durable daily cache and
reports aggregate-only carried days separately instead of force-reconciling
them into the totals. diffSessions joins the drill-down on the canonical
session identity (provider + project path + sessionId), attributing the
model's own slice for the model lens.

New command: compare-periods --format json|sessions with explicit
--from-a/--to-a/--from-b/--to-b (local YYYY-MM-DD, validated loudly) defaulting
to the last seven complete days vs the seven before, plus --provider and the
existing --project/--exclude filtering. Range slicing reuses parseAllSessions'
call-granularity behavior, so a session straddling the boundary contributes to
each side by its own calls.

Tests: engine fixtures including the X/Y/Z acceptance reconciliation, A=0/B=0,
unequal lengths, DST and month walks, carried history, a real-parse boundary
session split by call and joined back into one drill-down row, and CLI runs on
a temp HOME fixture.
2026-09-12 13:43:24 -07:00
..
perf feat(cli): compare-periods command with a deterministic B-minus-A diff engine 2026-09-12 13:43:24 -07:00
release-acceptance test: add repeatable release acceptance ledger (#1164) 2026-08-28 15:02:07 -07:00
upgrade-path Merge remote-tracking branch 'origin/main' into wt1234 2026-09-02 07:06:47 -07:00
bundle-litellm.mjs fix(models): price gpt-5.6-codex and gpt-5.6-codex-max 2026-08-21 14:53:00 -07:00
sign-plugin.mjs fix(plugins): codepoint-ordered signature canonicalization; sign fails loudly on unreadable files 2026-08-28 05:52:36 -07:00
smoke-plugin-socket.mjs feat(plugins): ed25519 release-key verification and plugin add/remove (9b) 2026-08-28 00:30:43 -07:00