codeburn/tests/providers
iamtoruk f77687a8b3 Merge origin/main, and act on vidoluco's real-Copilot findings
Merge resolution
- daily-cache: main shipped v20 with #1040, so 21 is now the first FREE number
  rather than one dodging an unmerged head. Both version notes kept, ours on
  top. The re-derivation seed stays one below current (20), now the shipped
  predecessor rather than a draft.
- upgrade-path: expected daily cache filename stays v21.

The rollup is cumulative across resume legs — already handled, now pinned
Measured on a real 3-leg session (CLI 1.0.80): every counter in a leg includes
the legs before it, and the last leg of a complete session equals its store-row
total to the nano. The parser has always emitted `cumulative - previous
cumulative` per model, so the interval arithmetic downstream already consumes
per-leg claims; it was the PR body and the provider doc that described the raw
journal as per-leg and misled the reader. Doc corrected, and (c3) pins it end
to end: a complete 3-leg session serves 900 (its last leg / store total), not
1,400 (the sum of its legs); an uncovered one serves 900 exactly once; and a
leg reporting LESS than its predecessor is taken as a fresh epoch rather than
clamped to a negative delta, so an older per-leg CLI never loses a leg.

initiator = 'compaction' replaces the timestamp heuristic where it exists
The summarization request does write its own assistant_usage_events row, and
newer stores label it. The label is now read — schema-adaptively, and the
enrichment select is a graduated chain so a store carrying the billing columns
but not `initiator` keeps its billing metadata instead of falling all the way
back to the base select. Two uses: the row is subtracted from the leg it
belongs to even though it commits before the compaction stamp, and it is kept
out of per-turn pairing since it has no assistant.message to pair with.
Optional twice over — absent on older stores, NULL on 1,504 of 2,509 rows on a
real one — so (c5) pins the labelled path at 350, the identical UNLABELLED
fixture at 400 (the documented one-request-per-compaction over-serve, which no
timestamp rule can close: the request that triggered the compaction completes
immediately before it too), and a compaction row never stealing a pairing
partner.

Attribution invariant, standing guard for the 1.8x report
(c4) runs `codeburn audit`'s own two numbers — attributed vs recomputed —
over all four combinations of the three representations a session can be
written in, at the magnitudes of a real reported day (gpt-5.6-terra, 146 rows,
input 17,792 / cache write 501,395 / cache read 12,097,364 / output 63,344 /
reasoning 24,831, billed $4.47). Every shape reconciles at 1.000, and the
covered case lands on $4.4687 = what the tokens price at = what GitHub billed,
with output 63,344 rather than the pre-fix 88,175 that re-priced reasoning on
top of itself.

upgrade-path: a day KEY is not the unit of never-lose
A parse change that re-dates a call to its true day legitimately empties one
day and fills its neighbour, token for token — observed on a real cache where
2026-08-08's single call moved to 08-07 exactly. The aging step now compares a
+/-1 day WINDOW rather than the day alone, so only a window that shrinks is a
loss, and an emptied day key is reported rather than failed.

