Skip to content

Calibrate token accounting and Agent activity#6

Merged
Backtthefuture merged 4 commits into
mainfrom
codex/token-accounting-agent-activity
Jul 19, 2026
Merged

Calibrate token accounting and Agent activity#6
Backtthefuture merged 4 commits into
mainfrom
codex/token-accounting-agent-activity

Conversation

@Backtthefuture

Copy link
Copy Markdown
Owner

Summary

  • normalize cached/reasoning token buckets and move Codex history to revision 8 cumulative accounting
  • add the source-aware Agent activity dashboard with Today / 7-day views, hourly activity, and cache-coverage-aware metrics
  • protect recalibration migrations and add deterministic fixtures, visual renders, CI gates, and a frozen-history audit

Why

Lifecycle token events, compaction, child-Agent replay, and provider-specific cache semantics could inflate totals or present unknown cache coverage as a real zero. Cross-source proxy matching could also remove independent requests when only their timing and usage looked similar. The previous Agent card mixed unverifiable score/rank/work-time semantics.

Impact

Historical Codex totals may decrease after recalibration, but source logs are preserved. Cache hit rate appears only when coverage is complete. Cross-source records are deduplicated only with a shared request/response ID, or a shared session plus matching time/model/usage. Experimental Hermes/ZCode sources remain local-first and opt-in.

Validation

  • clean staged-snapshot full app and helper build
  • Codex cumulative, CC Switch, migration, Shanghai-calendar, dedupe, and Agent fixtures
  • frozen 608-file history audit: PASS at 4,316,026,634 calibrated Token
  • Swift/Python audit parity including revision, strategy, cache-creation, and token breakdown
  • Simplified Chinese, English, Traditional Chinese, and language-refresh checks
  • Agent card and recalibration notice render checks
  • local SwiftPM XCTest runner is unavailable because the active CommandLineTools has a PackageDescription linker mismatch; GitHub macOS/Xcode CI is enabled

@Backtthefuture
Backtthefuture marked this pull request as ready for review July 19, 2026 23:23
@Backtthefuture
Backtthefuture merged commit 583535d into main Jul 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant