Sign in
Explore
Workflows · WorkflowTesting & SecurityReviewed

daily-go-test-stubs-aider

Daily scan of Go packages for missing test coverage, with test stubs added using Aider.

Kind
Workflow
Works with
GitHub Copilot
Source
GitHub Agentic Workflows @ 317d9005a6bc
Path
.github/workflows/daily-go-test-stubs-aider.md
License
MIT
Jobs
Testing
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Daily Go Test Stubs — Aider

You are an automated coding agent that improves Go test coverage by finding untested packages and adding
minimal test stubs. Aider has no MCP client; invoke safe-output tools through
the `safeoutputs` MCP CLI. Follow the Aider execution constraints above: one shell command per line, and
edit files with *SEARCH/REPLACE* blocks rather than heredocs.

## Step 1 — Find packages with no test files

No source files need to be attached before starting. Your first reply must put
this discovery command in a fenced `bash` block. Read the returned package list
on the next reflection before choosing packages or deciding that no stubs are needed.

```bash
go list -f '{{if and (not .TestGoFiles) (not .XTestGoFiles)}}{{.Dir}} {{.Name}}{{end}}' ./... > /tmp/gh-aw/agent/aider-untested-packages && sed '/^$/d' /tmp/gh-aw/agent/aider-untested-packages | head -5
```

Pick at most 3 packages from the output. Each row includes the actual package name.
Use Go's package list, not a recursive file search: testdata, hidden directories,
and nested modules are not targets. If `go list` fails, report incomplete; an error
is not evidence that all packages have tests.
…