Skip to content

Add bounded exact-root local usage report - #955

Draft
GraciousGazelles wants to merge 25 commits into
mainfrom
tooling/usage-report-exact-root-20261017
Draft

GraciousGazelles wants to merge 25 commits into
mainfrom
tooling/usage-report-exact-root-20261017

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

Adds a bounded read-only exact-root usage report with per-model and root/descendant token accounting, plus synthetic tests for lineage, model attribution, limits, and read-only behavior.

The report explicitly identifies which ledger was selected and does not claim cross-ledger deduplication or complete historical coverage. Hosted validation is required before any local report run.

Scope

This change adds the report command and its synthetic policy test. It does not modify the usage writer, schema, or database.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a bounded exact-root usage reporting mechanism and fallback strategies for older database schemas. Key changes include adding support for model-by-model breakdowns in metrics, implementing a single-pass metadata snapshot fallback when reporting indexes are missing, and adding robust error handling and limit enforcement for lineage scans. Additionally, a comprehensive test suite has been added to verify these behaviors under various database index configurations. There are no review comments to address, and the implementation appears solid.

Comment thread scripts/codex_usage_report.py Fixed

This branch has not been deployed

No deployments
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.

2 participants