Apply the existing AggregatedSummaryBase pattern to the 4-way duplicated MCP server health/stats structs
Description: Four separate structs in pkg/cli all model the same "server name + call/request count + error count + error rate" shape with no shared base and inconsistent field names: MCPServerCrossRunHealth (audit_cross_run.go:81), MCPServerHealth and MCPServerHealthDetail (audit_expanded.go:76,90), and MCPServerStats (audit_report.go:202) — using TotalCalls vs ToolCalls vs RequestCount vs ToolCallCount, and TotalErrors vs ErrorCount inconsistently. The codebase already solved this exact problem for MissingToolSummary/MissingDataSummary/MCPFailureSummary via a shared AggregatedSummaryBase (pkg/cli/logs_models.go:172) — this is a direct extension of an established, already-approved pattern, not a new abstraction.
Expected Impact: Standardizes field names across 4 structs that currently require readers to remember 4 different names for the same concept; reduces the chance of a future bug where one struct's stat is updated but a sibling's isn't.
Suggested Agent: New Agent / Go refactoring agent familiar with pkg/cli.
Estimated Effort: Medium (3-4 hours).
Data Source: DeepReport Intelligence analysis, 2026-08-18 cycle, discussion #53651 (Typist: Go Type Consistency Analysis), Cluster 7, Priority 2.
Generated by 🔬 Deep Report · agent · 206 AIC · ⌖ 16.5 AIC · ⊞ 11.9K · ◷
Apply the existing
AggregatedSummaryBasepattern to the 4-way duplicated MCP server health/stats structsDescription: Four separate structs in
pkg/cliall model the same "server name + call/request count + error count + error rate" shape with no shared base and inconsistent field names:MCPServerCrossRunHealth(audit_cross_run.go:81),MCPServerHealthandMCPServerHealthDetail(audit_expanded.go:76,90), andMCPServerStats(audit_report.go:202) — usingTotalCallsvsToolCallsvsRequestCountvsToolCallCount, andTotalErrorsvsErrorCountinconsistently. The codebase already solved this exact problem forMissingToolSummary/MissingDataSummary/MCPFailureSummaryvia a sharedAggregatedSummaryBase(pkg/cli/logs_models.go:172) — this is a direct extension of an established, already-approved pattern, not a new abstraction.Expected Impact: Standardizes field names across 4 structs that currently require readers to remember 4 different names for the same concept; reduces the chance of a future bug where one struct's stat is updated but a sibling's isn't.
Suggested Agent: New Agent / Go refactoring agent familiar with
pkg/cli.Estimated Effort: Medium (3-4 hours).
Data Source: DeepReport Intelligence analysis, 2026-08-18 cycle, discussion #53651 (Typist: Go Type Consistency Analysis), Cluster 7, Priority 2.