You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: github_rate_limit_usage.core_consumed was absent from all 169 run_summary.json files downloaded on 2026-06-20. The same field was absent in every run examined across the past week.
Root cause: The logs MCP tool defaults to --artifacts usage (the compact conclusion artifact). github_rate_limits.jsonl — the file the CLI parses to compute core_consumed — lives in the activation and agent artifacts, not in usage. Without artifacts=["github-api"], the rate limit file is never downloaded and github_rate_limit_usage is omitted from every run_summary.json.
Secondary issue: The metrics-aggregator sub-agent had a stale schema referencing aw_info.json with camelCase field names that don't match the actual PascalCase run_summary.json layout (run.workflowName, run.Duration, run.SafeItemsCount, etc.).
Null-vs-zero gap: The old instruction treated missing core_consumed as zero, silently conflating a data collection gap with zero API consumption in the trending history.
Replaced stale aw_info.json schema with the real run_summary.json field layout
Fixed field mappings: run.workflowName, run.conclusion, run.Duration / 1e9 for seconds, run.SafeItemsCount for safe output count
Changed null handling: when core_consumed is absent for every run in a batch, the day's github_api_calls is now recorded as null (not 0) to distinguish a data gap from zero consumption
Expected Improvements
github_rate_limit_usage.core_consumed will be populated on the next scheduled run
The trending history will correctly distinguish data-collection gaps (null) from zero-consumption days (0)
The metrics-aggregator will correctly parse run metrics without field-name mismatches
Validation
✅ api-consumption-report compiled successfully (no errors, no warnings)
Note: .lock.yml regeneration will happen automatically after merge.
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the patch from the workflow run
gh run download 27881708288 -n agent -D /tmp/agent-27881708288
# Create a new branch
git checkout -b q/fix-api-consumption-report-rate-limit-artifacts-d329d384d69be4df main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-27881708288/aw-q-fix-api-consumption-report-rate-limit-artifacts.patch
# Push the branch and create the pull request
git push origin q/fix-api-consumption-report-rate-limit-artifacts-d329d384d69be4df
gh pr create --title '[q] fix(api-consumption-report): restore GitHub API rate limit data' --base main --head q/fix-api-consumption-report-rate-limit-artifacts-d329d384d69be4df --repo github/gh-aw
Q Workflow Optimization Report
Triggered by:
@pelikhan· discussion #40459Root Cause (from live data)
GitHub API Consumption Report Agent
github_rate_limit_usage.core_consumedwas absent from all 169run_summary.jsonfiles downloaded on 2026-06-20. The same field was absent in every run examined across the past week.logsMCP tool defaults to--artifacts usage(the compact conclusion artifact).github_rate_limits.jsonl— the file the CLI parses to computecore_consumed— lives in theactivationandagentartifacts, not inusage. Withoutartifacts=["github-api"], the rate limit file is never downloaded andgithub_rate_limit_usageis omitted from everyrun_summary.json.metrics-aggregatorsub-agent had a stale schema referencingaw_info.jsonwith camelCase field names that don't match the actual PascalCaserun_summary.jsonlayout (run.workflowName,run.Duration,run.SafeItemsCount, etc.).core_consumedas zero, silently conflating a data collection gap with zero API consumption in the trending history.Changes Made
api-consumption-report.md— Step 1 (log collection)artifacts=["github-api"]to both incremental and backfilllogs()callsrun_summary.json,token_usage.jsonl,aw_info.json,github_rate_limits.jsonl)api-consumption-report.md—metrics-aggregatorsub-agentaw_info.jsonschema with the realrun_summary.jsonfield layoutrun.workflowName,run.conclusion,run.Duration / 1e9for seconds,run.SafeItemsCountfor safe output countcore_consumedis absent for every run in a batch, the day'sgithub_api_callsis now recorded asnull(not0) to distinguish a data gap from zero consumptionExpected Improvements
github_rate_limit_usage.core_consumedwill be populated on the next scheduled runmetrics-aggregatorwill correctly parse run metrics without field-name mismatchesValidation
api-consumption-reportcompiled successfully (no errors, no warnings)References
pkg/cli/logs_command.go,pkg/cli/logs_github_rate_limit_usage.go,pkg/cli/logs_artifact_set.goWarning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
Protected files
The push was rejected because GitHub Actions does not have
workflowspermission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.Create the pull request manually