Skip to content

Comments

Add fail-fast mode for code-push safe outputs#17543

Merged
pelikhan merged 5 commits intomainfrom
copilot/add-safe-output-fail-fast-mode
Feb 21, 2026
Merged

Add fail-fast mode for code-push safe outputs#17543
pelikhan merged 5 commits intomainfrom
copilot/add-safe-output-fail-fast-mode

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

When push_to_pull_request_branch or create_pull_request fails, the safe-output pipeline continued processing subsequent outputs (e.g. add_comment), producing misleading success-looking messages. This adds fail-fast detection that cancels remaining non-code-push outputs on failure and surfaces the error in the conclusion job.

Changes

  • safe_output_handler_manager.cjs — Defines CODE_PUSH_TYPES (push_to_pull_request_branch, create_pull_request). On failure (either success: false or exception), marks all subsequent non-code-push messages as cancelled: true with an explicit reason. Returns codePushFailures[] and exports code_push_failure_count / code_push_failure_errors step outputs. Summary logs now include a cancelled-message count.

  • handle_agent_failure.cjs — Reads GH_AW_CODE_PUSH_FAILURE_ERRORS / GH_AW_CODE_PUSH_FAILURE_COUNT. Adds buildCodePushFailureContext() and triggers failure-issue/comment creation when code-push failures are present (even if the agent job itself succeeded).

  • agent_failure_issue.md / agent_failure_comment.md — Added {code_push_failure_context} placeholder to both templates.

  • compiler_safe_outputs_job.go — Exposes code_push_failure_errors and code_push_failure_count as safe_outputs job outputs.

  • notify_comment.go — Passes GH_AW_CODE_PUSH_FAILURE_ERRORS / GH_AW_CODE_PUSH_FAILURE_COUNT env vars to the conclusion job when push-to-pull-request-branch or create-pull-request are configured.

  • Tests — 5 new cases in safe_output_handler_manager.test.cjs covering: fail on success: false, fail via exception, code-push types not cancelled by each other, successful path, no-op when no code-push types present.

Behaviour

push_to_pull_request_branch  → ✗ failed: Branch not found
                               ⚠️ Code push operation failed — remaining safe outputs will be cancelled
add_comment                  → ⏭ cancelled: Cancelled: code push operation failed (push_to_pull_request_branch: Branch not found)
create_issue                 → ⏭ cancelled: …

The conclusion job then receives the failure details and includes a ⚠️ Code Push Failed section in the agent failure issue/comment.

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 (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 GOPROXY 64/bin/go infocmp -1 xterm-color go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 GOMOD GOMODCACHE go k/gh�� -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD erignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 runs/20260221-180408-29472/test-3739430546/.github/workflows /tmp/go-build2016430586/b003/vet.cfg 6430586/b363/vet.cfg ck '**/*.cjs' '*git GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build2016430586/b243/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 5465743/b357/_pkgit GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha js (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 -json .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE es/.bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha auto-triage-issues.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-buildmode=exe GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-extld=gcc -uns�� runs/20260221-180408-29472/test-3806169482/.github/workflows /tmp/go-build2016430586/b046/vet.cfg 6430586/b337/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha g_.a GO111MODULE /opt/hostedtoolcache/go/1.25.0/x-test.short=true GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� 0nfHI1r4Y /tmp/go-build2016430586/b050/vet.cfg 6430586/b335/vet.cfg l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -b test-branch /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet 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 -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 6430586/b419/styles.test /tmp/go-build2016430586/b064/vet.cfg clusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -json GO111MODULE 64/bin/go 2Qt5lJ-lnkNpl/nHN5inHPfiWbQ29M6A5H/liMzR8Ds-CnfJ--jq rev-�� ry=1 sh ache/node/24.13.0/x64/bin/node npx prettier --cgit GOPROXY 64/bin/go /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet git conf�� --get remote.origin.url /usr/bin/gh -json GO111MODULE x_amd64/vet gh (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 js (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha r_manager.test.cjs (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD run-script/lib/n-unreachable=false node /hom�� --check **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-bool go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha k/gh-aw/gh-aw/pkg/timeutil/formaGOINSECURE k/gh-aw/gh-aw/pkg/timeutil/formaGOMOD 64/bin/go GOSUMDB GOWORK 64/bin/go WdoVr4iAs4gc -o /tmp/go-build4115465743/b415/_pkGOINSECURE -trimpath 64/bin/go -p github.com/githu-atomic -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha k/gh-aw/gh-aw/pkg/cli/access_logGOINSECURE k/gh-aw/gh-aw/pkg/cli/actionlintGOMOD 64/bin/go **/*.json --ignore-path ../../../.pretti-bool /opt/hostedtoolc-buildtags -o /tmp/go-build411-errorsas -trimpath 64/bin/go -p main -lang=go1.25 go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha (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 blog-auditor.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x-lang=go1.25 GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x-dwarf=false -uns�� runs/20260221-180408-29472/test-go1.25.0 /tmp/go-build2016430586/b057/vet-c=4 6430586/b341/vet.cfg l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x/tmp/go-build2016430586/b430/_testmain.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha th .prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 0/x64/bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build4082074417/b062/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/cli/access_log.go /home/REDACTED/work/gh-aw/gh-aw/pkg/cli/actionlint.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha js (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 -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build2016430586/b062/vet.cfg 6430586/b313/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha th .prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha r_manager.test.c-c=4 (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha r_manager.test.c-f (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha r_manager.test.cjs (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha ./cmd/gh-aw (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha r_manager.test.cjs (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile estl�� g_.a GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuorigin (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet estl�� -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json .cfg 64/pkg/tool/linu-buildmode=exe GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url (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 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c "prettier" --che-errorsas GOPROXY 64/bin/go GOSUMDB GOWORK 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 100 --write 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 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 x_amd64/vet env -json rty 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env ty-test.md .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha prettier --write 64/bin/go **/*.ts **/*.json --ignore-path sh -c npx prettier --wGOINSECURE git 64/bin/go tierignore x_amd64/vet /usr/bin/git go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (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 successfully" GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha prettier --write 64/bin/go **/*.ts **/*.json --ignore-path sh -c npx prettier --wGOINSECURE git de --show-toplevel x_amd64/vet /usr/bin/git go (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 GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE s9ZXZGY/X4XoDkfiiEtxJ64HjgrP (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 GOMOD run-script/lib/n-bool sh -c "prettier" --che-errorsas GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-errorsas sh 64/bin/go tierignore git 64/bin/go go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build2016430586/b380/cli.test /tmp/go-build2016430586/b380/cli.test -test.testlogfile=/tmp/go-build2016430586/b380/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE 5465743/b384/imp-buildtags -c 5465743/b384/emb-errorsas GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc-buildtags (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c "prettier" --che-errorsas GOPROXY 64/bin/go ettierignore GOWORK 64/bin/go go (http block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>Add safe-output fail-fast mode for code push operations</issue_title>
<issue_description>When push_to_pull_request_branch (or create_pull_request) fails, the safe-output pipeline still processes later outputs like add_comment.

Problem

This can post success-looking follow-up messages even though the code push failed. This causes confusion for both humans and non-humans.

Request

Add a configurable safe-output mode to run code-push outputs first and stop/skip the remaining safe outputs if a code-push output fails.

Expected behavior

  • Execute code-push safe outputs first (push_to_pull_request_branch, optionally create_pull_request).
  • If one fails, fail-fast the rest (or mark remaining outputs skipped with a clear reason).
  • Surface this clearly in step summary/logs.</issue_description>

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

@pelikhan @copilot - do not modify the ordering - detect that one of the code push safe output failed and report it into the agent failure issue/comment in the conclusion job - stop processing the rest of safe output with a clear cancelled message

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Changeset

  • Type: patch
  • Description: Fail fast when safe-output code-push steps fail and surface the code-push failure context in the agent conclusion.

Generated by Changeset Generator for issue #17543

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com


✨ PR Review Safe Output Test - Run 22262086355

💥 [THE END] — Illustrated by Smoke Claude

When push_to_pull_request_branch or create_pull_request fails, cancel
remaining non-code-push safe outputs with a clear reason and surface
the failure in the conclusion job's failure report.

- Add CODE_PUSH_TYPES constant and fail-fast logic in processMessages
- Export code_push_failure_count/errors outputs from handler manager
- Report failures in handle_agent_failure with new context builder
- Pass GH_AW_CODE_PUSH_FAILURE_* env vars to conclusion job
- Recompile all 157 workflows to include new outputs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add safe-output fail-fast mode for code push operations Add fail-fast mode for code-push safe outputs Feb 21, 2026
@pelikhan pelikhan marked this pull request as ready for review February 21, 2026 18:32
Copilot AI review requested due to automatic review settings February 21, 2026 18:32
@pelikhan pelikhan added the smoke label Feb 21, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

Copy link
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

This PR adds fail-fast mode for code-push safe outputs to prevent misleading success messages when push_to_pull_request_branch or create_pull_request operations fail. When a code-push operation fails, all subsequent non-code-push safe outputs are cancelled with clear messaging, and the failure details are surfaced in the conclusion job's agent failure issue/comment.

Changes:

  • Implements fail-fast logic that cancels remaining non-code-push outputs when code-push operations fail
  • Exports code-push failure details to the conclusion job for inclusion in failure notifications
  • Adds comprehensive test coverage for all fail-fast scenarios

Reviewed changes

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

Show a summary per file
File Description
actions/setup/js/safe_output_handler_manager.cjs Core fail-fast implementation: defines CODE_PUSH_TYPES, tracks failures, cancels subsequent messages, exports failure outputs
actions/setup/js/safe_output_handler_manager.test.cjs Adds 5 comprehensive test cases covering success:false, exceptions, code-push type exclusion, success path, and no-op scenarios
actions/setup/js/handle_agent_failure.cjs Integrates code-push failure context into failure issue/comment creation with buildCodePushFailureContext()
pkg/workflow/compiler_safe_outputs_job.go Exposes code_push_failure_errors and code_push_failure_count as safe_outputs job outputs
pkg/workflow/notify_comment.go Conditionally passes code-push failure env vars to conclusion job when relevant safe outputs are configured
actions/setup/md/agent_failure_issue.md Adds {code_push_failure_context} placeholder to failure issue template
actions/setup/md/agent_failure_comment.md Adds {code_push_failure_context} placeholder to failure comment template
.github/workflows/*.lock.yml Regenerated workflow files with new code_push_failure outputs consistently added across all workflows

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

@github-actions
Copy link
Contributor

✅ Commit pushed: 718c170

@github-actions
Copy link
Contributor

🤖 Smoke test §22262086343 results for @pelikhan:

  • GitHub MCP ✅ | GH CLI ✅ | Serena MCP ❌ | Playwright ✅
  • File write ✅ | Bash ✅ | Discussion comment ✅ | Build ✅
  • Discussion create ✅ | Haiku dispatch ✅ | PR review ✅

Overall: ⚠️ PARTIAL PASS (Serena MCP not available)

📰 BREAKING: Report filed by Smoke Copilot

Copy link
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.

This PR systematically adds code_push_failure_count and code_push_failure_errors outputs to the safe-outputs activation job across all compiled lock.yml workflows. The change is mechanical and consistent — every affected workflow gets the same two new output fields. This is a well-scoped, low-risk change that enables fail-fast detection for code-push operations.

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

PRs (merged):

  • refactor(workflow): relocate functions to correct domain files
  • fix: workflow-normalizer: remove grouping, consolidate findings in single issue
    GitHub MCP: ✅
    Serena MCP (activate/find_symbol): ❌ (tool connection closed)
    Playwright title check: ✅
    File write + cat: ✅
    Build (make build): ✅
    Overall: FAIL

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Contributor

✅ Commit pushed: ebd4389

@github-actions
Copy link
Contributor

Smoke Test Results - Run §22262086355

Test Status
1. GitHub MCP
2. Safe Inputs GH CLI
3. Serena MCP
4. Make Build
5. Playwright
6. Tavily Search
7. File Writing
8. Bash
9. Discussion Interaction
10. Agentic Workflows MCP
11. Update PR
12. PR Review Comments
13. Submit PR Review
14. Resolve Thread ⚠️ (already resolved)
15. Add Reviewer
16. Push to PR Branch
17. Close PR ⚠️ (no safe PR)

Overall: PARTIAL (15 ✅, 2 ⚠️ skipped, 0 ❌)

💥 [THE END] — Illustrated by Smoke Claude

Copy link
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! The fail-fast code-push implementation looks solid. Review comments address the changeset entry and the consistent output additions across lock files.

💥 [THE END] — Illustrated by Smoke Claude

@pelikhan pelikhan merged commit 972ffaf into main Feb 21, 2026
@pelikhan pelikhan deleted the copilot/add-safe-output-fail-fast-mode branch February 21, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add safe-output fail-fast mode for code push operations

2 participants