You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No validation of token/cost totals against real sessions or an external reference #74
Current tests prove the code agrees with itself (e.g. the golden parity test across hook / CLI / renderer in test/shared/turnAccounting.parity.test.ts), but nothing proves the numbers are right. A wrong formula or price that all consumers share passes every test — see #72.
All fixtures are hand-written (test/fixtures/turn-accounting/session.jsonl, test/mocks/*), while .claude/rules/testing.md states fixtures use real JSONL data from ~/.claude/projects/.
Token and cost totals are never cross-checked against an independent source (ccusage, the Usage & Cost Admin API, or an actual invoice).
Добавить анонимизированную реальную сессию как golden-фикстуру: несколько моделей, стриминг-фрагменты с одним requestId, compaction, subagent/sidechain, 1h cache write.
Посчитать эталонные итоги независимо (отдельный простой скрипт и/или ccusage на той же сессии) и зафиксировать их в тесте с описанием, откуда они взяты.
Проверять, что calculateMetrics, CLI (analyzeSession) и hook дают те же токены и стоимость.
Привести .claude/rules/testing.md в соответствие с фактическим положением (какие фикстуры реальные, какие синтетические).
Acceptance
Golden-тест на реальной сессии входит в pnpm test
Источник эталонных чисел задокументирован рядом с фикстурой
Фикстура не содержит личных данных (пути, промпты, токены)
Activity
feat(cli): before/after spend comparison over the corpus (#86)
feat(cli): before/after spend comparison over the corpus (#86) (#138)