fix: pre-fetch review comments and allow astral.sh in responder#186
fix: pre-fetch review comments and allow astral.sh in responder#186
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes reliability issues in the review-responder gh-aw workflow by pre-fetching PR review threads via GraphQL (avoiding an intermittent MCP empty-result bug) and by allowing astral.sh so the agent can download/run the Astral Python toolchain (uv, ruff) inside the sandbox.
Changes:
- Add a shared workflow import to fetch and persist unresolved review threads to
/tmp/gh-aw/review-data/unresolved-threads.json. - Update
review-responderto import the pre-fetch step, read the local JSON file instead of MCP/REST, and allowastral.sh. - Recompile the locked workflow YAML.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/shared/fetch-review-comments.md |
New shared import that queries GraphQL for review threads and writes unresolved threads JSON for the agent to consume. |
.github/workflows/review-responder.md |
Imports the pre-fetch step, switches instructions to read pre-fetched JSON, and adds astral.sh to the network allowlist. |
.github/workflows/review-responder.lock.yml |
Updated compiled workflow reflecting the import, allowlist changes, and new pre-fetch step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3120e5a to
8b4dc16
Compare
The MCP pull_request_read tool returns empty [] for review comments inside the gh-aw agent sandbox. This adds a shared import that runs gh api graphql BEFORE the agent starts, writing unresolved review threads to /tmp/gh-aw/review-data/unresolved-threads.json. Changes: - Add shared/fetch-review-comments.md with GraphQL pre-fetch step - Update review-responder.md to import shared step and read from file - Use databaseId for reply-to-review-comment targeting - Fetch up to 100 comments per thread (pagination tracked in #187) - Fail loudly on jq parse errors instead of silent fallback to [] - Recompile review-responder.lock.yml Closes #180 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8b4dc16 to
89f2475
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: re-add labels config to implementer create-pull-request The labels: [aw] config was removed based on a vague 'node ID resolution error' that was never properly investigated. The gh-aw docs officially support this field. Re-adding it so labels are applied by infrastructure, not dependent on agent behavior. Closes #108 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: update changelog and agentic-workflows for pre-fetch, dedup, and label desync - Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix), quality gate label/approval desync - Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory table, history entry for 2026-03-20/21 session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Sasa Junuzovic <sasa@Sasas-MacBook-Air.local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Fixes #180 (MCP returns empty review comments), #183 (astral.sh blocked by firewall), and #184 (audit all workflows for missing network domains).
Problem
Three issues prevented the gh-aw agents from working correctly:
MCP read failure: The GitHub MCP
pull_request_readtool returns empty[]for review comments inside the gh-aw agent sandbox. This is a known issue confirmed by the gh-aw team. The responder could never find comments to address.Cannot run lint:
astral.sh(whereuvandruffbinaries are hosted) was blocked by the firewall. All three code-writing workflows (responder, ci-fixer, implementer) were instructed to runuv run ruff checkbut could not. The agents skipped validation and pushed unverified code. PR body claims like "All 416 tests pass" were written without actually running tests — confirmed by checking agent logs (zero matches for uv/ruff/pytest).Audit: All 6 workflows audited. The 3 that write code (responder, ci-fixer, implementer) now have
astral.sh. The other 3 (code-health, quality-gate, test-analysis) only review/file issues and do not need it.Solution
Pre-fetch pattern (fixes #180)
Created a shared import (
.github/workflows/shared/fetch-review-comments.md) that runs before the agent starts:gh api graphqlto fetch all review threads with resolution statuscomments.nodeswrapper into clean arrays/tmp/gh-aw/review-data/unresolved-threads.jsonThis mirrors the pattern used in
github/gh-awowncopilot-pr-data-fetch.md.Network fix (fixes #183, #184)
Added
"astral.sh"tonetwork.allowedin all three code-writing workflows:review-responder.mdci-fixer.mdissue-implementer.mdChanges
.github/workflows/shared/fetch-review-comments.md— pre-fetch shared import.github/workflows/review-responder.md— addedimports:,astral.sh, updated step 3.github/workflows/ci-fixer.md— addedastral.shto network.github/workflows/issue-implementer.md— addedastral.shto networkTesting
Tested pre-fetch on two PRs (before jq/pagination fixes, both successful):
Known limitations
Related issues