Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linter-miner.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/linter-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Be concise. List at most 5 candidates.
## agent: `code-pattern-scanner`
---
description: Scans the Go source with Serena and grep to find error-prone patterns that would benefit from a custom linter
model: inherited
model: large
---
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.

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

Expand Down
29 changes: 29 additions & 0 deletions pkg/cli/linter_miner_workflow_contract_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//go:build !integration

package cli

import (
"os"
"path/filepath"
"testing"

"github.com/github/gh-aw/pkg/gitutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestLinterMinerWorkflowSubAgentModelContract(t *testing.T) {
repoRoot, err := gitutil.FindGitRoot()
if err != nil {
t.Skipf("Skipping test: not in a git repository: %v", err)
}

workflowPath := filepath.Join(repoRoot, ".github", "workflows", "linter-miner.md")
content, err := os.ReadFile(workflowPath)
require.NoError(t, err, "Should read linter-miner workflow")

text := string(content)
assert.Contains(t, text, "## agent: `code-pattern-scanner`", "Workflow should define the code-pattern-scanner sub-agent")
assert.Contains(t, text, "## agent: `linter-writer`", "Workflow should define the linter-writer sub-agent")
Comment on lines +26 to +27
assert.NotContains(t, text, "model: inherited", "Sub-agents should not use the unsupported model: inherited value")
}
Loading