Skip to content

Fix incorrect aw.patch download path in push-failure fallback instructions - #17267

Merged
dsyme merged 4 commits into
mainfrom
copilot/fix-missing-aw-patch
Feb 20, 2026
Merged

dsyme merged 4 commits into
mainfrom
copilot/fix-missing-aw-patch

Conversation

Copilot AI commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

When git push fails during PR creation, a fallback issue is created with instructions to manually apply the patch. Those instructions referenced agent-artifacts/tmp/gh-aw/aw.patch — a path that doesn't exist after download.

actions/upload-artifact strips the longest common path prefix from all uploaded files. Since all artifacts share /tmp/gh-aw/ as a common parent, the patch is stored at the artifact root as aw.patch, not tmp/gh-aw/aw.patch. The download command also now uses -D /tmp/agent-artifacts-{runId} to avoid creating an agent-artifacts/ directory in the user's current repo.

Changes

  • actions/setup/js/create_pull_request.cjs: Fix the download path in the push-failure fallback issue body:
    - gh run download ${runId} -n agent-artifacts
    - # The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
    - git am agent-artifacts/tmp/gh-aw/aw.patch
    + gh run download ${runId} -n agent-artifacts -D /tmp/agent-artifacts-${runId}
    + git am /tmp/agent-artifacts-${runId}/aw.patch
  • scratchpad/safe-output-messages.md: Update matching documentation to reflect the correct path and -D flag usage.
Original prompt

This section details on the original issue you should resolve

<issue_title>aw.patch missing from agentic workflow run artifacts</issue_title>
<issue_description>In fsprojects/FSharp.Control.AsyncSeq#218 I received these instructions after PR creation failed

However aw.patch doesn't exist in the agent-artifacts. I don't think it's in any of the artifacts

I think maybe the emitted instructions need updating or there is a problem where the patch is just missing from uploaded artifacts.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/fsprojects/FSharp.Control.AsyncSeq/actions/runs/22231625810
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 22231625810 -n agent-artifacts

# The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
# Apply the patch
git am agent-artifacts/tmp/gh-aw/aw.patch

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

The artifact upload strips the common parent /tmp/gh-aw/ from paths, so
aw.patch is stored at the artifact root. Users should look for it at
agent-artifacts/aw.patch, not agent-artifacts/tmp/gh-aw/aw.patch.

Co-authored-by: dsyme <[email protected]>
Copilot AI changed the title [WIP] Fix missing aw.patch from agentic workflow run artifacts Fix incorrect aw.patch download path in push-failure fallback instructions Feb 20, 2026
@dsyme
dsyme marked this pull request as ready for review February 20, 2026 20:23
Copilot AI review requested due to automatic review settings February 20, 2026 20: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 fixes incorrect download path instructions in push-failure fallback messages. When git push fails during PR creation, users are given instructions to manually download and apply a patch file. The instructions incorrectly stated the patch would be at agent-artifacts/tmp/gh-aw/aw.patch, but actions/upload-artifact strips the common path prefix /tmp/gh-aw/ from all uploaded files, so the actual location is agent-artifacts/aw.patch.

Changes:

  • Updated fallback issue instructions to reference the correct patch download path
  • Updated documentation to reflect the correct artifact structure after download

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
actions/setup/js/create_pull_request.cjs Fixed patch path in push-failure fallback issue body from agent-artifacts/tmp/gh-aw/aw.patch to agent-artifacts/aw.patch
scratchpad/safe-output-messages.md Updated documentation examples to show correct patch path after artifact download

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

Comment thread scratchpad/safe-output-messages.md Resolved
…llution

Downloads to /tmp/agent-artifacts-{runId} instead of creating an
agent-artifacts/ directory in the current (repo) directory.

Co-authored-by: dsyme <[email protected]>
@dsyme
dsyme merged commit 6e480a8 into main Feb 20, 2026
47 checks passed
@dsyme
dsyme deleted the copilot/fix-missing-aw-patch branch February 20, 2026 20:58
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.patch missing from agentic workflow run artifacts

3 participants