FIX: Account for subscription benchmarks in quota estimates - #33
Merged
Conversation
merefield
marked this pull request as ready for review
August 24, 2026 10:58
There was a problem hiding this comment.
🟡 Changes recommended
Two pricing paths can accept incomplete telemetry or incorrectly price cumulative long-context usage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds subscription-funded benchmark usage to quota estimates while deferring incomplete accounting.
Changes:
- Tracks and prices benchmark usage by billing source.
- Defers quota estimates during active/settling benchmarks.
- Adds documentation and accounting tests.
File summaries
| File | Description |
|---|---|
| README.md | Documents benchmark quota behavior. |
| internal/ui/quota_api_eq.go | Defers API-equivalent display. |
| internal/ui/model.go | Integrates benchmark accounting lifecycle. |
| internal/ui/benchmark_quota.go | Implements benchmark usage accounting. |
| internal/ui/benchmark_quota_test.go | Tests accounting behavior. |
| internal/codex/benchmark.go | Exposes benchmark billing source. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
Benchmark sessions use ephemeral app-server threads. They consume subscription quota but do not enter the persisted rollout telemetry used by Codexometer, which could substantially understate both consumed and projected API-equivalent value.
Validation
go vet ./...test -z "$(gofmt -l .)"go test -race -cover ./... -count=1go build -trimpath ./...