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
Because run_id is unique per run, every daily run wrote to a different cache key and could never restore from the previous run's cache. The result: history.jsonl always contained exactly 1 entry (today's data only), regardless of how many days the workflow had been running.
Evidence from live run logs: all 5 recent api-consumption-report runs had exactly 1 data point in history.jsonl, and the discussion report itself noted "This is the first day of tracking, establishing a baseline" on every run.
Changes
shared/trending-charts-simple.md
Removed -$\{\{ github.run_id }} suffix from the cache key
The stable key trending-data-$\{\{ env.GH_AW_WORKFLOW_ID_SANITIZED }} now allows each run to restore the cache written by the previous run
api-consumption-report.md
Added an explicit cache-validation step at the start of Step 3 so the agent logs whether the cache was restored (detects first-run vs cache-hit)
Added Cache restored from previous run field to the discussion's Cache Memory Status section
Expected Behaviour After Fix
First run: creates history.jsonl with 1 entry, saves to cache
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 24920151268 -n agent -D /tmp/agent-24920151268
# Create a new branch
git checkout -b fix/trending-cache-key-round-robin-8f771b4bbf882807 main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24920151268/aw-fix-trending-cache-key-round-robin.patch
# Push the branch and create the pull request
git push origin fix/trending-cache-key-round-robin-8f771b4bbf882807
gh pr create --title '[q] fix: remove run_id from trending cache key to enable cross-run cache restoration' --base main --head fix/trending-cache-key-round-robin-8f771b4bbf882807 --repo github/gh-aw
Root Cause
The cache-memory key in
shared/trending-charts-simple.mdincluded$\{\{ github.run_id }}:Because
run_idis unique per run, every daily run wrote to a different cache key and could never restore from the previous run's cache. The result:history.jsonlalways contained exactly 1 entry (today's data only), regardless of how many days the workflow had been running.Evidence from live run logs: all 5 recent
api-consumption-reportruns had exactly 1 data point inhistory.jsonl, and the discussion report itself noted "This is the first day of tracking, establishing a baseline" on every run.Changes
shared/trending-charts-simple.md-$\{\{ github.run_id }}suffix from the cache keytrending-data-$\{\{ env.GH_AW_WORKFLOW_ID_SANITIZED }}now allows each run to restore the cache written by the previous runapi-consumption-report.mdCache restored from previous runfield to the discussion's Cache Memory Status sectionExpected Behaviour After Fix
history.jsonlwith 1 entry, saves to cacheValidation
api-consumption-report.mdcompiled successfully (no errors).Warning
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
Create the pull request manually