Repository navigation
feat(report-api-budget): emit the api-calls notice - #942
Conversation
The review lanes posted api-budget but no api-calls, so the hub read their requests as uncounted. The action's copy of api-budget.bash had no api_budget_emit_calls: add it, identical to the claude-code-plugins copy, and call it in the token loop as log-api-budget does. A job with no reading now writes its line at 0, as log-api-budget's does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security issues found in this pull request. I read the full diff in
critical-findings: 0 |
|
claude-review reviewed Code review: PR #942,
|
No related issue: instrumentation from a GITHUB_TOKEN rate-limit measurement, tracked in no issue.
Summary
The review lanes post
api-budgetbut noapi-calls, so the hub cannot tell a job's own requests from the rise in a counter other jobs share. Eachpr-review-cli.ymljob now postsgithub-token=N not-modified=M graphql=K. The reusable runs at@main, so this applies at merge.Fix
api-budget.bashhad noapi_budget_emit_calls. It is added, identical to the claude-code-plugins function.report-api-budgetcalls it in the token loop, aslog-api-budgetdoes, and writes the line to the step summary.Counted requests are those of watched Octokit clients and the
responsesfiles. A call outside both is not counted.Verification
report-api-budget.test.cjs: 15 pass, including a 304 counted as not-modified and the zero line. The expected values are counted by hand.pr-review-cli-api-calls.test.cjs: 9 pass. For each of six run shapes, each job's N equals the requests the fake answered.Related
api_budget_emithere still prints one reading per resource. The header's identical-copies rule needs a follow-up once that change merges.🤖 Generated with Claude Code