RECONCILE_SETTLE_MS keeps 24h, with the measurement that argues against it
recorded at the constant and in the provider doc: across 91 real sessions zero
rows landed after shutdown (median -0.1s, max -0.0s). One machine, one CLI
version — the number to beat is seconds, not hours, once a second machine
agrees.
2026-08-21 02:14:14 -07:00
..
antigravity.test.ts fix(usage): per-provider snapshot capture, placeholder guard, path-id display fallback 2026-07-18 03:37:42 -07:00
claude-config-dirs.test.ts fix(desktop): close cache and lifecycle review gaps 2026-08-12 20:31:17 +03:00
cline-cli.test.ts fix(cline-cli): decline the rollup when per-message calls were all deduped 2026-08-04 01:57:27 +02:00
cline.test.ts fix(cline): scan all VS Code variants for task storage 2026-08-04 00:01:57 +03:00
codebuff.test.ts Merge origin/main into feat/codebuff-provider and scope sessionId by channel 2026-05-01 00:14:18 +05:30
codewhale.test.ts perf(cache): shard the session cache per provider 2026-08-16 19:03:12 -07:00
codex-resume.test.ts test(codex): give the every-boundary differential an explicit timeout 2026-08-17 01:48:04 -07:00
codex.test.ts Fix Codex model attribution after session metadata 2026-08-19 14:49:04 +02:00
copilot-skills.test.ts copilot: extract skill invocations so Skills & Agents populates (#654) (#697) 2026-07-16 12:02:34 -07:00
copilot.test.ts fix(sync,parser): review B — symmetric shape freeze, honest settle, stable residual keys 2026-08-19 13:25:15 -07:00
crush.test.ts fix: fix and improve test isolation and collision with environment (#530) 2026-06-20 13:42:10 +02:00
cursor-agent.test.ts Extract shared token estimation helper, migrate all CHARS_PER_TOKEN sites (#644) (#677) 2026-07-16 11:58:22 -07:00
cursor-bubble-dedup.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
cursor-large-db-cap.test.ts fix: fix and improve test isolation and collision with environment (#530) 2026-06-20 13:42:10 +02:00
cursor-real-tokens.test.ts fix(cursor): use Cursor's real context tokens for input (#574) (#575) 2026-07-02 04:53:07 +02:00
cursor-workspace-breakdown.test.ts Cursor: per-project breakdown by workspace (closes per-project half of #196) (#296) 2026-05-10 15:35:57 -07:00
cursor.test.ts perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
devin.test.ts fix(devin): report friendly GPT model names with effort tier (#585) 2026-07-01 16:01:49 +02:00
droid.test.ts Add Droid CLI provider 2026-04-28 20:16:45 +02:00
dsh.test.ts fix(dsh): cap zstd decode, coerce usage fields, scope the snap read 2026-08-17 17:28:41 -07:00
forge.test.ts feat(providers): add forge provider support (#401) 2026-05-26 03:36:57 -07:00
gemini.test.ts Track agent calls across providers (#340) 2026-05-18 05:51:01 -07:00
grok.test.ts models: distinguish grok-4.5-build from grok-4.5 in reports 2026-08-18 12:01:12 -07:00
hermes.test.ts fix(hermes): require origin identity and fail-closed fences 2026-08-19 20:50:19 +05:30
ibm-bob.test.ts Add IBM Bob provider with workspace extraction (#316) 2026-05-11 20:54:13 -07:00
kilo-code.test.ts fix(test): kilo-code tests fail on machines with KiloCode installed 2026-06-03 01:03:39 +02:00
kimi.test.ts Add Kimi provider 2026-05-11 19:02:28 +03:00
kimicode.test.ts kimicode: discover desktop-runtime sessions and fix menubar visibility 2026-07-23 21:31:25 +02:00
kiro.test.ts fix(kiro): estimate input tokens from the full prompt, not a 500-char slice 2026-08-04 05:58:17 +03:00
lingtai-tui.test.ts fix(lingtai): harden manifest parsing against wrong-typed fields 2026-07-09 23:48:46 +02:00
mistral-vibe.test.ts fix: fix and improve test isolation and collision with environment (#530) 2026-06-20 13:42:10 +02:00
mux.test.ts feat(providers): add coder/mux as a datasource (#438) 2026-06-06 03:04:24 +02:00
omp.test.ts fix(omp): discover title-first session transcripts 2026-07-27 19:58:50 +02:00
open-design.test.ts feat(providers): add open-design provider for per-model usage tracking (#559) 2026-06-28 19:17:23 +02:00
openclaude.test.ts feat(openclaude): OpenClaude CLI provider (#213) 2026-08-04 04:05:25 +03:00
openclaw.test.ts Add OpenClaw, Roo Code, and KiloCode providers (#175) 2026-04-28 09:24:14 -07:00
opencode-file.test.ts fix(opencode): support custom data dir and db prefix (#620) 2026-07-16 02:18:19 -07:00
opencode.test.ts fix(opencode): read session fallback model from real schema 2026-07-24 13:03:22 +08:00
pi.test.ts Merge branch 'main' into fix/omp-title-slot-discovery 2026-08-03 21:59:19 +02:00
quickdesk.test.ts feat(quickdesk): Amazon Quick Desktop provider, parse ~/.quickwork sessions and metrics (#707) 2026-07-18 00:02:01 +03:00
roo-code.test.ts Add OpenClaw, Roo Code, and KiloCode providers (#175) 2026-04-28 09:24:14 -07:00
vercel-gateway.test.ts prerelease: quota NaN guard, 10-year daily retention, test date bomb (#764) 2026-07-20 07:37:56 -07:00
vscode-cline-parser.test.ts fix(providers): guard two malformed-input crashes in the parse path 2026-08-04 06:28:41 +03:00
warp.test.ts feat: add Warp provider adapter (#350) 2026-05-21 00:19:53 -07:00
zcode.test.ts feat(providers): add ZCode (z.ai GLM-5.2) usage provider (#537) 2026-06-20 21:37:32 +02:00
zed.test.ts fix(zed): top threads up to the cumulative counter 2026-07-02 05:53:40 +02:00
zerostack.test.ts Add zerostack provider (#519) 2026-06-19 14:44:45 +02:00