Skip to content

Prevent SIGPIPE failures in Matt Pocock pre-fetch diff step on large PRs#33779

Merged
pelikhan merged 5 commits into
mainfrom
copilot/aw-failures-fix-pre-fetch-diff
May 21, 2026
Merged

Prevent SIGPIPE failures in Matt Pocock pre-fetch diff step on large PRs#33779
pelikhan merged 5 commits into
mainfrom
copilot/aw-failures-fix-pre-fetch-diff

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Matt Pocock Skills Reviewer intermittently failed before agent startup when Pre-fetch PR diff processed large diffs. The step used set -o pipefail with gh pr diff | head -n 3000, causing exit 141 (SIGPIPE) when head closed early.

  • Workflow source update (.github/workflows/mattpocock-skills-reviewer.md)

    • Wrapped gh pr diff in a command group with || true so expected SIGPIPE behavior from truncation does not fail the step.
    • Preserves streaming behavior and 3000-line cap.
  • Generated workflow sync (.github/workflows/mattpocock-skills-reviewer.lock.yml)

    • Recompiled lockfile to reflect the source workflow change.
  • Behavioral effect

    • Large diffs now truncate to /tmp/gh-aw/agent/pr-diff.patch without failing step 19.
    • Existing pre-fetch contract (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

Copilot AI and others added 2 commits May 21, 2026 15:26
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
Copilot AI requested a review from gh-aw-bot May 21, 2026 15:34
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main, make build, recompile using ./gh-aw

Copilot AI and others added 2 commits May 21, 2026 17:11
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot merge main, make build, recompile using ./gh-aw

Done in commits 5a58cbddb5 and bb242fa264: merged main, ran make build, and recompiled with ./gh-aw compile --fix --no-check-update .github/workflows/mattpocock-skills-reviewer.md.

Copilot AI requested a review from pelikhan May 21, 2026 17:12
@pelikhan pelikhan marked this pull request as ready for review May 21, 2026 17:20
Copilot AI review requested due to automatic review settings May 21, 2026 17:20
@pelikhan pelikhan merged commit 32f3a16 into main May 21, 2026
@pelikhan pelikhan deleted the copilot/aw-failures-fix-pre-fetch-diff branch May 21, 2026 17:20
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

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 3000 so truncation no longer fails the step due to SIGPIPE.
  • 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' \
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.

[aw-failures] Matt Pocock Skills Reviewer: 'Pre-fetch PR diff' step fails with SIGPIPE (exit 141) on large diffs

4 participants