Skip to content

feat(ci,scripts): unify coverage-diff into mutation-diff and redesign report - #1266

Merged
kyasbal merged 1 commit into
mainfrom
push-lpmvyprowusy
Nov 12, 2026
Merged

kyasbal merged 1 commit into
mainfrom
push-lpmvyprowusy

Conversation

@kyasbal

@kyasbal kyasbal commented Nov 12, 2026

Copy link
Copy Markdown
Member

Summary

Unifies scripts/coverage-diff into scripts/mutation-diff so differential Go line coverage, differential mutation testing, and redundant unit test detection all run under a single command (make mutation-diff), and overhauls terminal/GitHub report readability and live execution progress.

Key Changes

  • Single Unified Tool (scripts/mutation-diff / make mutation-diff):
    • Integrates AST-token-based differential line coverage (linecov.go) directly into mutation-diff (catching uncovered 0-mutant statements, constructors, and main.go paths alongside surviving mutants) and removes the separate scripts/coverage-diff binary, CI step, and Makefile target.
    • Includes scripts/ Go packages by default (removing --include-scripts / MUTATION_INCLUDE_SCRIPTS), and automatically falls back from jj to git when vcs=auto encounters Git-specific revision syntax (e.g., origin/main~6).
  • Readable Terminal & GitHub Reports (report.go, report_text.go, report_github.go, termstyle.go):
    • Splits reporting into report.go (model & coverage attachment), report_text.go (ANSI terminal renderer), and report_github.go (GitHub Actions annotations & $GITHUB_STEP_SUMMARY).
    • Adds --color=auto|always|never (COLOR Make var), Unicode-width-aligned file summary tables (PATCH COV, MUTATION, UNCOVERED LINES), Uncovered Changed Code / Uncovered Changed Lines sections, word/operator-boundary inline diff highlighting (HighlightInlineDiff), a top Redundant Tests Summary table, and plain-English SAME PATH / NO OUTPUT CHECK explanations grouped by covering test.
  • Live Execution Progress (progress.go):
    • Displays an in-place spinner, [████░░░░] progress bar, and elapsed timer on interactive TTYs, and clean phase / 25% milestone logs on non-TTYs / CI.

Verification

  • make format-go & make lint-go: 0 issues
  • go test -race ./scripts/...: passed
  • make mutation-diff: Patch Coverage 87.5% (898 / 1,026), Mutation Score 92.5% (74 / 80), Redundant Tests 0

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consolidates the coverage-diff and mutation-diff tools into a single, unified mutation-diff tool. It removes the standalone coverage-diff command and its associated files, updating the documentation, Makefile, and coding rules accordingly. The updated mutation-diff tool now performs differential line coverage, mutation testing, and redundant test detection in a single pass. Additionally, the PR introduces a new terminal styling utility (termstyle.go), a live progress reporter (progress.go), and enhanced reporting formats (both text and GitHub annotations/summaries) that combine coverage and mutation results. I have no feedback to provide as there are no review comments.

@kyasbal
kyasbal added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 3a7900b Nov 12, 2026
21 checks passed
@kyasbal
kyasbal deleted the push-lpmvyprowusy branch November 12, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant