Skip to content

fix: post add_comment status update even when code push fails#22887

Merged
pelikhan merged 3 commits intomainfrom
copilot/fix-status-comment-for-safe-outputs
Mar 25, 2026
Merged

fix: post add_comment status update even when code push fails#22887
pelikhan merged 3 commits intomainfrom
copilot/fix-status-comment-for-safe-outputs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

When create_pull_request or push_to_pull_request_branch fails (e.g. git am patch application error), the fail-fast mechanism was cancelling all subsequent non-code-push safe outputs — including add_comment — leaving users with no status update in the issue or PR.

Changes

  • safe_output_handler_manager.cjs: Exempt add_comment from fail-fast cancellation. Instead, prepend a [!WARNING] callout to the comment body describing the failure before calling the handler. Consolidates both correction-note cases (codePushFallbackInfo and codePushFailures) into a single if (messageType === "add_comment") guard block.

  • safe_output_handler_manager.test.cjs: Updated two existing tests that expected add_comment to be cancelled — they now assert the handler is called with the failure note prepended. Added two new tests covering the failure-note prepend path for both create_pull_request and push_to_pull_request_branch failure scenarios.

The failure note format mirrors the existing fallback correction note pattern:

> [!WARNING]
> The `create_pull_request` operation failed: Failed to apply patch. The code changes were not applied.

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
    • Triggering command: /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 GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /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 git /usr/bin/git /usr/bin/git remo�� -v git /usr/bin/git --show-toplevel infocmp /usr/bin/git git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name 0611014/b414/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/loggenv GOMODCACHE go env sdFl/I7quLUnZ5FkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0611014/b414/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/link /usr/bin/git 83675/b417/fileugit GO111MODULE fg git rev-�� --show-toplevel IC8zTipfMwGSL/WqPmaxUgULkS6lBtndrk/cnjHJRsC75-1TI1_m0Vn/uTsMpJMIC8zTipfMwGSL /usr/bin/git -instructions-tegit GO111MODULE 83675/b417/_pkg_--show-toplevel git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --git-dir /tmp/go-build60483675/b438/_testmain.go /usr/bin/git -json GO111MODULE 64/bin/go git conf�� --get remote.origin.url /usr/bin/git -json GO111MODULE 64/bin/go /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-current git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git /opt/hostedtoolcache/node/24.14.0/x64/bin/node /tmp�� Actor: ${{ github.actor }}, Repo: ${{ github.repository }} git /usr/bin/git --show-toplevel infocmp /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -x c /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet - GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� ons-test3609221979 -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse otOrdering998718--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 7e59feeccfc4e534d7874732db743c5e799cf9803107d689-d GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/compile /usr/bin/git tmatter-with-envgit GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git PIJbBLrkR GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json main.go ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha k/gh-aw/gh-aw/.github/workflows/auto-triage-issues.md node /usr/bin/git --check **/*.cjs 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha k/gh-aw/gh-aw/.github/workflows/blog-auditor.md node /usr/bin/git with-tools.md --check 64/bin/go git rese�� HEAD .github/workflows/test.md /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /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 -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git 2639-33545/test-git GO111MODULE fg git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 0611014/b408/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/consenv GOMODCACHE go env GG8m/W0NlCmqVvzWGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0611014/b408/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build60483675/b420/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/doc.go /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/logger.go -c k/gh-aw/gh-aw/ac-p GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc-goversion (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha test/race-image:v1.0.0 node /usr/bin/git prettier --check 64/bin/go git add .github/workflows/test.md go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --get remote.origin.url /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha rhysd/actionlint:latest node /usr/bin/git --check **/*.cjs 64/bin/go git -C /tmp/gh-aw-test-runs/20260325-122639-33545/test-108874033 rev-parse /usr/bin/git @{u} GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha user.email test@example.com /usr/bin/git ithub-script/gitgit go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha 83675/b435/sliceutil.test GO111MODULE 83675/b435/importcfg.link GOINSECURE GOMOD GOMODCACHE 4vdN3eqAa1K0H/u1ogOOgsHoxcKHcseOEC/vKfaaJsUtRlxju1NbgiD/uvljh3C4vdN3eqAa1K0H env ry=1 GO111MODULE 83675/b435/_pkg_.a GOINSECURE GOMOD GOMODCACHE bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� runs/20260325-122939-38456/test-1336732607 git 2439387/b424/vet.cfg --show-toplevel dwFO3cBOLj36ZOwlrev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha runs/20260325-122639-33545/test-3429092370/.github/workflows GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go l GOMOD GOMODCACHE go 8367�� k/gh-aw/gh-aw/.github/workflows 83675/b070/_testmain.go 0/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha sistency_GoAndJavaScript3498365571/001/test-simple-frontmatter.md git /usr/bin/git pload-artifact/ggit 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel ogOOgsHoxcKHcseOrev-parse -d git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha 999 GO111MODULE 0/x64/bin/node GOINSECURE GOMOD GOMODCACHE tcfg -has�� ithub/workflows/agent-persona-explorer.md g/timeutil/format_test.go ache/node/24.14.0/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha runs/20260325-122939-38456/test-3404438649/.github/workflows git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� 2939-38456/test-1740772786 git /usr/bin/git --show-toplevel go -d git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 infocmp 64/pkg/tool/linux_amd64/vet xterm-color x_amd64/compile /usr/bin/git 64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 node /usr/bin/git /home/REDACTED/worgit go /usr/bin/git git rev-�� --show-toplevel git 0/x64/bin/node --show-toplevel x_amd64/vet /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git GOMODCACHE go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 /opt/hostedtoolcache/node/24.14.0/x64/bin/node 64/pkg/tool/linux_amd64/link github.event.inpgit x_amd64/compile /usr/bin/git 64/pkg/tool/linux_amd64/link rev-�� hutil.test git ortcfg.link --show-toplevel go /usr/bin/git dwFO3cBOLj36ZOwlHC/wPHmRHH07drGotDxh6_4/9rUbv3kNVNgnGPLEQds7 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 /usr/bin/git 64/pkg/tool/linux_amd64/vet --get-regexp ^remote\..*\.gh-rev-parse /usr/bin/git 64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE HC/wPHmRHH07drGotDxh6_4/9rUbv3kNVNgnGPLEQds7 (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 gh /usr/bin/git list --json /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 /usr/bin/git 64/pkg/tool/linux_amd64/link -v x_amd64/compile /usr/bin/git 64/pkg/tool/linux_amd64/link rev-�� ser.test git ortcfg.link --show-toplevel x_amd64/compile /usr/bin/git VNA0ktkNN8TXjoL3wQ/xfBuFHGQ9oCHhyK3NvLI/jUjen75r8Pl6L6O7RjPq (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path 0611014/b423/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env OfUC/fTDSWQ0p0uCGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0611014/b423/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_with_repos_array_c286752850/001 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel vsiWHJxF12LLI/8MBkAlss8NoqMJPDT0us/3YdcVDbgE0y5Gdx8vjli/alK5YuEvstatus /usr/bin/git ry=1 -buildtags 83675/b438/_pkg_user.name git rev-�� ub/workflows git /usr/bin/git /tmp/TestGuardPoinfocmp config ache/node/24.14.xterm-color git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha d53979b9dbd58c6b-d GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-p node 64/bin/go tierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel go /usr/bin/git ithub/workflows/git 83675/b411/_testconfig 0/x64/bin/node git rev-�� --show-toplevel 0/x64/bin/node /usr/bin/git : ${{ github.repgit -importcfg /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha a2020be0894fda63-d GOPROXY 64/bin/go GOSUMDB GOWORK run-script/lib/n/tmp/go-build60483675/b404/_pkg_.a sh -c "prettier" --che-p node 64/bin/go tierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha npx prettier --c--format=%H:%ct GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go node /hom�� --check scripts/**/*.js 64/bin/go -d /opt/hostedtoolc-C 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha prettier --check 64/bin/go **/*.ts **/*.json --ignore-path /bin/sh -c echo "��� JavaSc-p sh 64/bin/go -d /opt/hostedtoolcrev-parse 64/bin/go go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go 8Pl6L6O7RjPq /hom�� --check scripts/**/*.js b9bf0c2f8a8ddc5f-d .prettierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel git /usr/bin/git sistency_GoAndJa/tmp/go-build2292439387/b404/envutil.test log ache/node/24.14.-test.paniconexit0 git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git bility_SameInputgit -buildtags /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ithout_min-integrity1262920021/001 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel erignore /usr/bin/git git rev-�� ub/workflows git /usr/bin/git /tmp/compile-insgit config /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD igFiles,SwigCXXF--show-toplevel go env 3429092370/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion test/race-image:git x_amd64/vet /usr/bin/git git t-ha�� vaScript3498365571/001/test-comp.github/workflows/test.md git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE b/gh-aw/pkg/timeenv GOMODCACHE go env Q-eU/ZpLY0UQ8eaBGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0611014/b432/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE b/gh-aw/scripts GOMODCACHE go env a820/Vgx0-6pZlp3GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD run-script/lib/n--noprofile 0611014/b437/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/git runs/20260325-12git GO111MODULE /home/REDACTED/go/--show-toplevel git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build60483675/b402/cli.test /tmp/go-build60483675/b402/cli.test -test.testlogfile=/tmp/go-build60483675/b402/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true /tmp/go-build3508599884/b386/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/scripts/lint_error_messages.go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /tmp/go-build2292439387/b001/cli.test /tmp/go-build2292439387/b001/cli.test -test.testlogfile=/tmp/go-build2292439387/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 83675/b404/_pkg_git fg 83675/b404=> git rev-�� --show-toplevel go /usr/bin/git licyMinIntegritygit GO111MODULE (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name 0611014/b393/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 20w3/5LmFlUGvs7qGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0611014/b393/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel go /usr/bin/git iZ1g/bsykjXuAkNugit GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel 8599884/b393/importcfg /usr/bin/git ithub-script/gitgit GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� de/node/bin/git git tions/setup/js/node_modules/.bin/git user.email test@example.comcheckout /git git bran�� -M main k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/git /tmp/bare-incremgit gin/feature-branadd cal/bin/git git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.



✨ PR Review Safe Output Test - Run 23541048104

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

💥 [THE END] — Illustrated by Smoke Claude ·

Copilot AI changed the title [WIP] Fix status comment for safe outputs failure in patch application fix: post add_comment status update even when code push fails Mar 25, 2026
Copilot AI requested a review from pelikhan March 25, 2026 12:33
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

  • #22887 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

💥 [THE END] — Illustrated by Smoke Claude

@pelikhan pelikhan marked this pull request as ready for review March 25, 2026 14:01
Copilot AI review requested due to automatic review settings March 25, 2026 14:01
@pelikhan pelikhan merged commit 9b0a907 into main Mar 25, 2026
109 checks passed
@pelikhan pelikhan deleted the copilot/fix-status-comment-for-safe-outputs branch March 25, 2026 14:04
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

Ensures users still receive an add_comment status update even when a preceding code-push operation fails, by allowing comments through fail-fast cancellation and annotating them with a failure warning.

Changes:

  • Exempt add_comment from fail-fast cancellation after code-push failures.
  • Prepend a GitHub [!WARNING] note to add_comment bodies when code-push fails (and consolidate note-prepend logic).
  • Update and extend unit tests to assert add_comment is posted with the warning annotation.

Reviewed changes

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

File Description
actions/setup/js/safe_output_handler_manager.cjs Allows add_comment to proceed after code-push failure and prepends a failure warning note.
actions/setup/js/safe_output_handler_manager.test.cjs Updates existing fail-fast tests and adds new coverage for the warning-prepend behavior.
.changeset/patch-add-comment-not-cancelled-on-code-push-failure.md Adds a patch changeset describing the user-visible behavior change.

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

// prepend a failure warning so the status comment accurately reflects that the
// code changes were not applied.
if (codePushFailures.length > 0) {
const failure = codePushFailures[0];
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_comment failure annotation always uses codePushFailures[0]. If multiple code-push operations occur (they’re explicitly not cancelled) or a later code-push succeeds, the warning can become stale/misleading (e.g., it may report an earlier failure even though a later create_pull_request succeeded). Consider tracking the most recent code-push outcome (e.g., use the last failure, and/or clear the failure state on subsequent code-push success) so the comment reflects the final state users care about.

Suggested change
const failure = codePushFailures[0];
const failure = codePushFailures[codePushFailures.length - 1];

Copilot uses AI. Check for mistakes.
Comment on lines +471 to +473
const failureNote = `\n\n---\n> [!WARNING]\n> The \`${failure.type}\` operation failed: ${failure.error}. The code changes were not applied.\n\n`;
effectiveMessage = { ...effectiveMessage, body: failureNote + (effectiveMessage.body || "") };
core.info(`Prepending code push failure note to add_comment body (${failure.type}: ${failure.error})`);
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failure.error is interpolated directly into a GitHub callout blockquote. If the error message contains newlines, only the first line will be inside the > [!WARNING] blockquote and the remaining lines will render outside the callout (and can disrupt formatting). Consider normalizing multi-line errors for markdown (e.g., prefix each line consistently within the quote, or wrap details in a <details> / code block) before prepending.

Suggested change
const failureNote = `\n\n---\n> [!WARNING]\n> The \`${failure.type}\` operation failed: ${failure.error}. The code changes were not applied.\n\n`;
effectiveMessage = { ...effectiveMessage, body: failureNote + (effectiveMessage.body || "") };
core.info(`Prepending code push failure note to add_comment body (${failure.type}: ${failure.error})`);
const failureErrorText = typeof failure.error === "string" ? failure.error : String(failure.error);
const normalizedFailureError = failureErrorText.replace(/\r?\n/g, "\n> ");
const failureNote = `\n\n---\n> [!WARNING]\n> The \`${failure.type}\` operation failed: ${normalizedFailureError}. The code changes were not applied.\n\n`;
effectiveMessage = { ...effectiveMessage, body: failureNote + (effectiveMessage.body || "") };
core.info(`Prepending code push failure note to add_comment body (${failure.type}: ${normalizedFailureError})`);

Copilot uses AI. Check for mistakes.
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.

3 participants