feat(cli): add the CLI entrypoint and benchmark runner (#41) - #232
Open
devops-bench-sync-bot wants to merge 2 commits into
Open
feat(cli): add the CLI entrypoint and benchmark runner (#41)#232devops-bench-sync-bot wants to merge 2 commits into
devops-bench-sync-bot wants to merge 2 commits into
Conversation
GitOrigin-RevId: bef4468
devops-bench-sync-bot
force-pushed
the
backsync/from-upstream
branch
from
July 30, 2026 05:17
ffff36b to
ad637bb
Compare
* feat(agents): add canonical token buckets shared across harnesses Add one canonical six-bucket token schema — input (non-cached), cached, cache_write, reasoning, output (excludes reasoning), total — with None for unreported buckets rather than a fabricated 0, that harnesses map onto, and carry the buckets through to the result row. - agents/result.py: shared TOKEN_BUCKETS + empty_tokens(). - agents/cli/gemini_cli: the terminal result.stats block maps to the canonical dict (input = full input − cached; reasoning derived from the total gap). - results/normalize.py + row.py: rows carry cachedTokens, reasoningTokens, cacheWriteTokens, and totalTokens as additive nullable fields (no SCHEMA_VERSION bump; historical rows stay valid); normalize_tokens reads the canonical keys first with legacy aliases kept for older records. Signed-off-by: Eugene Ng <ngeugene@google.com> * chore(agents): add type hints flagged in review Annotate the exported __all__/TOKEN_BUCKETS constants, fully parameterize _canonical_tokens, and add -> None to the new normalize/build_rows tests. * chore(agents): address review feedback on token buckets - empty_tokens() now returns dict[str, int | None] rather than dict[str, Any]. - normalize_tokens() returns a NormalizedTokens NamedTuple; build_rows reads its named fields (still unpacks/compares as a 6-tuple, so callers are unaffected). - Clamp canonical gemini "input" at 0 so an over-reported "cached" can't push it negative, with coverage. --------- Signed-off-by: Eugene Ng <ngeugene@google.com> GitOrigin-RevId: 6d786921b228b0cb1558af44fd8d575ba390909d
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.
feat(cli): add the CLI entrypoint and benchmark runner (#41)