Skip to content

Embed AggregatedSummaryBase in MCPFailureSummary - #52670

Open
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/deep-report-refactor-mcpfailure-summary
Open

Embed AggregatedSummaryBase in MCPFailureSummary#52670
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/deep-report-refactor-mcpfailure-summary

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

MCPFailureSummary duplicated aggregation fields already defined in AggregatedSummaryBase, creating drift risk when shared summary fields change. This refactor aligns it with the existing MissingToolSummary and MissingDataSummary pattern.

  • Model refactor

    • Embed AggregatedSummaryBase in MCPFailureSummary
    • Remove duplicated Count, Workflows, WorkflowsDisplay, and RunIDs fields
    • Update the base comment to reflect all embedding summary types
  • Aggregation update

    • Initialize MCP failure summaries through the embedded base while preserving promoted field access
  • Coverage

    • Update MCP failure summary fixtures for embedded initialization
    • Add JSON coverage confirming embedded fields remain flattened at the top level
type MCPFailureSummary struct {
	ServerName string `json:"server_name" console:"header:Server"`
	AggregatedSummaryBase
}

Run: https://github.com/github/gh-aw/actions/runs/31795158705> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.47 AIC · ⌖ 7.2 AIC · ⊞ 8.5K ·

Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor MCPFailureSummary to embed AggregatedSummaryBase Embed AggregatedSummaryBase in MCPFailureSummary Aug 14, 2026
Copilot AI requested a review from pelikhan August 14, 2026 07:55
@github-actions

Copy link
Copy Markdown
Contributor

Great work on this refactor! 🚀 You have successfully eliminated the duplicated aggregation fields in MCPFailureSummary by embedding AggregatedSummaryBase, aligning it with the existing patterns used in MissingToolSummary and MissingDataSummary.

What stands out:

  • ✅ Focused scope — single, cohesive refactor
  • ✅ Test coverage — fixtures updated and JSON flattening behavior verified
  • ✅ Clear explanation — detailed PR body with code examples
  • ✅ Drift risk eliminated — shared summary fields now have a single source of truth

This is exactly the kind of mechanical, low-risk refactoring that keeps the codebase maintainable. The PR is ready for review and merge.

Generated by ✅ Contribution Check · auto · 53.9 AIC · ⌖ 3.24 AIC · ⊞ 8.8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 14, 2026 10:55
Copilot AI balanced review requested due to automatic review settings August 14, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors MCP failure summaries to embed the shared aggregation model and reduce field duplication.

Changes:

  • Embeds AggregatedSummaryBase in MCPFailureSummary.
  • Updates aggregation and test fixtures for embedded initialization.
  • Adds flattened JSON serialization coverage.
Show a summary per file
File Description
pkg/cli/logs_models.go Refactors the summary model.
pkg/cli/logs_report_mcp.go Initializes the embedded base.
pkg/cli/logs_report_test.go Updates report fixtures.
pkg/cli/logs_display_fields_test.go Updates console checks and adds JSON coverage.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread pkg/cli/logs_models.go Outdated
WorkflowsDisplay string `json:"-" console:"header:Workflows,maxlen:60"` // Formatted display of workflows
RunIDs []int64 `json:"run_ids" console:"-"` // List of run IDs where this server failed
ServerName string `json:"server_name" console:"header:Server"`
AggregatedSummaryBase
Comment thread pkg/cli/logs_models.go Outdated
Comment on lines +168 to +169
// AggregatedSummaryBase holds the shared tail fields that appear byte-for-byte identically
// in MissingToolSummary and MissingDataSummary (and as a subset in MCPFailureSummary).
// in MissingToolSummary, MissingDataSummary, and MCPFailureSummary.
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot
Quick triage for maintainer-ready follow-up:

Unresolved review threads (newest first):

Please refresh the branch if needed, address the unresolved review feedback, rerun validation, and use the pr-finisher skill before handing back.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.47 AIC · ⌖ 7.2 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot
Quick triage for maintainer-ready follow-up:
...

Addressed the unresolved feedback in fb3f2e3: MCP output again uses its original JSON and console schema, and the exported-model appendix now reflects the embedding. Local scoped validation passed.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage\n\n- Category: refactor\n- Risk: low\n- Priority: medium\n- Score: 50/100 (impact 25 + urgency 15 + quality 10)\n- Recommended action: batch_review\n- Batch: refactor-consolidation-cluster\n

Generated by 🔧 PR Triage Agent · auto · 62.8 AIC · ⌖ 2.76 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: refactor
  • Risk: medium
  • Priority: medium (score: 42/100)
  • Score breakdown: impact 18/50, urgency 10/30, quality 14/20
  • Recommended action: batch_review
  • Batch: refactor-cleanup-cluster

Automated triage by PR Triage Agent.

Generated by 🔧 PR Triage Agent · auto · 64.3 AIC · ⌖ 2.94 AIC · ⊞ 7.8K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] MCPFailureSummary hand-copies fields instead of embedding AggregatedSummaryBase

4 participants