Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/79f548ad-dbfb-4416-89b0-c13cc3225a6a Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…'last one wins' pattern Agent-Logs-Url: https://github.com/github/gh-aw/sessions/79f548ad-dbfb-4416-89b0-c13cc3225a6a Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix cache strategy analyzer to recognize valid last one wins pattern
fix(cache-strategy-analyzer): recognize run_id+restore-keys as valid "last one wins" pattern
Apr 28, 2026
pelikhan
approved these changes
Apr 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Daily Cache Strategy Analyzer’s guidance so ${{ github.run_id }} cache keys are only treated as misconfigurations when no restore-keys are present (documenting the valid “last one wins” pattern), and adjusts several workflow lockfiles’ job permissions.
Changes:
- Refines misconfiguration detection + severity criteria to require
run_idand missing restore-keys before marking as Critical. - Updates recommended remediation text to prefer adding restore-keys instead of removing
run_id. - Adds
pull-requests: writejob permission to several workflow lockfiles.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/daily-cache-strategy-analyzer.md | Updates analyzer instructions, severity rubric, and issue template recommendations around run_id + restore-keys. |
| .github/workflows/unbloat-docs.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/tidy.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/plan.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/pdf-summary.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/mergefest.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/brave.lock.yml | Adds pull-requests: write to activation job permissions. |
| .github/workflows/ace-editor.lock.yml | Adds pull-requests: write to activation job permissions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/8 changed files
- Comments generated: 4
| contents: read | ||
| discussions: write | ||
| issues: write | ||
| pull-requests: write |
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
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.
The analyzer was flagging any cache key containing
run_idas 🔴 Critical, incorrectly treating a deliberate "last write wins" pattern as a misconfiguration. The valid pattern —<prefix>-${{ github.run_id }}key with<prefix>-restore-key — intentionally saves state under a unique key per run while always restoring from the most recent prior entry.Changes
run_idkeys are only misconfigured when there are no restore-key fallbacks; added a callout explaining the "last one wins" patternrun_idkey and no restore-keys configuredrun_idrun_id+ restore-key should not be flaggedWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch(http block)If you need me to access, download, or install something from one of these locations, you can either: