Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new git-history “change coupling” report to show which files tend to change together (repo-wide pair overview via --coupling, and per-file “blast radius” via --coupling-for), with MCP and CLI flag wiring. The PR also adjusts several existing history report renderers to better fit the 79/109-column tabular layouts and refine what gets shown.
Changes:
- Add change-coupling analysis + renderers (tabular/csv/json) and a dedicated test suite.
- Wire
--coupling/--coupling-forinto CLI processing and expose a new MCPcouplingtool. - Tweak history report tabular outputs (hotspots, authors, author timeline, languages timeline) for wide layouts and/or row selection.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| processor/processor.go | Adds coupling globals + dispatch, enforces report exclusivity, hooks coupling into history-flag validation flow. |
| processor/history_languages.go | Changes languages timeline tabular rendering to show all rows (removes prior top-N cap). |
| processor/history_hotspots.go | Adjusts wide hotspots formatting widths and changes tabular filtering to skip zero-score rows. |
| processor/history_coupling.go | New coupling report implementation: co-change counting, rename folding, target resolution, and renderers. |
| processor/history_coupling_test.go | New tests covering target-path normalization, counting, rename folding, and partner ranking behavior. |
| processor/history_authors.go | Adjusts wide author table formatting to better fill the wide-column rule and show longer names. |
| processor/history_author_timeline.go | Improves tabular author timeline: wide name column and “others (N)” aggregation beyond top-N. |
| mcp.go | Adds MCP coupling tool and handler (blast-radius JSON) with depth/limit controls. |
| config.go | Registers --coupling and --coupling-for flags. |
Comments suppressed due to low confidence (1)
processor/processor.go:929
validateHistoryFlagscurrently returns early unless one ofHotspots,ByAuthor, orTimelineis set (seeprocessor/history_validation.go:17). With--couplingenabled, this call won’t validate--depthor emit the standard warnings (extra positional paths, ignored flags), even though coupling is also a history report. The validation gate should includeCoupling(and likelyCouplingFor) so coupling runs get the same safety checks/warnings.
if Hotspots || Coupling || ByAuthor || Timeline {
if err := validateHistoryFlags(os.Stderr); err != nil {
fmt.Println(err)
os.Exit(1)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Re-indent the mcp.WithNumber("limit") description line that was left
under-indented, restoring gofmt compliance.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a change-coupling report derived from git history which files tend to change together in the same commits.