fix: sanitize cache-memory keys in all agentic workflows to fix git setup failures#2848
Merged
Conversation
…ons/spaces
Replace `${{ github.workflow }}` (expands to e.g. "News: Month Ahead" with
colons and spaces) with hardcoded filename-based slugs (e.g. "news-month-ahead")
in cache-memory key configurations.
This fixes the cache-memory git repository setup failure in workflow run
26709846751 where the `setup_cache_memory_git.sh` script failed with
"fatal: not in a git directory" (exit code 128) due to corrupted cache
entries with special characters in their keys.
The new keys also invalidate any previously corrupted cache entries,
ensuring a clean start for all workflows.
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pethers
May 31, 2026 11:27
View session
Contributor
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: documentation,workflow,ci-cd,size-l,news,agentic-workflow Label Categories
For more information, see |
Contributor
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes gh-aw cache-memory restore/setup failures in the 14 agentic news workflows by replacing ${{ github.workflow }}-derived cache keys (which can contain spaces/colons) with stable, filename-based slugs, and regenerating the compiled .lock.yml workflows so the runtime cache restore/save keys match.
Changes:
- Replace
tools.cache-memory.keyin allnews-*.mdworkflow sources with sanitized slug keys (e.g.news-month-ahead-...). - Recompile all corresponding
news-*.lock.ymlfiles soactions/cacherestore/save keys also use the sanitized slugs. - Preserve existing per-workflow key components (e.g.
cycle_anchorinnews-election-cycle).
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/news-year-ahead.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-year-ahead.lock.yml | Regenerated; cache restore/save keys use news-year-ahead slug. |
| .github/workflows/news-weekly-review.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-weekly-review.lock.yml | Regenerated; cache restore/save keys use news-weekly-review slug. |
| .github/workflows/news-week-ahead.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-week-ahead.lock.yml | Regenerated; cache restore/save keys use news-week-ahead slug. |
| .github/workflows/news-translate.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-translate.lock.yml | Regenerated; cache restore/save keys use news-translate slug. |
| .github/workflows/news-realtime-monitor.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-realtime-monitor.lock.yml | Regenerated; cache restore/save keys use news-realtime-monitor slug. |
| .github/workflows/news-quarter-ahead.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-quarter-ahead.lock.yml | Regenerated; cache restore/save keys use news-quarter-ahead slug. |
| .github/workflows/news-propositions.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-propositions.lock.yml | Regenerated; cache restore/save keys use news-propositions slug. |
| .github/workflows/news-motions.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-motions.lock.yml | Regenerated; cache restore/save keys use news-motions slug. |
| .github/workflows/news-monthly-review.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-monthly-review.lock.yml | Regenerated; cache restore/save keys use news-monthly-review slug. |
| .github/workflows/news-month-ahead.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-month-ahead.lock.yml | Regenerated; cache restore/save keys use news-month-ahead slug. |
| .github/workflows/news-interpellations.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-interpellations.lock.yml | Regenerated; cache restore/save keys use news-interpellations slug. |
| .github/workflows/news-evening-analysis.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-evening-analysis.lock.yml | Regenerated; cache restore/save keys use news-evening-analysis slug. |
| .github/workflows/news-election-cycle.md | Use sanitized slug for cache-memory.key while keeping cycle_anchor component. |
| .github/workflows/news-election-cycle.lock.yml | Regenerated; cache restore/save keys use news-election-cycle slug + cycle_anchor. |
| .github/workflows/news-committee-reports.md | Use sanitized slug for cache-memory.key. |
| .github/workflows/news-committee-reports.lock.yml | Regenerated; cache restore/save keys use news-committee-reports slug. |
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.
All 14 news agentic workflows use
${{ github.workflow }}in theircache-memorykey, which expands to names with colons and spaces (e.g."News: Month Ahead"). The gh-awsetup_cache_memory_git.shscript fails withfatal: not in a git directory(exit code 128) when restoring caches written under these keys, creating a circular failure where corrupted caches never get replaced.Changes
${{ github.workflow }}with filename-based slugs in all 14news-*.mdworkflow source files'cache-memory.keyconfiggh aw compile --purgeto regenerate all 14.lock.ymlfilesBefore → After
The new key format also invalidates all previously corrupted cache entries, breaking the circular failure loop.