Skip to content

Add daily test improver workflow for Go test quality automation#166

Merged
pelikhan merged 2 commits intomainfrom
copilot/improve-test-workflow
Jan 11, 2026
Merged

Add daily test improver workflow for Go test quality automation#166
pelikhan merged 2 commits intomainfrom
copilot/improve-test-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 11, 2026

Implements a daily agentic workflow that automatically reviews and improves test files in the Go codebase, focusing on test quality, coverage, and stability.

Workflow Implementation

  • .github/workflows/test-improver.md - Agentic workflow with Serena-powered Go analysis
  • .github/workflows/test-improver.lock.yml - Compiled GitHub Actions workflow (daily at 08:14 UTC)

Key Capabilities

Intelligent file selection: Uses Serena to rank test files by improvement potential (complexity vs coverage, testing patterns, recent modifications)

Three improvement vectors:

  • Idiomatic testing patterns (testify assertions where available, standard library best practices otherwise)
  • Coverage gaps (edge cases, error paths, branch coverage)
  • Test stability (table-driven tests, proper cleanup, deterministic data)

Smart output: Creates draft PR when improvements made, calls noop safe output when test already excellent. Checks for existing [test-improver] PRs to avoid duplicates.

Tools configured: Serena (Go analysis), GitHub (read-only), edit, bash (test execution, coverage), cache-memory (progress tracking)

Workflow Behavior

Focuses on single test file per run for quality over quantity. Each execution:

  1. Discovers all *_test.go files
  2. Ranks candidates using Serena complexity analysis
  3. Deep analyzes selected file and implementation
  4. Implements improvements with verification
  5. Creates PR with detailed improvement breakdown or noops

Cache memory prevents immediate repetition across runs.

Original prompt

a daily improver agentic workflow that reviews a single test file and suggest improvements

better idiomatic use of the testify library
increase coverage of the code under test
stabler , cleaner tests
create a pull request if improvements , call noop otherwise

Use serena for go.

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve test file with better testify usage and coverage Add daily test improver workflow for Go test quality automation Jan 11, 2026
Copilot AI requested a review from pelikhan January 11, 2026 19:44
@pelikhan pelikhan marked this pull request as ready for review January 11, 2026 19:56
@pelikhan pelikhan merged commit c19de04 into main Jan 11, 2026
@pelikhan pelikhan deleted the copilot/improve-test-workflow branch January 11, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants