Skip to content

Conversation

@SimplyLiz
Copy link
Owner

Summary

  • Replace symbol count threshold (>15) with module relationship analysis for split recommendations
  • Add hasUnrelatedModuleChanges() to detect when changes span disconnected modules
  • Only recommend splitting PRs when modules have no caller/callee relationship

Rationale

A cohesive feature adding 50 symbols to one module shouldn't trigger a split recommendation, but unrelated changes across disconnected modules should.

Test plan

  • go build ./cmd/ckb passes
  • go test ./internal/query/... passes
  • Manual: PR adding many symbols to ONE module → no split recommendation
  • Manual: PR changing 2 modules where one calls the other → no split (related)
  • Manual: PR changing 3+ disconnected modules → split recommendation

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

NFR Tests ✅ 39 unchanged

Comparing PR against main branch (dynamic baseline).

Regressions: 0 ✅

Thresholds: WARN ≥ +5% • FAIL ≥ +10%

All scenarios
Scenario Change Actual (B) Base (B) Time
analyzeChange / large +0.0% 193,169 193,169 865µs
analyzeChange / medium +0.0% 38,575 38,575 201µs
analyzeChange / small +0.0% 4,046 4,046 49µs
analyzeChange / xlarge +0.0% 387,417 387,417 1.640181ms
analyzeImpact / large +0.0% 17,966 17,966 256µs
analyzeImpact / small +0.0% 1,924 1,924 20µs
batchGet / large +0.0% 11,789 11,789 69µs
batchGet / small +0.0% 4,733 4,733 23µs
batchSearch / large +0.0% 90,816 90,816 303µs
batchSearch / medium +0.0% 18,036 18,036 83µs
batchSearch / small +0.0% 3,379 3,379 35µs
explore / large +0.0% 94,262 94,262 394µs
explore / small +0.0% 4,253 4,253 58µs
findReferences / large +0.0% 445,943 445,943 2.385712ms
findReferences / medium +0.0% 44,123 44,123 309µs
findReferences / small +0.0% 4,395 4,395 61µs
getAffectedTests / large +0.0% 7,521 7,521 72µs
getAffectedTests / medium +0.0% 3,110 3,110 36µs
getAffectedTests / small +0.0% 903 903 24µs
getAffectedTests / xlarge +0.0% 14,870 14,870 101µs
getArchitecture / large +0.0% 6,690 6,690 69µs
getArchitecture / small +0.0% 960 960 17µs
getCallGraph / deep +0.0% 15,238 15,238 112µs
getCallGraph / shallow +0.0% 887 887 17µs
getHotspots / large +0.0% 16,748 16,748 171µs
getHotspots / small +0.0% 886 886 17µs
listEntrypoints / large +0.0% 23,798 23,798 154µs
listEntrypoints / small +0.0% 4,795 4,795 47µs
prepareChange / large +0.0% 16,194 16,194 135µs
prepareChange / small +0.0% 2,483 2,483 34µs
searchSymbols / large +0.0% 90,246 90,246 573µs
searchSymbols / medium +0.0% 17,766 17,766 110µs
searchSymbols / small +0.0% 3,588 3,588 37µs
summarizeDiff / large +0.0% 19,939 19,939 147µs
summarizeDiff / small +0.0% 2,133 2,133 35µs
traceUsage / large +0.0% 7,728 7,728 63µs
traceUsage / small +0.0% 725 725 14µs
understand / large +0.0% 460,608 460,608 1.849001ms
understand / small +0.0% 5,555 5,555 49µs

* = new scenario, compared against static baseline

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🟢 Change Impact Analysis

Metric Value
Risk Level LOW 🟢
Files Changed 1
Symbols Changed 15
Directly Affected 1
Transitively Affected 12

Blast Radius: 0 modules, 1 files, 13 unique callers

