mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 10:43:47 +00:00
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. |
||
|---|---|---|
| .. | ||
| antigravity.md | ||
| claude.md | ||
| cline-cli.md | ||
| cline.md | ||
| codewhale.md | ||
| codex.md | ||
| copilot.md | ||
| crush.md | ||
| cursor-agent.md | ||
| cursor.md | ||
| devin.md | ||
| droid.md | ||
| dsh.md | ||
| forge.md | ||
| gemini.md | ||
| goose.md | ||
| grok.md | ||
| hermes.md | ||
| ibm-bob.md | ||
| kilo-code.md | ||
| kimi.md | ||
| kimicode.md | ||
| kiro.md | ||
| lingtai-tui.md | ||
| mistral-vibe.md | ||
| mux.md | ||
| NEW_PROVIDER.md | ||
| omp.md | ||
| openclaude.md | ||
| openclaw.md | ||
| opencode.md | ||
| pi.md | ||
| quickdesk.md | ||
| qwen.md | ||
| README.md | ||
| roo-code.md | ||
| vercel-gateway.md | ||
| vscode-cline-parser.md | ||
| warp.md | ||
| zcode.md | ||
| zed.md | ||
| zerostack.md | ||
Provider Docs
One file per provider integration. If you are fixing a bug or adding a feature scoped to a single provider, read the file for that provider first; it tells you which file to edit, where on disk the source data lives, and what edge cases the test suite already covers.
For the architectural picture, see ../architecture.md.
Provider Index
Eager (always loaded)
| Provider | Storage | Source | Test |
|---|---|---|---|
| Claude | JSONL (no parser) | src/providers/claude.ts |
none (covered indirectly) |
| Cline | JSON | src/providers/cline.ts |
tests/providers/cline.test.ts |
| Cline CLI | JSON | src/providers/cline-cli.ts |
tests/providers/cline-cli.test.ts |
| CodeWhale | JSON | src/providers/codewhale.ts |
tests/providers/codewhale.test.ts |
| Codex | JSONL | src/providers/codex.ts |
tests/providers/codex.test.ts |
| Copilot | JSONL + SQLite (OTel) + Nitrite .db (JetBrains) | src/providers/copilot.ts |
tests/providers/copilot.test.ts |
| Devin | JSON + SQLite enrichment | src/providers/devin.ts |
tests/providers/devin.test.ts |
| Droid | JSONL | src/providers/droid.ts |
tests/providers/droid.test.ts |
| DeepSeek Harness | JSONL (zstd frames) | src/providers/dsh.ts |
tests/providers/dsh.test.ts |
| Gemini | JSON / JSONL | src/providers/gemini.ts |
none |
| Hermes Agent | SQLite | src/providers/hermes.ts |
tests/providers/hermes.test.ts |
| IBM Bob | JSON | src/providers/ibm-bob.ts |
tests/providers/ibm-bob.test.ts |
| KiloCode | JSON | src/providers/kilo-code.ts |
tests/providers/kilo-code.test.ts |
| Kiro | JSON | src/providers/kiro.ts |
tests/providers/kiro.test.ts |
| Kimi | JSONL | src/providers/kimi.ts |
tests/providers/kimi.test.ts |
| Kimi Code | JSONL | src/providers/kimicode.ts |
tests/providers/kimicode.test.ts |
| LingTai TUI | JSONL | src/providers/lingtai-tui.ts |
tests/providers/lingtai-tui.test.ts |
| Mistral Vibe | JSON / JSONL | src/providers/mistral-vibe.ts |
tests/providers/mistral-vibe.test.ts |
| OpenClaw | JSONL | src/providers/openclaw.ts |
tests/providers/openclaw.test.ts |
| OpenClaude | JSONL | src/providers/openclaude.ts |
tests/providers/openclaude.test.ts |
| Pi | JSONL | src/providers/pi.ts |
tests/providers/pi.test.ts |
| OMP | JSONL | src/providers/pi.ts |
tests/providers/omp.test.ts |
| Qwen | JSONL | src/providers/qwen.ts |
none |
| Quick Desktop | EMF JSONL + SQLite | src/providers/quickdesk.ts |
tests/providers/quickdesk.test.ts |
| Roo Code | JSON | src/providers/roo-code.ts |
tests/providers/roo-code.test.ts |
| Zerostack | JSON | src/providers/zerostack.ts |
tests/providers/zerostack.test.ts |
| Grok Build | JSON/JSONL | src/providers/grok.ts |
tests/providers/grok.test.ts |
Lazy (loaded on first call)
| Provider | Storage | Source | Test |
|---|---|---|---|
| Antigravity | protobuf over RPC | src/providers/antigravity.ts |
none |
| Crush | SQLite (per-project) | src/providers/crush.ts |
tests/providers/crush.test.ts |
| Forge | SQLite | src/providers/forge.ts |
tests/providers/forge.test.ts |
| Cursor | SQLite | src/providers/cursor.ts |
tests/providers/cursor.test.ts |
| Cursor Agent | text / JSONL | src/providers/cursor-agent.ts |
tests/providers/cursor-agent.test.ts |
| Goose | SQLite | src/providers/goose.ts |
none |
| OpenCode | SQLite | src/providers/opencode.ts |
tests/providers/opencode.test.ts |
| Warp | SQLite | src/providers/warp.ts |
tests/providers/warp.test.ts |
| Vercel AI Gateway | REST API | src/providers/vercel-gateway.ts |
tests/providers/vercel-gateway.test.ts |
| ZCode | SQLite | src/providers/zcode.ts |
tests/providers/zcode.test.ts |
Shared
| Helper | Used by | Source |
|---|---|---|
| vscode-cline-parser | cline, ibm-bob, kilo-code, roo-code |
src/providers/vscode-cline-parser.ts |
File Format
Each provider doc has the same structure:
- One-line summary of what the provider integrates.
- Where it reads from on disk (or over RPC).
- Storage format and validation rules.
- Caching (which cache layer, if any).
- Deduplication key so you understand cross-provider dedup.
- Quirks that have bitten us before.
- When fixing a bug here as a checklist.
If you add a new provider, copy claude.md as a template and fill in your provider's specifics. Update this index, and prefer adding a real test fixture under tests/providers/.