Conversation
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
| GH_AW_PHASE: agent | ||
| GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt | ||
| GH_AW_VERSION: f11a70f | ||
| GH_AW_VERSION: f577008 |
There was a problem hiding this comment.
Version bump looks good — f577008 is the new commit SHA for the GH_AW_VERSION env var. Automated smoke test review comment #1.
| GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt | ||
| GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} | ||
| GH_AW_VERSION: f11a70f | ||
| GH_AW_VERSION: f577008 |
There was a problem hiding this comment.
Version update confirmed for agent-performance-analyzer workflow. Both agent and detection phases updated to the same version. Automated smoke test review comment #2.
…reate_pull_request / push_to_pull_request_branch
7e91dbe to
645191c
Compare
There was a problem hiding this comment.
Pull request overview
Improves failure reporting for git am patch-apply failures (typically merge conflicts) during create_pull_request / push_to_pull_request_branch by adding a dedicated error category and remediation instructions, including optional workflow run–specific patch download commands.
Changes:
- Add a new “Patch Apply Failed” error bucket in
buildCodePushFailureContext, detected via"Failed to apply patch". - Render a dedicated
🔀 Patch Apply Failedsection with manual recovery steps and optional run-ID-basedgh run downloadinstructions. - Add test coverage for detection and formatting behavior (with/without PR and run URL, plus mixed errors).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| actions/setup/js/handle_agent_failure.cjs | Adds patch-apply failure categorization and a new remediation section; threads runUrl into context builder. |
| actions/setup/js/handle_agent_failure.test.cjs | Adds tests validating the new patch-apply failure section and runUrl-dependent instructions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| context += `# git am --3way --continue\n\n`; | ||
| context += `# Push and create a pull request\n`; | ||
| context += `git push origin aw/manual-apply\n`; | ||
| context += `gh pr create --base main --head aw/manual-apply\n`; |
There was a problem hiding this comment.
The manual recovery instructions hardcode --base main in the gh pr create step. Since this action can run in repos where the default/base branch is not main, the generated guidance may fail or create a PR against the wrong base. Consider either (a) using a placeholder like <base-branch> in the text, (b) omitting --base and letting gh use the repo default, or (c) deriving the base branch from available context (e.g., workflow inputs/env) and interpolating it.
| context += `gh pr create --base main --head aw/manual-apply\n`; | |
| context += `gh pr create --head aw/manual-apply\n`; |
| context += `# If there are conflicts, resolve them and continue:\n`; | ||
| context += `# git am --3way --continue\n\n`; |
There was a problem hiding this comment.
In the conflict-resolution hint, git am --3way --continue is misleading: --3way is only relevant when initially applying the patch, while the normal follow-up command after resolving conflicts is git am --continue (and optionally git am --abort to back out). Adjusting this avoids users copy/pasting a command that may not behave as intended.
| context += `# If there are conflicts, resolve them and continue:\n`; | |
| context += `# git am --3way --continue\n\n`; | |
| context += `# If there are conflicts, resolve them and continue (or abort):\n`; | |
| context += `# git am --continue\n`; | |
| context += `# git am --abort\n\n`; |
When
git amfails to apply a patch (typically a merge conflict), the failure issue showed a generic "Code Push Failed" message with no recovery path. Users had no instructions for manually retrieving and applying the agent's changes.Changes
handle_agent_failure.cjs: AddedpatchApplyErrorsas a distinct error category inbuildCodePushFailureContext, detected by matching"Failed to apply patch"— the error bothcreate_pull_requestandpush_to_pull_request_branchreturn ongit amfailure. Added a🔀 Patch Apply Failedsection with a merge-conflict explanation and step-by-step shell instructions to download the patch artifact and apply it manually. ThreadsrunUrlthrough as a new 3rd parameter so the exact run ID is embedded in thegh run downloadcommand.handle_agent_failure.test.cjs: 8 new tests covering detection, PR link inclusion, instructions with/withoutrunUrl, and mixed-error scenarios.Example output (new section in failure issue)
🔀 Patch Apply Failed: The patch could not be applied to the current state of the repository. This is typically caused by a merge conflict between the agent's changes and recent commits on the target branch.
Failed Operations:
create_pull_request: Failed to apply patchTo manually apply the patch:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha /tmp/go-build2295522419/b422/styles.test -importcfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -s -w -buildmode=exe /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build2295522419/b110/vet.cfg /usr/bin/git */*.ts' '**/*.jsgit lan for patch aprev-parse x_amd64/vet git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -unreachable=false /tmp/go-build2295522419/b117/vet.cfg 5522419/b388/vet.cfg w/js/**/*.json' git andle_agent_failrev-parse sh /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu--json -uns�� -unreachable=false /tmp/go-build2295522419/b228/vet.cfg ache/node/24.14.0/x64/bin/node orter=verbose(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha g_.a(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel -tests /usr/bin/git set-url origin x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git --noprofile(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git heck '**/*.cjs' git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha a820/Vgx0-6pZlp38hwO9a820 config /usr/bin/git remote.origin.urgit(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 2486898191/.githgit .cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git ck '**/*.cjs' '*git o 64/pkg/tool/linu--show-toplevel git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ./../pkg/workflow/js/**/*.json' --ignore-path(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ./../pkg/workflo-errorsas(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha k/gh-aw/gh-aw/pkg/stringutil/ansi.go k/gh-aw/gh-aw/pkg/stringutil/identifiers.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260310-223602-15155/test-3465071835/.github/workflows rev-parse /tmp/go-build2295522419/b416/sliceutil.test(http block)https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha 580709143/001(http block)https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts/usr/bin/gh gh run download 1 --dir test-logs/run-1 -v x_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts/usr/bin/gh gh run download 12345 --dir test-logs/run-12345(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts/usr/bin/gh gh run download 12346 --dir test-logs/run-12346 zation_test.go x_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts/usr/bin/gh gh run download 2 --dir test-logs/run-2 -v 64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts/usr/bin/gh gh run download 3 --dir test-logs/run-3 -v 64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts/usr/bin/gh gh run download 4 --dir test-logs/run-4 -v x_amd64/link(http block)https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts/usr/bin/gh gh run download 5 --dir test-logs/run-5 -v x_amd64/compile(http block)https://api.github.com/repos/github/gh-aw/actions/workflows/usr/bin/gh gh workflow list --json name,state,path(http block)https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js git cal/bin/git git form�� origin/auth-cleanup-success..auth-cleanup-success --stdout ndor/bin/git /git git k/_temp/ghcca-no--verify git(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --noprofile(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha get --global ndor/bin/sh http.https://git/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha get --global /home/REDACTED/.config/composer/ve--ignore-path http.https://git/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha get --global 0/x64/bin/npx http.https://git/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha get --global tions/setup/node_modules/.bin/no--ignore-path http.https://git/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha get --global ache/uv/0.10.9/x86_64/git http.https://git/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha tmatter-with-arrays.md(http block)https://api.github.com/repos/nonexistent/repo/actions/runs/12345/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --detach(http block)https://api.github.com/repos/owner/repo/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ache/uv/0.10.9/x-lang=go1.16(http block)/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ode_modules/.bin-lang=go1.17(http block)https://api.github.com/repos/owner/repo/contents/file.md/tmp/go-build2295522419/b383/cli.test /tmp/go-build2295522419/b383/cli.test -test.testlogfile=/tmp/go-build2295522419/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true(http block)https://api.github.com/repos/test-owner/test-repo/actions/secrets/usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name(http block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 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.
✨ PR Review Safe Output Test - Run 22931244277