Skip to content

[aw] PR Code Quality Reviewer failed #51140

Description

@github-actions

Workflow Failure

Workflow: PR Code Quality Reviewer
Branch: copilot/code-quality-reuse-templatable-bool
Run: https://github.com/github/gh-aw/actions/runs/31198445994
Pull Request: #51097

Warning

Engine Failure: The copilot engine terminated unexpectedly.

Last agent output:

{"type":"tool.execution_complete","timestamp":"2026-08-07T16:46:44.807Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"155:\tif reportFailureAsIssue, exists := outputMap[\"report-failure-as-issue\"]; exists {\n157:\t\tif categoriesList, ok := reportFailureAsIssue.([]any); ok {\n159:\t\t\tincludedCategories := make([]string, 0, len(categoriesList))\n160:\t\t\texcludedCategories := make([]string, 0, len(categoriesList))\n165:\t\t\t\t\t\texcludedCategories = append(excludedCategories, category)\n168:\t\t\t\t\t\tincludedCategories = append(includedCategories, catStr)\n173:\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n174:\t\t\tconfig.ReportFailureAsIssueCategories = includedCategories\n175:\t\t\tconfig.ReportFailureAsIssueExcludedCategories = excludedCategories\n176:\t\t\tif len(includedCategories) > 0 && len(excludedCategories) > 0 {\n177:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v, exclude filter: %v\", includedCategories, excludedCategories)\n178:\t\t\t} else if len(includedCategories) > 0 {\n179:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v\", includedCategories)\n180:\t\t\t} else if len(excludedCategories) > 0 {\n181:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with exclude filter: %v\", excludedCategories)\n188:\t\t\t\tif reportFailureAsIssueStr, ok := outputMap[\"report-failure-as-issue\"].(string); ok {\n189:\t\t\t\t\treportAsIssue := TemplatableBool(reportFailureAsIssueStr)\n190:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n192:\t\t\t\t} else if reportFailureAsIssueBool, ok := outputMap[\"report-failure-as-issue\"].(bool); ok {\n193:\t\t\t\t\treportAsIssue := TemplatableBool(strconv.FormatBool(reportFailureAsIssueBool))\n194:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n195:\t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %t\", reportFailureAsIssueBool)\n<shellId: 30 completed with exit code 0>","detailedContent":"155:\tif reportFailureAsIssue, exists := outputMap[\"report-failure-as-issue\"]; exists {\n157:\t\tif categoriesList, ok := reportFailureAsIssue.([]any); ok {\n159:\t\t\tincludedCategories := make([]string, 0, len(categoriesList))\n160:\t\t\texcludedCategories := make([]string, 0, len(categoriesList))\n165:\t\t\t\t\t\texcludedCategories = append(excludedCategories, category)\n168:\t\t\t\t\t\tincludedCategories = append(includedCategories, catStr)\n173:\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n174:\t\t\tconfig.ReportFailureAsIssueCategories = includedCategories\n175:\t\t\tconfig.ReportFailureAsIssueExcludedCategories = excludedCategories\n176:\t\t\tif len(includedCategories) > 0 && len(excludedCategories) > 0 {\n177:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v, exclude filter: %v\", includedCategories, excludedCategories)\n178:\t\t\t} else if len(includedCategories) > 0 {\n179:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v\", includedCategories)\n180:\t\t\t} else if len(excludedCategories) > 0 {\n181:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with exclude filter: %v\", excludedCategories)\n188:\t\t\t\tif reportFailureAsIssueStr, ok := outputMap[\"report-failure-as-issue\"].(string); ok {\n189:\t\t\t\t\treportAsIssue := TemplatableBool(reportFailureAsIssueStr)\n190:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n192:\t\t\t\t} else if reportFailureAsIssueBool, ok := outputMap[\"report-failure-as-issue\"].(bool); ok {\n193:\t\t\t\t\treportAsIssue := TemplatableBool(strconv.FormatBool(reportFailureAsIssueBool))\n194:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n195:\t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %t\", reportFailureAsIssueBool)\n<shellId: 30 completed with exit code 0>","contents":[{"type":"shell_exit","shellId":"30","exitCode":0,"outputTruncated":false,"cwd":"/home/runner/work/gh-aw/gh-aw","outputPreview":"155:\tif reportFailureAsIssue, exists := outputMap[\"report-failure-as-issue\"]; exists {\n157:\t\tif categoriesList, ok := reportFailureAsIssue.([]any); ok {\n159:\t\t\tincludedCategories := make([]string, 0, len(categoriesList))\n160:\t\t\texcludedCategories := make([]string, 0, len(categoriesList))\n165:\t\t\t\t\t\texcludedCategories = append(excludedCategories, category)\n168:\t\t\t\t\t\tincludedCategories = append(includedCategories, catStr)\n173:\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n174:\t\t\tconfig.ReportFailureAsIssueCategories = includedCategories\n175:\t\t\tconfig.ReportFailureAsIssueExcludedCategories = excludedCategories\n176:\t\t\tif len(includedCategories) > 0 && len(excludedCategories) > 0 {\n177:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v, exclude filter: %v\", includedCategories, excludedCategories)\n178:\t\t\t} else if len(includedCategories) > 0 {\n179:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v\", includedCategories)\n180:\t\t\t} else if len(excludedCategories) > 0 {\n181:\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with exclude filter: %v\", excludedCategories)\n188:\t\t\t\tif reportFailureAsIssueStr, ok := outputMap[\"report-failure-as-issue\"].(string); ok {\n189:\t\t\t\t\treportAsIssue := TemplatableBool(reportFailureAsIssueStr)\n190:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n192:\t\t\t\t} else if reportFailureAsIssueBool, ok := outputMap[\"report-failure-as-issue\"].(bool); ok {\n193:\t\t\t\t\treportAsIssue := TemplatableBool(strconv.FormatBool(reportFailureAsIssueBool))\n194:\t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n195:\t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %t\", reportFailureAsIssueBool)\n"}]}}}
{"type":"assistant.message","timestamp":"2026-08-07T16:46:48.116Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-07T16:46:48.117Z","data":{"toolName":"view","mcpServerName":""}}
{"type":"tool.execution_complete","timestamp":"2026-08-07T16:46:48.168Z","data":{"toolName":"view","mcpServerName":"","success":true,"result":{"content":"145. \n146. \t// Handle group-reports flag\n147. \tif groupReports, exists := outputMap[\"group-reports\"]; exists {\n148. \t\tif groupReportsBool, ok := groupReports.(bool); ok {\n149. \t\t\tconfig.GroupReports = groupReportsBool\n150. \t\t\tsafeOutputsConfigLog.Printf(\"Group reports control: %t\", groupReportsBool)\n151. \t\t}\n152. \t}\n153. \n154. \t// Handle report-failure-as-issue as templatable bool or array of categories.\n155. \tif reportFailureAsIssue, exists := outputMap[\"report-failure-as-issue\"]; exists {\n156. \t\t// Support []any category filters.\n157. \t\tif categoriesList, ok := reportFailureAsIssue.([]any); ok {\n158. \t\t\t// Parse as array of category strings, separating included (no prefix) and excluded (! prefix)\n159. \t\t\tincludedCategories := make([]string, 0, len(categoriesList))\n160. \t\t\texcludedCategories := make([]string, 0, len(categoriesList))\n161. \t\t\tfor _, cat := range categoriesList {\n162. \t\t\t\tif catStr, ok := cat.(string); ok {\n163. \t\t\t\t\tif category, isExcluded := strings.CutPrefix(catStr, \"!\"); isExcluded {\n164. \t\t\t\t\t\t// Excluded category: \"!\" prefix was found and removed\n165. \t\t\t\t\t\texcludedCategories = append(excludedCategories, category)\n166. \t\t\t\t\t} else {\n167. \t\t\t\t\t\t// Included category: no prefix\n168. \t\t\t\t\t\tincludedCategories = append(includedCategories, catStr)\n169. \t\t\t\t\t}\n170. \t\t\t\t}\n171. \t\t\t}\n172. \t\t\treportAsIssue := TemplatableBool(\"true\")\n173. \t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n174. \t\t\tconfig.ReportFailureAsIssueCategories = includedCategories\n175. \t\t\tconfig.ReportFailureAsIssueExcludedCategories = excludedCategories\n176. \t\t\tif len(includedCategories) > 0 && len(excludedCategories) > 0 {\n177. \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v, exclude filter: %v\", includedCategories, excludedCategories)\n178. \t\t\t} else if len(includedCategories) > 0 {\n179. \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v\", includedCategories)\n180. \t\t\t} else if len(excludedCategories) > 0 {\n181. \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with exclude filter: %v\", excludedCategories)\n182. \t\t\t}\n183. \t\t} else {\n184. \t\t\t// Support bool and templatable string values.\n185. \t\t\tif err := preprocessBoolFieldAsString(outputMap, \"report-failure-as-issue\", safeOutputsConfigLog); err != nil {\n186. \t\t\t\tsafeOutputsConfigLog.Printf(\"Failed to preprocess report-failure-as-issue field: %v (ignoring invalid value and leaving field unset)\", err)\n187. \t\t\t} else {\n188. \t\t\t\tif reportFailureAsIssueStr, ok := outputMap[\"report-failure-as-issue\"].(string); ok {\n189. \t\t\t\t\treportAsIssue := TemplatableBool(reportFailureAsIssueStr)\n190. \t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n191. \t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %s\", reportAsIssue.String())\n192. \t\t\t\t} else if reportFailureAsIssueBool, ok := outputMap[\"report-failure-as-issue\"].(bool); ok {\n193. \t\t\t\t\treportAsIssue := TemplatableBool(strconv.FormatBool(reportFailureAsIssueBool))\n194. \t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n195. \t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %t\", reportFailureAsIssueBool)\n196. \t\t\t\t}\n197. \t\t\t}\n198. \t\t}\n199. \t}\n200. ","detailedContent":"\ndiff --git a/home/runner/work/gh-aw/gh-aw/pkg/workflow/safe_outputs_config_global.go b/home/runner/work/gh-aw/gh-aw/pkg/workflow/safe_outputs_config_global.go\nindex 0000000..0000000 100644\n--- a/home/runner/work/gh-aw/gh-aw/pkg/workflow/safe_outputs_config_global.go\n+++ b/home/runner/work/gh-aw/gh-aw/pkg/workflow/safe_outputs_config_global.go\n@@ -145,56 +145,56 @@\n \n \t// Handle group-reports flag\n \tif groupReports, exists := outputMap[\"group-reports\"]; exists {\n \t\tif groupReportsBool, ok := groupReports.(bool); ok {\n \t\t\tconfig.GroupReports = groupReportsBool\n \t\t\tsafeOutputsConfigLog.Printf(\"Group reports control: %t\", groupReportsBool)\n \t\t}\n \t}\n \n \t// Handle report-failure-as-issue as templatable bool or array of categories.\n \tif reportFailureAsIssue, exists := outputMap[\"report-failure-as-issue\"]; exists {\n \t\t// Support []any category filters.\n \t\tif categoriesList, ok := reportFailureAsIssue.([]any); ok {\n \t\t\t// Parse as array of category strings, separating included (no prefix) and excluded (! prefix)\n \t\t\tincludedCategories := make([]string, 0, len(categoriesList))\n \t\t\texcludedCategories := make([]string, 0, len(categoriesList))\n \t\t\tfor _, cat := range categoriesList {\n \t\t\t\tif catStr, ok := cat.(string); ok {\n \t\t\t\t\tif category, isExcluded := strings.CutPrefix(catStr, \"!\"); isExcluded {\n \t\t\t\t\t\t// Excluded category: \"!\" prefix was found and removed\n \t\t\t\t\t\texcludedCategories = append(excludedCategories, category)\n \t\t\t\t\t} else {\n \t\t\t\t\t\t// Included category: no prefix\n \t\t\t\t\t\tincludedCategories = append(includedCategories, catStr)\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\treportAsIssue := TemplatableBool(\"true\")\n \t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n \t\t\tconfig.ReportFailureAsIssueCategories = includedCategories\n \t\t\tconfig.ReportFailureAsIssueExcludedCategories = excludedCategories\n \t\t\tif len(includedCategories) > 0 && len(excludedCategories) > 0 {\n \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v, exclude filter: %v\", includedCategories, excludedCategories)\n \t\t\t} else if len(includedCategories) > 0 {\n \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with include filter: %v\", includedCategories)\n \t\t\t} else if len(excludedCategories) > 0 {\n \t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue with exclude filter: %v\", excludedCategories)\n \t\t\t}\n \t\t} else {\n \t\t\t// Support bool and templatable string values.\n \t\t\tif err := preprocessBoolFieldAsString(outputMap, \"report-failure-as-issue\", safeOutputsConfigLog); err != nil {\n \t\t\t\tsafeOutputsConfigLog.Printf(\"Failed to preprocess report-failure-as-issue field: %v (ignoring invalid value and leaving field unset)\", err)\n \t\t\t} else {\n \t\t\t\tif reportFailureAsIssueStr, ok := outputMap[\"report-failure-as-issue\"].(string); ok {\n \t\t\t\t\treportAsIssue := TemplatableBool(reportFailureAsIssueStr)\n \t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n \t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %s\", reportAsIssue.String())\n \t\t\t\t} else if reportFailureAsIssueBool, ok := outputMap[\"report-failure-as-issue\"].(bool); ok {\n \t\t\t\t\treportAsIssue := TemplatableBool(strconv.FormatBool(reportFailureAsIssueBool))\n \t\t\t\t\tconfig.ReportFailureAsIssue = &reportAsIssue\n \t\t\t\t\tsafeOutputsConfigLog.Printf(\"Report failure as issue: %t\", reportFailureAsIssueBool)\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \n"}}}
{"type":"assistant.message","timestamp":"2026-08-07T16:47:06.673Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-07T16:47:06.675Z","data":{"toolName":"task","mcpServerName":""}}
{"type":"subagent.started","timestamp":"2026-08-07T16:47:06.685Z","data":{"agentName":"general-purpose","agentDisplayName":"General Purpose Agent","toolCallId":"toolu_01KkFGWPDpq88DM18LKHBrRL"}}
{"type":"tool.execution_complete","timestamp":"2026-08-07T16:47:06.691Z","data":{"toolName":"task","mcpServerName":"","success":true,"result":{"content":"Agent started in background with agent_id: grumpy-coder-3. You'll be notified when it completes. Tell the user you're waiting and end your response, or continue unrelated work until notified. The agent supports multi-turn conversations — use write_agent to send follow-up messages.","detailedContent":"Prompt to general-purpose agent (grumpy-coder-3):\nYou are a highly critical, grumpy code reviewer performing first-pass issue mining on a Go pull request diff. Read the full PR diff at /tmp/gh-aw/agent/full-diff.patch (this is the complete diff; ignore /tmp/gh-aw/agent/pr-diff.patch which is truncated). Also feel free to read the full source files in /home/runner/work/gh-aw/gh-aw/pkg/workflow/ for context, especially:\n- pkg/workflow/step_types.go\n- pkg/workflow/safe_outputs_config_global.go\n- pkg/workflow/notify_comment_conclusion_helpers.go\n- pkg/workflow/templatables.go (defines TemplatableBool type, its String()/UnmarshalYAML/UnmarshalJSON methods, isExpression() helper)\n- pkg/workflow/safe_outputs_config_types.go\n\nContext: this PR replaces `any`-typed bool-or-expression fields (`WorkflowStep.ContinueOnError`, `SafeOutputsConfig.ReportFailureAsIssue`) with `*TemplatableBool`.\n\nFind correctness risks, regressions, and maintainability issues ONLY within the changed lines shown in the diff. Look especially for:\n1. In step_types.go `MapToStep`: previously `step.ContinueOnError = continueOnError` preserved ANY string value unconditionally. Now the new code only sets `step.ContinueOnError` when the string is \"true\", \"false\", or `isExpression(value)` is true — for any other string value (e.g. an arbitrary non-boolean, non-expression string that was previously accepted), the field is now silently left nil / dropped instead of erroring or preserving. Assess if this is a silent data-loss/behavior-change bug, and how severe.\n2. In notify_comment_conclusion_helpers.go: verify the new switch on `data.SafeOutputs.ReportFailureAsIssue.String()` handles a nil `ReportFailureAsIssue` pointer correctly (calling `.String()` on a nil `*TemplatableBool` — does this panic depending on implementation, or is it safe because String() is defined with pointer receiver and dereferences on nil?). Check templatables.go's String() implementation for nil-safety.\n3. In safe_outputs_config_global.go: for the `[]any` categories branch, note it hardcodes `TemplatableBool(\"true\")` unconditionally, discarding any templated/false value that might have applied — check if this matches old behavior (comment says \"Preserve original value for proper serialization\" was removed).\n4. Any other correctness bugs, missing nil checks, or maintainability issues in the diff.\n\nOutput STRICT JSONL, one finding per line, each line a JSON object with fields: {\"file\": \"<path>\", \"line\": <line number in new file version if known, else 0>, \"severity\": \"critical|high|medium|low\", \"issue\": \"<one sentence>\", \"detail\": \"<explanation with rationale>\"}. Do not include markdown, headers, or prose outside the JSONL. If no issues found for a check, omit it. Be skeptical and thorough but only report things you've verified against the actual code — check the referenced files before asserting a bug is real."}}}
[copilot-sdk-driver] [sdk-driver] error: Execution failed: Error: No model available. Check policy enablement under GitHub Settings > Copilot
{"type":"subagent.completed","timestamp":"2026-08-07T16:47:06.747Z","data":{"agentName":"general-purpose","toolCallId":"toolu_01KkFGWPDpq88DM18LKHBrRL"}}

Action Required

Assign this issue to an agent to debug and fix the issue.

Debug with any coding agent

Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):

Debug the agentic workflow failure using https://github.com/ghraw/github/gh-aw/main/debug.md

The failed workflow run is at https://github.com/github/gh-aw/actions/runs/31198445994
Manually invoke the agent

Debug this workflow failure using your favorite Agent CLI and the agentic-workflows prompt.

Tip

Stop reporting this workflow as a failure

To stop a workflow from creating failure issues, set report-failure-as-issue: false in its frontmatter:

safe-outputs:
  report-failure-as-issue: false

Generated from PR Code Quality Reviewer · 103.9 AIC ·

  • expires on Aug 8, 2026, 4:50 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions