Skip to content

Fix cache miss in Matt Pocock Skills Reviewer: remove cache-memory#31337

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-cache-miss-matt-pocock-reviewer
May 10, 2026
Merged

Fix cache miss in Matt Pocock Skills Reviewer: remove cache-memory#31337
pelikhan merged 4 commits into
mainfrom
copilot/fix-cache-miss-matt-pocock-reviewer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 10, 2026

Bug Fix

What was the bug?

The workflow configured cache-memory (inherited from shared/pr-code-review-config.md) but the agent never wrote anything back to the cache directory. Every run left /tmp/gh-aw/cache-memory empty → the upload step found no files → 100% cold-start miss rate across all observed runs.

How did you fix it?

Rather than teaching the agent to write back to a cache it doesn't meaningfully use, cache-memory is removed from this workflow and its shared base config entirely.

shared/pr-code-review-config.md

  • Removed cache-memory: true from the tools: section
  • Removed cache-memory documentation from the body (no longer applicable)

mattpocock-skills-reviewer.md

  • No explicit override needed; cache-memory is no longer part of the shared config

All 7 workflows that import shared/pr-code-review-config.md (directly or via shared/pr-review-base.md) were recompiled: mattpocock-skills-reviewer, grumpy-reviewer, pr-code-quality-reviewer, pr-nitpick-reviewer, pr-triage-agent, refiner, and security-review.

Testing

  • ✅ All 7 affected workflows compile cleanly with no errors or warnings
  • ✅ Zero cache-memory references remain in any of the regenerated lock files

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cache miss in Matt Pocock Skills Reviewer Fix cache miss in Matt Pocock Skills Reviewer: persist review state after each run May 10, 2026
Copilot AI requested a review from pelikhan May 10, 2026 12:35
@github-actions
Copy link
Copy Markdown
Contributor

Hey @copilot-swe-agent 👋 — great catch on the cache miss bug in the Matt Pocock Skills Reviewer! Fixing the cold-start miss rate and correcting the PR number expression in shared/pr-code-review-config.md are both solid, well-scoped improvements.

One thing worth addressing before this is merged:

  • No tests — the diff doesn't include any test coverage for the new cache write-back behaviour (Step 8) or the fixed PR number expression. Even a lightweight integration test or a fixture that exercises the pull_request event path would give reviewers more confidence that the fix holds.

If you'd like a hand, you can assign this prompt to your coding agent:

Add test coverage for the cache write-back fix in PR #31337.

Specifically:
1. Add a test (or update an existing one) that verifies the agent writes a structured `pr-{number}.json` file to `/tmp/gh-aw/cache-memory` after completing a review run in `.github/workflows/mattpocock-skills-reviewer.md`.
2. Add a test that confirms the PR number expression `github.event.pull_request.number || github.event.issue.number` in `.github/workflows/shared/pr-code-review-config.md` resolves correctly on both `pull_request` and `issue_comment` events (not empty/wrong path).

Place tests in the appropriate test directory for workflow integration tests in this repo.

Generated by Contribution Check · ● 8.5M ·

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot remove the use of cache memory in this agentic workflow

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 10, 2026

@copilot remove the use of cache memory in this agentic workflow

Done. Added cache-memory: false to the tools: section in mattpocock-skills-reviewer.md to explicitly disable the cache-memory inherited from shared/pr-code-review-config.md. Reverted the shared config and all prompt changes to their original state, and recompiled the lock file — cache-memory steps are no longer present.

Copilot AI changed the title Fix cache miss in Matt Pocock Skills Reviewer: persist review state after each run Fix cache miss in Matt Pocock Skills Reviewer: disable cache-memory May 10, 2026
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot remove cache memory from pr-code-review-config.md as well

…ted workflows

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 10, 2026

@copilot remove cache memory from pr-code-review-config.md as well

Done. Removed cache-memory: true from shared/pr-code-review-config.md (frontmatter and docs), cleaned up the now-redundant override in mattpocock-skills-reviewer.md, and recompiled all 7 affected workflows. All lock files have zero cache-memory references.

Copilot AI changed the title Fix cache miss in Matt Pocock Skills Reviewer: disable cache-memory Fix cache miss in Matt Pocock Skills Reviewer: remove cache-memory May 10, 2026
@pelikhan pelikhan marked this pull request as ready for review May 10, 2026 16:18
Copilot AI review requested due to automatic review settings May 10, 2026 16:18
@pelikhan pelikhan merged commit a82187a into main May 10, 2026
@pelikhan pelikhan deleted the copilot/fix-cache-miss-matt-pocock-reviewer branch May 10, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the unused cache-memory mechanism from the shared PR review workflow configuration and regenerates affected workflow lock files to eliminate cache restore/save steps that always resulted in cold-start misses.

Changes:

  • Removed cache-memory from .github/workflows/shared/pr-code-review-config.md (tooling + documentation).
  • Regenerated 7 dependent workflow lock files to remove cache-memory prompts, env vars, artifact upload/download, and actions/cache usage.
  • Simplified agent invocation in the regenerated lock files by dropping the extra --add-dir /tmp/gh-aw/cache-memory/ mount.
Show a summary per file
File Description
.github/workflows/shared/pr-code-review-config.md Drops cache-memory tool configuration and related guidance from the shared PR review config.
.github/workflows/security-review.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/refiner.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/pr-triage-agent.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/pr-nitpick-reviewer.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/pr-code-quality-reviewer.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/mattpocock-skills-reviewer.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.
.github/workflows/grumpy-reviewer.lock.yml Regenerated to remove cache-memory restore/save/artifact steps and related env/prompt usage.

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: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cache-strategy] Fix cache miss in Matt Pocock Skills Reviewer

3 participants