Skip to content

fix(cli): show token usage in analysis reports - #2030

Merged
lizhengfeng101 merged 1 commit into
mainfrom
fix/analysis-token-usage
Nov 21, 2026
Merged

lizhengfeng101 merged 1 commit into
mainfrom
fix/analysis-token-usage

Conversation

@lizhengfeng101

Copy link
Copy Markdown
Contributor

Description

When path filters exclude every changed file, Review can report zero tokens even though Analysis ran and used tokens. The text report now prints the Analysis total separately, with input/output and cache counts when available. The Review summary is unchanged.

A successful Analysis no longer ends with the local Evidence: path. Reports still show the path when an artifact directory is available and Analysis failed, its execution was partial, or the model declared its investigation incomplete. The saved artifacts and analysis_meta.artifact_dir in JSON are unchanged.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How Has This Been Tested?

  • make test passes locally.
  • make check and make build pass.
  • Regression tests cover token breakdowns, evidence visibility across execution and model-declared completion states, and preservation of the artifact path in JSON.
  • The pre-commit OCR review completed with no findings on the implementation file. The default review rules excluded the test file; it ran as part of make test.

Checklist

  • Formatting and vet checks pass.
  • Regression tests are included and the full unit test suite passes.
  • Contributor self-review of the code and AI-generated content.
  • Contributor confirmation of CLA and AI-assisted contribution requirements.

AI disclosure: OpenAI Codex CLI (gpt-6.2-astra) assisted with implementation, tests, and PR preparation. The pre-commit review used Open Code Review (ocr) with gpt-6.2-astra.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@MuoDoo MuoDoo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 5f4d905 into main Nov 21, 2026
13 checks passed
@lizhengfeng101
lizhengfeng101 deleted the fix/analysis-token-usage branch November 21, 2026 08:33
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