{"type":"tool.execution_start","timestamp":"2026-08-05T17:45:46.875Z","data":{"toolName":"bash","mcpServerName":"","command":"grep -n \"Legacy\\|trimmedLine ==\" /home/runner/work/gh-aw/gh-aw/pkg/cli/git.go"}}
{"type":"tool.execution_complete","timestamp":"2026-08-05T17:45:46.939Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"374:\t\t\tif trimmedLine == required {\n381:\t\t\tif trimmedLine == constants.WorkflowsLockYmlGitAttributesEntryLegacy && required == lockYmlEntry {\n<shellId: 12 completed with exit code 0>","detailedContent":"374:\t\t\tif trimmedLine == required {\n381:\t\t\tif trimmedLine == constants.WorkflowsLockYmlGitAttributesEntryLegacy && required == lockYmlEntry {\n<shellId: 12 completed with exit code 0>"}}}
{"type":"assistant.message","timestamp":"2026-08-05T17:46:04.859Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-05T17:46:04.862Z","data":{"toolName":"bash","mcpServerName":"","command":"sed -n '1,110p' /home/runner/work/gh-aw/gh-aw/pkg/cli/gitattributes_test.go"}}
{"type":"tool.execution_complete","timestamp":"2026-08-05T17:46:04.935Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"//go:build !integration\n\npackage cli\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestEnsureGitAttributes(t *testing.T) {\n\t// Create a temporary directory for testing\n\ttmpDir, err := os.MkdirTemp(\"\", \"gh-aw-gitattributes-test\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer os.RemoveAll(tmpDir)\n\n\t// Change to temp directory\n\toriginalDir, err := os.Getwd()\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to get current directory: %v\", err)\n\t}\n\tdefer func() {\n\t\t_ = os.Chdir(originalDir)\n\t}()\n\n\tif err := os.Chdir(tmpDir); err != nil {\n\t\tt.Fatalf(\"Failed to change to temp directory: %v\", err)\n\t}\n\n\t// Initialize a git repository\n\tif err := os.WriteFile(\"test.txt\", []byte(\"test\"), 0644); err != nil {\n\t\tt.Fatalf(\"Failed to create test file: %v\", err)\n\t}\n\tif cmd := exec.Command(\"git\", \"init\"); cmd.Run() != nil {\n\t\tt.Skip(\"Skipping test - git not available\")\n\t}\n\n\ttests := []struct {\n\t\tname string\n\t\texistingContent string\n\t\texpectedContent string\n\t\texpectUpdated bool\n\t}{\n\t\t{\n\t\t\tname: \"creates new gitattributes file\",\n\t\t\texistingContent: \"\",\n\t\t\texpectedContent: \".github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"adds entry to existing file\",\n\t\t\texistingContent: \"*.generated linguist-generated=true\\n\",\n\t\t\texpectedContent: \"*.generated linguist-generated=true\\n\\n.github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"does not duplicate existing entry\",\n\t\t\texistingContent: \".github/workflows/*.lock.yml linguist-generated=true\\n\",\n\t\t\texpectedContent: \".github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: false,\n\t\t},\n\t\t{\n\t\t\tname: \"does not duplicate entry with different order\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\",\n\t\t\texpectUpdated: false,\n\t\t},\n\t\t{\n\t\t\tname: \"migrates legacy merge=ours entry\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=ours\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"does not rewrite repository-owned lock-yml policy\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=union\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=union\\n*.txt text=auto\\n\\n.github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tgitAttributesPath := \".gitattributes\"\n\n\t\t\t// Remove any existing .gitattributes\n\t\t\tos.Remove(gitAttributesPath)\n\n\t\t\t// Create initial content if specified\n\t\t\tif tt.existingContent != \"\" {\n\t\t\t\tif err := os.WriteFile(gitAttributesPath, []byte(tt.existingContent), 0644); err != nil {\n\t\t\t\t\tt.Fatalf(\"Failed to create initial .gitattributes: %v\", err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call the function\n\t\t\tupdated, err := ensureGitAttributes()\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"ensureGitAttributes() returned error: %v\", err)\n\t\t\t}\n\n\t\t\tif updated != tt.expectUpdated {\n\t\t\t\tt.Errorf(\"ensureGitAttributes() updated=%v, want %v\", updated, tt.expectUpdated)\n\t\t\t}\n\n\t\t\t// Check that file exists\n\t\t\tif _, err := os.Stat(gitAttributesPath); os.IsNotExist(err) {\n<shellId: 13 completed with exit code 0>","detailedContent":"//go:build !integration\n\npackage cli\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestEnsureGitAttributes(t *testing.T) {\n\t// Create a temporary directory for testing\n\ttmpDir, err := os.MkdirTemp(\"\", \"gh-aw-gitattributes-test\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer os.RemoveAll(tmpDir)\n\n\t// Change to temp directory\n\toriginalDir, err := os.Getwd()\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to get current directory: %v\", err)\n\t}\n\tdefer func() {\n\t\t_ = os.Chdir(originalDir)\n\t}()\n\n\tif err := os.Chdir(tmpDir); err != nil {\n\t\tt.Fatalf(\"Failed to change to temp directory: %v\", err)\n\t}\n\n\t// Initialize a git repository\n\tif err := os.WriteFile(\"test.txt\", []byte(\"test\"), 0644); err != nil {\n\t\tt.Fatalf(\"Failed to create test file: %v\", err)\n\t}\n\tif cmd := exec.Command(\"git\", \"init\"); cmd.Run() != nil {\n\t\tt.Skip(\"Skipping test - git not available\")\n\t}\n\n\ttests := []struct {\n\t\tname string\n\t\texistingContent string\n\t\texpectedContent string\n\t\texpectUpdated bool\n\t}{\n\t\t{\n\t\t\tname: \"creates new gitattributes file\",\n\t\t\texistingContent: \"\",\n\t\t\texpectedContent: \".github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"adds entry to existing file\",\n\t\t\texistingContent: \"*.generated linguist-generated=true\\n\",\n\t\t\texpectedContent: \"*.generated linguist-generated=true\\n\\n.github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"does not duplicate existing entry\",\n\t\t\texistingContent: \".github/workflows/*.lock.yml linguist-generated=true\\n\",\n\t\t\texpectedContent: \".github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: false,\n\t\t},\n\t\t{\n\t\t\tname: \"does not duplicate entry with different order\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\",\n\t\t\texpectUpdated: false,\n\t\t},\n\t\t{\n\t\t\tname: \"migrates legacy merge=ours entry\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=ours\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true\\n*.txt text=auto\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t\t{\n\t\t\tname: \"does not rewrite repository-owned lock-yml policy\",\n\t\t\texistingContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=union\\n*.txt text=auto\\n\",\n\t\t\texpectedContent: \"*.md linguist-documentation=true\\n.github/workflows/*.lock.yml linguist-generated=true merge=union\\n*.txt text=auto\\n\\n.github/workflows/*.lock.yml linguist-generated=true\",\n\t\t\texpectUpdated: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tgitAttributesPath := \".gitattributes\"\n\n\t\t\t// Remove any existing .gitattributes\n\t\t\tos.Remove(gitAttributesPath)\n\n\t\t\t// Create initial content if specified\n\t\t\tif tt.existingContent != \"\" {\n\t\t\t\tif err := os.WriteFile(gitAttributesPath, []byte(tt.existingContent), 0644); err != nil {\n\t\t\t\t\tt.Fatalf(\"Failed to create initial .gitattributes: %v\", err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call the function\n\t\t\tupdated, err := ensureGitAttributes()\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"ensureGitAttributes() returned error: %v\", err)\n\t\t\t}\n\n\t\t\tif updated != tt.expectUpdated {\n\t\t\t\tt.Errorf(\"ensureGitAttributes() updated=%v, want %v\", updated, tt.expectUpdated)\n\t\t\t}\n\n\t\t\t// Check that file exists\n\t\t\tif _, err := os.Stat(gitAttributesPath); os.IsNotExist(err) {\n<shellId: 13 completed with exit code 0>"}}}
{"type":"assistant.message","timestamp":"2026-08-05T17:46:56.017Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-05T17:46:56.020Z","data":{"toolName":"task","mcpServerName":""}}
{"type":"subagent.started","timestamp":"2026-08-05T17:46:56.031Z","data":{"agentName":"general-purpose","agentDisplayName":"General Purpose Agent","toolCallId":"toolu_01N3saFMH74EDVcBX9hbBmBe"}}
[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-05T17:46:56.077Z","data":{"agentName":"general-purpose","toolCallId":"toolu_01N3saFMH74EDVcBX9hbBmBe"}}
Workflow Failure
Workflow: PR Code Quality Reviewer
Branch: copilot/re-add-merge-ours-to-gitattributes
Run: https://github.com/github/gh-aw/actions/runs/31030978505
Pull Request: #50639
Warning
Engine Failure: The
copilotengine terminated unexpectedly.Last agent output:
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.):
Manually invoke the agent
Debug this workflow failure using your favorite Agent CLI and the
agentic-workflowsprompt.agentic-workflowsskill from.github/skills/agentic-workflows/SKILL.mdor https://github.com/github/gh-aw/blob/main/.github/skills/agentic-workflows/SKILL.mddebug the agentic workflow pr-code-quality-reviewer failure in https://github.com/github/gh-aw/actions/runs/31030978505Tip
Stop reporting this workflow as a failure
To stop a workflow from creating failure issues, set
report-failure-as-issue: falsein its frontmatter: