Surface GitHub App authentication failures as explicit errors in agent failure issues#21424
Surface GitHub App authentication failures as explicit errors in agent failure issues#21424
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Hey A few things to address before this is ready for review:
If you'd like a hand finishing the implementation, you can assign this prompt to your coding agent:
|
…issue Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ng_failed.md Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Surface GitHub App authentication (installation token minting) failures as explicit, actionable context in the agent failure issue/comment generated from the conclusion job.
Changes:
- Expose GitHub App token minting failure status as job outputs for
safe_outputsandactivation, and as a step outcome flag for the conclusion job. - Ensure the “Handle Agent Failure” step runs even if earlier conclusion steps (notably GitHub App token minting) fail by adding
if: always(). - Extend
handle_agent_failure.cjsand templates to render a dedicated GitHub App auth failure section, with tests and a new markdown prompt.
Reviewed changes
Copilot reviewed 177 out of 177 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/safe_outputs_steps.go | Adds optional step-level if: support for github-script steps (used to force failure handling to run). |
| pkg/workflow/notify_comment.go | Wires new env vars for app token minting failure flags; sets “Handle Agent Failure” to always(). |
| pkg/workflow/compiler_safe_outputs_job.go | Exposes app_token_minting_failed as a safe_outputs job output (derived from token step outcome). |
| pkg/workflow/compiler_activation_job.go | Exposes activation_app_token_minting_failed as an activation job output (derived from token step outcome). |
| actions/setup/md/app_token_minting_failed.md | New prompt content describing common GitHub App auth misconfiguration causes and remediation. |
| actions/setup/md/agent_failure_issue.md | Adds {app_token_minting_failed_context} placeholder into the issue template. |
| actions/setup/md/agent_failure_comment.md | Adds {app_token_minting_failed_context} placeholder into the comment template. |
| actions/setup/js/handle_agent_failure.test.cjs | Adds unit tests for the new GitHub App token minting failure context builder. |
| actions/setup/js/handle_agent_failure.cjs | Adds buildAppTokenMintingFailedContext() and triggers failure reporting when token minting fails even if agent didn’t. |
| .github/workflows/workflow-skill-extractor.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/workflow-normalizer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/workflow-health-manager.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/workflow-generator.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/weekly-issue-summary.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/weekly-editors-health-check.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/video-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/update-astro.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/unbloat-docs.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/typist.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/tidy.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/test-project-url-default.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/test-dispatcher.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/test-create-pr-error-handling.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/terminal-stylist.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/technical-doc-writer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/super-linter.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/sub-issue-closer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/step-name-alignment.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/static-analysis-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/stale-repo-identifier.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-workflow-call.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-test-tools.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-temporary-id.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-project.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-multi-pr.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-gemini.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-copilot.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-copilot-arm.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-codex.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-claude.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-call-workflow.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-agent-scoped-approved.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-agent-public-none.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-agent-public-approved.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-agent-all-none.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/smoke-agent-all-merged.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/slide-deck-maintainer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/sergo.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/semantic-function-refactor.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/security-review.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/security-compliance.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/security-alert-burndown.campaign.g.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/scout.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/schema-consistency-checker.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/safe-output-health.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/research.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/repository-quality-improver.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/repo-tree-map.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/repo-audit-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/release.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/refiner.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/q.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/python-data-charts.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/pr-triage-agent.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/portfolio-analyst.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/poem-bot.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/plan.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/pdf-summary.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/org-health-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/notion-issue-summary.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/mergefest.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/mcp-inspector.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/lockfile-stats.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/layout-spec-maintainer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/jsweep.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/issue-triage-agent.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/issue-monster.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/issue-arborist.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/instructions-janitor.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/hourly-ci-cleaner.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/grumpy-reviewer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/gpclean.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/go-pattern-detector.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/go-logger.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/go-fan.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/glossary-maintainer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/github-mcp-tools-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/functional-pragmatist.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/firewall-escape.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/example-workflow-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/duplicate-code-detector.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/draft-pr-cleanup.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/docs-noob-tester.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/discussion-task-miner.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dictation-prompt.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/developer-docs-consolidator.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dev.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dev-hawk.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dependabot-go-checker.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dependabot-burner.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/delight.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/deep-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/dead-code-remover.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/daily-workflow-updater.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Adds if: always() plus passes safe_outputs/conclusion/activation token minting failure flags and exposes safe_outputs output. |
| .github/workflows/daily-team-status.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-team-evolution-insights.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-semgrep-scan.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-security-red-team.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-secrets-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/daily-safe-output-integrator.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-repo-chronicle.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/daily-regulatory.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-performance-summary.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-observability-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-news.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Adds if: always() plus passes safe_outputs/conclusion token minting failure flags and exposes safe_outputs output. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-issues-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-function-namer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-firewall-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-file-diet.lock.yml | Adds if: always() plus passes safe_outputs/conclusion/activation token minting failure flags and exposes safe_outputs output. |
| .github/workflows/daily-fact.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-doc-updater.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-doc-healer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-copilot-token-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-compiler-quality.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-code-metrics.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-cli-performance.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-choice-test.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/daily-architecture-diagram.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/craft.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-session-insights.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/copilot-agent-analysis.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/contribution-check.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/constraint-solving-potd.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/commit-changes-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/code-simplifier.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/code-scanning-fixer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/cloclo.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/cli-version-checker.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/cli-consistency-checker.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/claude-code-user-docs-review.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/ci-doctor.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/ci-coach.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/changeset.lock.yml | Adds if: always() and exposes safe_outputs app_token_minting_failed output where present. |
| .github/workflows/breaking-change-checker.lock.yml | Ensures “Handle Agent Failure” runs with if: always() and wires activation token minting failure env var where present. |
| .github/workflows/brave.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/bot-detection.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/blog-auditor.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/auto-triage-issues.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/audit-workflows.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/artifacts-summary.lock.yml | Adds if: always() plus passes safe_outputs/conclusion token minting failure flags and exposes safe_outputs output. |
| .github/workflows/archie.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/ai-moderator.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/agent-persona-explorer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
| .github/workflows/agent-performance-analyzer.lock.yml | Ensures “Handle Agent Failure” runs with if: always() in compiled workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| // StepCondition is an optional `if:` expression for the step. | ||
| // When non-empty, `if: {StepCondition}` is inserted after the step ID so the | ||
| // step runs only when the condition is true. Use "always()" to run even after | ||
| // earlier steps in the same job have failed. | ||
| StepCondition string |
| Agent job [{run_id}]({run_url}) failed. | ||
|
|
||
| {secret_verification_context}{inference_access_error_context}{assignment_errors_context}{create_discussion_errors_context}{code_push_failure_context}{repo_memory_validation_context}{push_repo_memory_failure_context}{missing_data_context}{missing_safe_outputs_context}{timeout_context}{fork_context} | ||
| {secret_verification_context}{inference_access_error_context}{app_token_minting_failed_context}{assignment_errors_context}{create_discussion_errors_context}{code_push_failure_context}{repo_memory_validation_context}{push_repo_memory_failure_context}{missing_data_context}{missing_safe_outputs_context}{timeout_context}{fork_context} |
When a GitHub App token minting step fails (bad credentials, missing installation, wrong permissions), the failure was silent — the safe_outputs or conclusion job would fail with no actionable message in the failure tracking issue.
Changes
Output tracking for token minting outcomes
compiler_safe_outputs_job.go: Exposesapp_token_minting_failedas a job output (steps.safe-outputs-app-token.outcome == 'failure') whensafe-outputs.github-appis configuredcompiler_activation_job.go: Exposesactivation_app_token_minting_failedsimilarly for the activation job'son.github-apptoken stepConclusion job wiring
notify_comment.go: Passes three new env vars to the Handle Agent Failure step —GH_AW_SAFE_OUTPUTS_APP_TOKEN_MINTING_FAILED,GH_AW_CONCLUSION_APP_TOKEN_MINTING_FAILED(conclusion job's own step outcome), andGH_AW_ACTIVATION_APP_TOKEN_MINTING_FAILEDStepCondition: "always()"to the Handle Agent Failure step so it runs even when the conclusion job's own GitHub App token step fails (they share the same credentials)Step condition support
safe_outputs_steps.go: AddedStepCondition stringfield toGitHubScriptStepConfig;buildGitHubScriptStepWithoutDownloademitsif: {condition}when setFailure message
handle_agent_failure.cjs: AddsbuildAppTokenMintingFailedContext()— emitted when any of the three token flags istrue. Triggers issue creation even when agent conclusion is notfailure. Error message lists the four common causes (App ID, private key, installation, permissions).agent_failure_issue.md/agent_failure_comment.md: Added{app_token_minting_failed_context}placeholder after{inference_access_error_context}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)/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 ation_test.go 64/bin/git bash --no�� h ../../../.prettierignore(http block)/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 ation_test.go p/bin/git bash tdat�� h ../../../.pret.prettierignore(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha th .prettierignoremote.origin.url *_test.go $name) { hasDiscussionsEnabled } } p_workflow_test.git b_toolset_integr-C x86_64/grep bash ode_�� --noprofile git tions/setup/node_modules/.bin/sh ation g/workflow/compi-1 x86_64/bash git(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha th .prettierignoremote.origin.url er_id_test.go $name) { hasDiscussionsEnabled } } p_workflow_test.infocmp s $k => $v) echo-1 cal/bin/bash bash ode_�� --noprofile git de_modules/.bin/sh ation g/workflow/compi-C g/workflow/compi/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha h ../../../.pret.prettierignore(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .visibility(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --noprofile(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.