Skip to content

Commit 4d55c04

Browse files
Merge branch 'main' into copilot/aw-failures-degrade-unreachable-server
2 parents 5d77ac2 + c993af6 commit 4d55c04

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

.github/workflows/linter-miner.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/linter-miner.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Be concise. List at most 5 candidates.
212212
## agent: `code-pattern-scanner`
213213
---
214214
description: Scans the Go source with Serena and grep to find error-prone patterns that would benefit from a custom linter
215-
model: inherited
215+
model: large
216216
---
217217
You are a Go static-analysis expert. Scan the non-test Go files under `pkg/` and `cmd/` of this repository for recurring error-prone patterns that are not already caught by existing linters.
218218

@@ -229,7 +229,7 @@ Output a JSON array of candidate linter ideas (same schema as discussion-miner).
229229
## agent: `linter-writer`
230230
---
231231
description: Implements a new Go analysis linter package following the pkg/linters/largefunc conventions
232-
model: inherited
232+
model: large
233233
---
234234
You are a Go engineer implementing a custom `go/analysis` linter.
235235

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//go:build !integration
2+
3+
package cli
4+
5+
import (
6+
"os"
7+
"path/filepath"
8+
"testing"
9+
10+
"github.com/github/gh-aw/pkg/gitutil"
11+
"github.com/stretchr/testify/assert"
12+
"github.com/stretchr/testify/require"
13+
)
14+
15+
func TestLinterMinerWorkflowSubAgentModelContract(t *testing.T) {
16+
repoRoot, err := gitutil.FindGitRoot()
17+
if err != nil {
18+
t.Skipf("Skipping test: not in a git repository: %v", err)
19+
}
20+
21+
workflowPath := filepath.Join(repoRoot, ".github", "workflows", "linter-miner.md")
22+
content, err := os.ReadFile(workflowPath)
23+
require.NoError(t, err, "Should read linter-miner workflow")
24+
25+
text := string(content)
26+
assert.Contains(t, text, "## agent: `code-pattern-scanner`", "Workflow should define the code-pattern-scanner sub-agent")
27+
assert.Contains(t, text, "## agent: `linter-writer`", "Workflow should define the linter-writer sub-agent")
28+
assert.NotContains(t, text, "model: inherited", "Sub-agents should not use the unsupported model: inherited value")
29+
}

0 commit comments

Comments
 (0)