Tegy Usage Accounting Parity
End-to-end evidence for Claude-style usage settings, approximate historical backfill, exact provider usage on new turns, and production queue recovery.
Conclusion
- Parity achieved for the Claude.ai usage surface shape: settings modal, usage limits section, current session meter, weekly all-model meter, reset copy, plan badge, and refresh/last-updated affordance.
-
Approximate backfill is complete for historical SDK result rows. New
production turns use exact OpenRouter/provider cost from
turn.usage.updated. - The verification found and fixed a production event queue recovery gap. The stale queue backlog went from 790 unprocessed fragments to 0, then a new user-visible production turn persisted exact usage.
Production Proof Video
The video shows the production usage settings surface, a real production chat turn, the assistant answer, and the updated usage settings surface.
Exact Production Delta
| Measurement | Before final turn | After final turn | Delta |
|---|---|---|---|
| Current session used | $0.054400 | $0.059722 | +$0.005322 |
| Weekly all-model used | $0.561900 | $0.567222 | +$0.005322 |
| Current session exact rows | 2 | 3 | +1 |
| Current session exact cost | $0.009510 | $0.014832 | +$0.005322 |
Production Screenshots
usage proof final 2026-07-01.
Queue Recovery Evidence
| State | Recoverable streams | Unprocessed fragments | Result |
|---|---|---|---|
| Before internal recovery | 2 | 790 | Two stale streams had unprocessed fragments. |
| After internal recovery | 0 | 0 | Both streams drained successfully, zero failed stream ids. |
| After final proof turn | 0 | 0 | Queue remained clear after fresh production usage persistence. |
Claude.ai Reference
Claude.ai's usage settings evidence was captured from the authenticated Claude session and used as the UI target for Tegy's settings surface.
Local Tegy Parity Check
Local screenshots and a short local video were captured before deploy to verify the surface shape against the Claude.ai reference.
Verification Commands
| Command | Result |
|---|---|
npx tsc -b --pretty false |
Passed. |
npx tsx scripts/test-flows.ts |
Passed. |
npm run build |
Passed. Vite emitted only the existing chunk-size warning. |
npx eslint worker/tegy-app.ts |
Passed. |
npm run lint |
Known unrelated baseline failure remains in scripts/visual-fuzz-report.ts. |