Skip to content

Commit c77959b

Browse files
Copilotpelikhan
andauthored
fix(slide-deck-maintainer): persist cache-memory state for round-robin source tracking (#29644)
* Initial plan * fix: add cache-memory state read/write to Slide Deck Maintainer for round-robin tracking The workflow had `cache-memory: true` but never wrote any files to /tmp/gh-aw/cache-memory/, causing every run to start cold and repeat the same source category. - Add Step 4a: read state.json from cache on startup to pick next category - Add Step 4b: scan the selected category (source-code / agentic-workflows / documentation) - Add Step 4c: always write updated state.json after scanning so future runs can rotate through categories instead of starting cold Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8ba46581-0473-426d-99d4-1db77cbee956 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent b78a36b commit c77959b

1 file changed

Lines changed: 66 additions & 5 deletions

File tree

.github/workflows/slide-deck-maintainer.md

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,85 @@ Focus on:
156156

157157
## Step 4: Scan Repository Content (Round Robin)
158158

159-
Use your cache-memory to track which sources you've reviewed recently. Rotate through:
159+
### 4a: Load Round-Robin State from Cache
160160

161-
### A. Source Code (25% of time)
161+
The state file is at **`/tmp/gh-aw/cache-memory/slide-deck-maintainer/state.json`**.
162+
163+
Check whether the file exists, then read it:
164+
165+
```bash
166+
if [ -f /tmp/gh-aw/cache-memory/slide-deck-maintainer/state.json ]; then
167+
cat /tmp/gh-aw/cache-memory/slide-deck-maintainer/state.json
168+
else
169+
echo "NOT_FOUND"
170+
fi
171+
```
172+
173+
**If the file does NOT exist** (first run or cold cache): start with category `documentation`.
174+
175+
**If the file exists**, read it and extract `last_category` to determine the next category using round-robin:
176+
- `source-code` → next is `agentic-workflows`
177+
- `agentic-workflows` → next is `documentation`
178+
- `documentation` → next is `source-code`
179+
- Any other/missing value → use `documentation`
180+
181+
If the file exists but is malformed or unreadable, call `missing_data` with `data_type: "cache_memory"` and `reason: "cache_memory_miss"`, then default to `documentation`.
182+
183+
The schema is:
184+
```json
185+
{
186+
"last_category": "documentation",
187+
"last_run": "2026-05-01",
188+
"run_history": [
189+
{"category": "documentation", "run_date": "2026-05-01", "changes_made": false}
190+
]
191+
}
192+
```
193+
194+
### 4b: Scan the Selected Category
195+
196+
Based on the selected category, scan the corresponding sources:
197+
198+
#### source-code (25% of time)
162199
- Scan `cmd/gh-aw/` for CLI commands
163200
- Check `pkg/` for core features and capabilities
164201
- Look for new tools, engines, or major functionality
165202

166-
### B. Agentic Workflows (25% of time)
203+
#### agentic-workflows (25% of time)
167204
- Review `.github/workflows/*.md` for interesting use cases
168205
- Identify common patterns and best practices
169206
- Find examples worth highlighting
170207

171-
### C. Documentation (50% of time)
208+
#### documentation (50% of time)
172209
- Check `docs/src/content/docs/` for updated features
173210
- Review API reference changes
174211
- Look for new guides or tutorials
175212

176-
**Round robin strategy**: Keep track of what you've scanned in previous runs using cache-memory. Cycle through different sections to ensure comprehensive coverage over multiple runs.
213+
### 4c: Save Round-Robin State to Cache
214+
215+
After scanning, **always write the updated state file** regardless of whether changes were made:
216+
217+
```bash
218+
mkdir -p /tmp/gh-aw/cache-memory/slide-deck-maintainer
219+
```
220+
221+
Write `/tmp/gh-aw/cache-memory/slide-deck-maintainer/state.json` with:
222+
- `last_category`: the category you just scanned
223+
- `last_run`: today's date in `YYYY-MM-DD` format (filesystem-safe — no colons or special characters)
224+
- `run_history`: append this run's entry (keep at most the last 10 entries)
225+
226+
Example for a run that scanned `documentation`:
227+
```json
228+
{
229+
"last_category": "documentation",
230+
"last_run": "2026-05-01",
231+
"run_history": [
232+
{"category": "documentation", "run_date": "2026-05-01", "changes_made": false}
233+
]
234+
}
235+
```
236+
237+
**This write is mandatory** — it is what allows future runs to rotate through categories instead of always starting cold.
177238

178239
## Step 5: Decide on Changes
179240

0 commit comments

Comments
 (0)