Prevent SIGPIPE failures in Matt Pocock pre-fetch diff step on large PRs#33779
Merged
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix SIGPIPE issue in pre-fetch PR diff step
Prevent SIGPIPE failures in Matt Pocock pre-fetch diff step on large PRs
May 21, 2026
Collaborator
|
@copilot merge main, make build, recompile using ./gh-aw |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in commits |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes intermittent workflow failures when pre-fetching large PR diffs by preventing SIGPIPE (exit 141) from failing the Pre-fetch PR diff step under set -o pipefail.
Changes:
- Wraps
gh pr diff … | head -n 3000so truncation no longer fails the step due toSIGPIPE. - Regenerates the corresponding locked workflow to reflect the source workflow update.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/mattpocock-skills-reviewer.md | Adjusts the pre-fetch diff pipeline to avoid failing on SIGPIPE during truncation. |
| .github/workflows/mattpocock-skills-reviewer.lock.yml | Syncs the generated/locked workflow with the updated pre-fetch diff command. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Comment on lines
+62
to
+67
| { gh pr diff "$PR_NUMBER" --repo $EXPR_GITHUB_REPOSITORY \ | ||
| --exclude '**/*.lock.yml' \ | ||
| --exclude '**/generated/**' \ | ||
| --exclude '**/dist/**' \ | ||
| --exclude '**/build/**' \ | ||
| || true; } | head -n 3000 > /tmp/gh-aw/agent/pr-diff.patch |
Comment on lines
+62
to
+63
| { gh pr diff "$PR_NUMBER" --repo $EXPR_GITHUB_REPOSITORY \ | ||
| --exclude '**/*.lock.yml' \ |
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.
Matt Pocock Skills Reviewerintermittently failed before agent startup whenPre-fetch PR diffprocessed large diffs. The step usedset -o pipefailwithgh pr diff | head -n 3000, causing exit141(SIGPIPE) whenheadclosed early.Workflow source update (
.github/workflows/mattpocock-skills-reviewer.md)gh pr diffin a command group with|| trueso expected SIGPIPE behavior from truncation does not fail the step.Generated workflow sync (
.github/workflows/mattpocock-skills-reviewer.lock.yml)Behavioral effect
/tmp/gh-aw/agent/pr-diff.patchwithout failing step 19.pr-diff.patch+pr-meta.json) remains unchanged.{ gh pr diff "$PR_NUMBER" --repo "$EXPR_GITHUB_REPOSITORY" \ --exclude '**/*.lock.yml' \ --exclude '**/generated/**' \ --exclude '**/dist/**' \ --exclude '**/build/**' \ || true; } | head -n 3000 > /tmp/gh-aw/agent/pr-diff.patch