Suppress failure-tracking issues from Build Failure Analysis workflows#8726
Merged
Merged
Conversation
The Build Failure Analysis workflow runs on every PR. Its AI agent is invoked unconditionally because gh-aw exposes no job-level `if:` hook to gate the auto-generated Copilot CLI step. On successful builds the agent immediately noops, but the upstream Copilot/AI service is intermittently flaky (`Failed to get response from the AI model`), so those otherwise-pointless invocations occasionally fail the run, which in turn opens a tracking issue (see #8685 and follow-ups). Set `safe-outputs.report-failure-as-issue: false` on both build-failure-analysis.md and build-failure-analysis-command.md. The workflow remains advisory: real analyses still post comments on legit build failures, and run-level failures stay visible in the Actions UI for investigation -- but transient AI flakes no longer spam tracking issues. Lock files regenerated with `gh aw compile --strict` (v0.75.4, the version pinned for the rest of the BFA lock files); the only effective change downstream is `GH_AW_FAILURE_REPORT_AS_ISSUE: false`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the gh-aw “Build Failure Analysis” advisory workflows to stop auto-filing failure-tracking issues when the Copilot/AI service flakes during otherwise-successful builds (e.g., issue #8685). The workflows will still fail visibly in the Actions UI, but will no longer spam [aw] ... failed tracking issues.
Changes:
- Set
safe-outputs.report-failure-as-issue: falsein both Build Failure Analysis workflow sources. - Regenerate both compiled
.lock.ymlfiles so they reflectGH_AW_FAILURE_REPORT_AS_ISSUE: "false".
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/build-failure-analysis.md | Disables gh-aw failure tracking issue creation via safe-outputs.report-failure-as-issue: false. |
| .github/workflows/build-failure-analysis.lock.yml | Regenerated compiled workflow; flips GH_AW_FAILURE_REPORT_AS_ISSUE to "false" and updates hashes/heredoc markers. |
| .github/workflows/build-failure-analysis-command.md | Mirrors the same failure-issue suppression for the slash-command variant. |
| .github/workflows/build-failure-analysis-command.lock.yml | Regenerated compiled workflow; flips GH_AW_FAILURE_REPORT_AS_ISSUE to "false" and updates hashes/heredoc markers. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0
Evangelink
commented
Jun 1, 2026
Evangelink
left a comment
Member
Author
There was a problem hiding this comment.
Review: Suppress failure-tracking issues from Build Failure Analysis workflows
| # | Dimension | Status | Severity |
|---|---|---|---|
| 1 | Algorithmic Correctness | ✅ N/A | - |
| 2 | Threading & Concurrency | ✅ N/A | - |
| 3 | Security & IPC Contract Safety | ✅ N/A | - |
| 4 | Public API & Binary Compatibility | ✅ N/A | - |
| 5 | Performance & Allocations | ✅ N/A | - |
| 6 | Cross-TFM Compatibility | ✅ N/A | - |
| 7 | Resource & IDisposable Management | ✅ N/A | - |
| 8 | Defensive Coding at Boundaries | ✅ N/A | - |
| 9 | Localization & Resources | ✅ N/A | - |
| 10 | Test Isolation | ✅ N/A | - |
| 11 | Assertion Quality | ✅ N/A | - |
| 12 | Flakiness Patterns | ✅ N/A | - |
| 13 | Test Completeness & Coverage | ✅ N/A | - |
| 14 | Data-Driven Test Coverage | ✅ N/A | - |
| 15 | Code Structure & Simplification | ✅ N/A | - |
| 16 | Naming & Conventions | ✅ N/A | - |
| 17 | Documentation Accuracy | ✅ Clean | - |
| 18 | Analyzer & Code Fix Quality | ✅ N/A | - |
| 19 | IPC Wire Compatibility | ✅ N/A | - |
| 20 | Build Infrastructure & Dependencies | ✅ Clean | - |
| 21 | Scope & PR Discipline | ✅ Clean | - |
✅ 21/21 dimensions clean — no findings.
Overall Assessment
The change is correct, safe, and well-motivated:
- Lock file consistency: Both
.lock.ymlfiles correctly reflect theGH_AW_FAILURE_REPORT_AS_ISSUE: "true" → "false"flip that corresponds toreport-failure-as-issue: falsein their respective.mdsources. The frontmatter hash updates are expected. - Motivation is sound: The PR description and inline comments accurately describe the root cause (unconditional agent invocation on every PR, transient AI service flakes producing spurious tracking issues). The referenced example run corroborates the scenario.
- Trade-off is acknowledged: The comment in
build-failure-analysis.mdexplicitly notes that run-level failures remain visible in the Actions UI, so genuine infrastructure failures are not silently swallowed — they just no longer auto-file issues. - gh-aw-sanctioned mechanism: Using the dedicated
report-failure-as-issue: falseswitch is the correct, first-party approach for this scenario rather than a workaround. - Scope is disciplined: The deeper fix (splitting build/agent jobs) is explicitly deferred with a concrete explanation of why it's non-trivial; no follow-up issues are needed since the PR description documents it clearly.
No actionable issues found.
Generated by Expert Code Review (on open) for issue #8726 · sonnet46 1.5M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stops the
Build Failure Analysisworkflow from spamming tracking issues (e.g. #8685) when its AI agent flakes on otherwise-successful builds.Why
The workflow runs on every PR. gh-aw does not expose a job-level
if:hook to gate the auto-generated Copilot CLI step, so the agent is invoked unconditionally; on successful builds it simply noops. Upstream the Copilot/AI service is intermittently flaky and returns "Failed to get response from the AI model"; when that happens during a noop call, the run is marked failed and the gh-aw safe-output machinery auto-files a[aw] Build Failure Analysis failedtracking issue.Example flake: https://github.com/microsoft/testfx/actions/runs/26727721772 -- build succeeded (0 errors), the binlog-mcp / NuGet MCP / dump-binlog steps correctly skipped (they are gated on
steps.build.outcome == ''failure''), butExecute GitHub Copilot CLIstill ran, retried 4 outer x 5 inner times, and exited 1 with "Last error: Unknown error".What
Adds
safe-outputs.report-failure-as-issue: falseto both:.github/workflows/build-failure-analysis.md.github/workflows/build-failure-analysis-command.mdThis is the gh-aw-sanctioned switch for exactly this scenario (the auto-generated tracking-issue body links to it as "Stop reporting this workflow as a failure"). The compiled change in both
.lock.ymlfiles is a single env-var flip (GH_AW_FAILURE_REPORT_AS_ISSUE: "true" -> "false"), plus the usual frontmatter-hash and prompt-heredoc-marker churn.The workflow stays advisory: real analyses still post PR comments / inline suggestion blocks on legit build failures, and any run-level failures remain visible in the Actions UI for anyone who wants to investigate.
Out of scope
A deeper fix (split the build into a separate job and gate the agent job on
needs.build.outputs.outcome == ''failure'') would also save the wasted AI API calls on successful builds, but: gh-aw applies the top-levelif:to theactivationjob rather than theagentjob (see.github/workflows/adhoc-qa.{md,lock.yml}),NuGet.Mcp.Serverwould need to be installed on both jobs, andGH_AW_BINLOG_PATHwould become invalid across jobs. That refactor can land separately if needed; this PR focuses on stopping the immediate issue spam.Lock files regenerated with
gh aw compile --strict(v0.75.4, the version pinned for the rest of the BFA lock files).