Skip to content

fix(pr-code-quality-reviewer): prevent timeout by launching grumpy-coder early#42583

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-and-optimize-agentic-workflow
Jul 1, 2026
Merged

fix(pr-code-quality-reviewer): prevent timeout by launching grumpy-coder early#42583
pelikhan merged 3 commits into
mainfrom
copilot/fix-and-optimize-agentic-workflow

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The agent exhausted its 15-minute budget doing 24 bash tool calls (mostly git diff commands that fail with exit 128 in shallow clones) before launching grumpy-coder at the very last step — then timed out waiting for it.

Changes

  • Launch sub-agent in Step 1grumpy-coder is now started in the same parallel turn as the PR data fetch, so it runs concurrently with the main agent's own analysis rather than after it
  • Non-blocking collection — replaces the old "wait for completion" contract with a single read attempt before Step 3 adjudication; continues without sub-agent output if not yet ready
  • Require GitHub MCP tools for diff — explicitly requires get_diff/get_files instead of git diff bash commands, which are unreliable in shallow clones

Before:

Step 1: fetch PR data (many bash git-diff attempts, fallbacks)
Step 2: run grumpy-coder, wait for completion   ← started at t=14m, timeout at t=15m

After:

Step 1: fetch PR data (MCP get_diff/get_files) + start grumpy-coder in background
Step 2: independent analysis while grumpy-coder runs
Step 3: read grumpy-coder result (once, non-blocking), adjudicate

Copilot AI and others added 3 commits June 30, 2026 22:48
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…imeout

- Merge sub-agent start into Step 1 so grumpy-coder runs in parallel
  with the main agent's own analysis, not after it
- Replace "wait for completion" with a non-blocking collect-before-Step-3
  pattern: check once for result; skip if still pending
- Instruct agent to use GitHub MCP get_diff/get_files tools instead of
  git diff bash commands (unreliable in shallow clones)
- Recompile lock file

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… wording

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title fix(pr-code-quality-reviewer): launch grumpy-coder early to prevent timeout fix(pr-code-quality-reviewer): prevent timeout by launching grumpy-coder early Jun 30, 2026
Copilot AI requested a review from pelikhan June 30, 2026 22:55
@pelikhan pelikhan marked this pull request as ready for review July 1, 2026 00:23
Copilot AI review requested due to automatic review settings July 1, 2026 00:23
@pelikhan pelikhan merged commit e633c8d into main Jul 1, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/fix-and-optimize-agentic-workflow branch July 1, 2026 00:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the PR Code Quality Reviewer agentic workflow to reduce timeout risk by starting its grumpy-coder sub-agent earlier and by standardizing PR diff/file retrieval via GitHub MCP tools (avoiding unreliable git diff in shallow clones).

Changes:

  • Updates the workflow review process to launch grumpy-coder earlier and treat its output as best-effort (non-blocking read).
  • Tightens guidance to use GitHub MCP get_diff/get_files for PR data collection instead of bash git diff approaches.
  • Regenerates lockfiles; however, the PR also includes an unrelated upstream-managed workflow lockfile change.
Show a summary per file
File Description
.github/workflows/pr-code-quality-reviewer.md Revises the review procedure to start grumpy-coder earlier and to rely on MCP diff/file fetching.
.github/workflows/pr-code-quality-reviewer.lock.yml Regenerated lockfile metadata for the updated workflow markdown.
.github/workflows/daily-team-status.lock.yml Lockfile changed despite being upstream-sourced; appears unrelated to the PR’s stated purpose.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines +65 to +66
In **one parallel turn**, fetch all of the following using GitHub MCP tools. **Always** use `get_diff` for the PR diff and `get_files` for the changed-file list — do not use `git diff` bash commands, which are unreliable in shallow clones:
- PR diff (line-by-line changes) — use `get_diff`
@@ -1,5 +1,5 @@
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"9f61ffba0d4e9663a43f41030c13a4c7c71ebac8122f586cbd706756a605df94","body_hash":"33c10cc22b8836b79387efda582e48c5a463e9849880a01d58704a0fa291e986","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.65"}}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.16","digest":"sha256:94bbf52b74d38e8117387e93e698f79d678dd3879faa0e57f2ea128eda8fb507","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.16@sha256:94bbf52b74d38e8117387e93e698f79d678dd3879faa0e57f2ea128eda8fb507"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.16","digest":"sha256:bbad2f109b97a4b3375ad371a5300d42bc9251dad61cd7bc66380cad8501cf94","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.16@sha256:bbad2f109b97a4b3375ad371a5300d42bc9251dad61cd7bc66380cad8501cf94"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.16","digest":"sha256:483d6a8086752a02d581d7a42629b741e3f2fa9f3a6a10320590cf881638dad3","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.16@sha256:483d6a8086752a02d581d7a42629b741e3f2fa9f3a6a10320590cf881638dad3"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.32","digest":"sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.32@sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.5.0","digest":"sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4","pinned_image":"ghcr.io/github/github-mcp-server:v1.5.0@sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4"}]}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.16"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.16"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.16"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.32","digest":"sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.32@sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.5.0","digest":"sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4","pinned_image":"ghcr.io/github/github-mcp-server:v1.5.0@sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4"}]}
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.

3 participants