Skip to content

[deep-report] Apply AggregatedSummaryBase pattern to 4-way duplicated MCP server health/stats structs #53689

Description

@github-actions

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 ·

  • expires on Aug 20, 2026, 4:37 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions