You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: split LogAnalysis interface to separate read-only and mutation concerns #29575
Mixing read-only accessor methods with mutation methods in a single interface violates the Interface Segregation Principle and makes the type harder to mock, test, and reason about.
Impact
Severity: Low (maintainability)
Affected file: pkg/cli/log_aggregation.go
Risk: Consumers that only need to read domain data must implement mutating methods, creating unnecessary coupling and making unit tests more complex.
Recommendation
Split LogAnalysis into two focused interfaces — a read-only LogAnalysisReader and a writable LogAnalysisWriter (or MutableLogAnalysis):
Update aggregateLogFiles and other internal callers to accept MutableLogAnalysis where mutation is needed, and LogAnalysis where only reading is required.
Validation
All direct usages of LogAnalysis compile with the new narrower interface
aggregateLogFiles updated to use MutableLogAnalysis
Activity
github-actions commentedon May 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