📝 Changed Symbols (15)
Symbol File Type Confidence
err internal/query/impact.go modified 100%
hasUnrelatedModuleChanges internal/query/impact.go modified 100%
record internal/query/impact.go modified 100%
updatedAt internal/query/impact.go modified 100%
verifiedAt internal/query/impact.go modified 100%
ChangedSymbol internal/query/impact.go modified 70%
ChangedSymbol#File internal/query/impact.go modified 70%
ModuleImpact internal/query/impact.go modified 70%
Recommendation#Action internal/query/impact.go modified 70%
Recommendation#Message internal/query/impact.go modified 70%
``github.com/SimplyLiz/CodeMCP/internal/impact/ internal/query/impact.go modified 70%
db internal/query/impact.go modified 70%
fmt/ internal/query/impact.go modified 70%
fmt/Sprintf internal/query/impact.go modified 70%
r internal/query/impact.go modified 70%
🎯 Affected Downstream (13)
Symbol Module Distance Kind
unknown `` 1 type-dependency
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/cmd/ckb/runImpactDiff(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/DiffSymbolMapper#MapToSymbols(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_Deduplication(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_DeletedFile(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_EmptyDiff(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_FileNotInIndex(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/mcp/MCPServer#toolAnalyzeChange(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/query/Engine#AnalyzeChangeSet(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/query/Engine#AnalyzeImpact(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/query/Engine#GetAffectedTests(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/query/Engine#generateRecommendations(). `` 2 transitive-caller
scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/query/TestConvertModuleImpacts(). `` 2 transitive-caller

⚠️ Index is 0 commit(s) behind HEAD. Results may be incomplete.


Generated by CKB

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🔐 Security Audit Results

⚠️ Security gate passed with warnings - 7 issue(s) found (review recommended)

Category Findings
🔑 Secrets ✅ 0
🛡️ SAST ✅ 0
📦 Dependencies ⚠️ 7
📜 Licenses ⚠️ 119 non-permissive

📦 Dependency Vulnerabilities

Found 7 vulnerability(ies) across 2 scanner(s)

Details

Trivy (4 findings)

  • CVE-2026-22036 (MEDIUM): undici - undici: Undici: Denial of Service via excessive de...
  • CVE-2025-54410 (LOW): github.com/docker/docker - github.com/moby/moby: Moby's Firewalld reload remo...
  • GHSA-vrw8-fxc6-2r93 (MEDIUM): github.com/go-chi/chi/v5 - chi Allows Host Header Injection which Leads to Op...
  • CVE-2025-47908 (MEDIUM): github.com/rs/cors - github.com/rs/cors: Denial of service via maliciou...

OSV-Scanner (3 findings)

  • github.com/docker/docker: 2 vulnerabilities
  • github.com/go-chi/chi/v5: 1 vulnerabilities
  • github.com/rs/cors: 2 vulnerabilities

📜 License Issues

Found 119 non-permissive license(s)

Details
  • github.com/BurntSushi/toml: MIT (notice)
  • github.com/google/uuid: BSD-3-Clause (notice)
  • github.com/klauspost/compress: Apache-2.0 (notice)
  • github.com/klauspost/compress: BSD-3-Clause (notice)
  • github.com/klauspost/compress: MIT (notice)
  • github.com/pelletier/go-toml/v2: MIT (notice)
  • github.com/smacker/go-tree-sitter: MIT (notice)
  • github.com/sourcegraph/go-diff: MIT (notice)
  • github.com/sourcegraph/scip: Apache-2.0 (notice)
  • github.com/spf13/cobra: Apache-2.0 (notice)
  • ... and 109 more

Generated by CKB Security Audit | View Details | Security Tab

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/query/impact.go 0.0% 11 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.0%) is below the target coverage (30.0%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #122     +/-   ##
=======================================
- Coverage   45.1%   45.1%   -0.1%     
=======================================
  Files        350     350             
  Lines      59739   59747      +8     
=======================================
  Hits       26961   26961             
- Misses     30952   30960      +8     
  Partials    1826    1826             
Flag Coverage Δ
unit 45.1% <0.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

CKB Analysis

Risk Files +27 -4 Modules

🎯 15 changed → 12 affected · 🔥 1 hotspot · 📊 1 complex · 📚 143 stale

Risk factors: Touches 1 hotspot(s)

Metric Value
Impact Analysis 15 symbols → 12 affected 🟢
Doc Coverage 9.090909090909092% ⚠️
Complexity 1 violations ⚠️
Coupling 0 gaps
Blast Radius 0 modules, 1 files
Index indexed (6s) 💾
🎯 Change Impact Analysis · 🟢 LOW · 15 changed → 13 affected
Metric Value
Symbols Changed 15
Directly Affected 1
Transitively Affected 12
Modules in Blast Radius 0
Files in Blast Radius 1

Symbols changed in this PR:

Downstream symbols affected:
Direct callers (1):

  • unknown
    Transitive callers (12):
  • scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/cmd/ckb/runImpactDiff(). (depth 2)
  • scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/DiffSymbolMapper#MapToSymbols(). (depth 2)
  • scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_Deduplication(). (depth 2)
  • scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_DeletedFile(). (depth 2)
  • scip-go gomod github.com/SimplyLiz/CodeMCP bc2f990c8da1 github.com/SimplyLiz/CodeMCP/internal/diff/TestDiffSymbolMapper_EmptyDiff(). (depth 2)
  • … and 7 more transitive callers

⚠️ Index is undefined commit(s) behind HEAD. Results may be incomplete. Run ckb index to refresh.

🔥 Hotspots · 1 volatile files
File Churn Score
internal/query/impact.go 14.03
📊 Complexity · 1 violations
File Cyclomatic Cognitive
internal/query/impact.go ⚠️ 57 ⚠️ 111
💡 Quick wins · 10 suggestions
📚 Stale docs · 143 broken references

Generated by CKB · Run details

…bol count

Previously, the change impact analysis recommended splitting PRs based
solely on symbol count (>15). This was not useful - a cohesive feature
adding many symbols to one module shouldn't be split.

Now the split recommendation triggers only when:
1. Changes touch 2+ files (single file = cohesive by definition)
2. Impact affects 3+ distinct modules (suggesting broad changes)

This ensures single-file PRs never get split recommendations, and
multi-file PRs only get them when impact is truly widespread.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SimplyLiz SimplyLiz force-pushed the fix/smart-split-recommendation branch from b60bf62 to 5112e36 Compare January 27, 2026 16:34
@SimplyLiz SimplyLiz merged commit 0621b69 into main Jan 27, 2026
23 of 25 checks passed
@SimplyLiz SimplyLiz deleted the fix/smart-split-recommendation branch January 27, 2026 16:53
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