Skip to content

Python: Improve MCP skill archive loading consistency - #8937

Merged
SergeyMenshykh merged 1 commit into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-skill-issue-triage
Oct 1, 2026
Merged

SergeyMenshykh merged 1 commit into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-skill-issue-triage

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Collaborator

Motivation & Context

Make MCP skill archive loading more predictable across Python and .NET, with clearer diagnostics and expanded regression coverage.

Description & Review Guide

  • What are the major changes? Refine internal archive loading, integrate warning diagnostics, update related documentation, and extend tests in both implementations.
  • What is the impact of these changes? More predictable archive handling without new public APIs or configuration requirements.
  • What do you want reviewers to focus on? Implementation consistency, resource lookup behavior, diagnostics, and regression coverage.

Related Issue

No public issue linked.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible (focused .NET and Python suites pass; the full suite has not been run locally).
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 11:52
@agent-framework-automation agent-framework-automation Bot added python Usage: [Issues, PRs], Target: Python .NET Usage: [Issues, PRs], Target: .Net labels Oct 1, 2026
@github-actions github-actions Bot changed the title Improve MCP skill archive loading consistency .NET: Improve MCP skill archive loading consistency Oct 1, 2026
@github-actions github-actions Bot changed the title .NET: Improve MCP skill archive loading consistency Python: Improve MCP skill archive loading consistency Oct 1, 2026

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.

Copilot review overview

🟢 Approval recommended

The implementations consistently preserve first-seen content, emit diagnostics, retain safety limits, and include comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Improves MCP skill archive collision handling across Python and .NET.

Changes:

  • Preserves the first colliding archive member and logs warnings.
  • Prevents duplicate decompression and file overwrites.
  • Adds extensive collision and limit regression coverage.
File Description
python/​packages/​core/​agent_framework/​_skills.py Adds case-insensitive in-memory collision handling.
python/​packages/​core/​tests/​core/​test_mcp_skills.py Tests collision aliases, ordering, warnings, and limits.
dotnet/​src/​Microsoft.Agents.AI.Mcp/​Skills/​Loaders/​AgentMcpSkillArchiveExtractor.cs Adds collision-safe extraction and diagnostics.
dotnet/​src/​Microsoft.Agents.AI.Mcp/​Skills/​Loaders/​ArchiveEntryLoader.cs Passes logging into extraction and reuses path sanitization.
dotnet/​src/​Microsoft.Agents.AI.Mcp/​Skills/​AgentMcpSkillsSource.cs Documents archive collision behavior.
dotnet/​tests/​Microsoft.Agents.AI.Mcp.UnitTests/​Skills/​AgentMcpSkillsSourceArchiveTests.cs Adds archive collision regression tests.

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

@github-actions github-actions Bot 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.

MAF Automated Review — Iteration 1

Result: No findings
Scope: full PR (1 commit(s)): bea7b7d4af85
Model: gpt-5.6-sol

Overview

The change makes duplicate archive handling first-member-wins, reports collisions without exposing file contents, and preserves per-runtime resource lookup semantics. Path normalization, extraction limits, digest checks, pre-decompression duplicate detection, and .NET partial-extraction cleanup prevent the examined collision cases from producing a publishable defect.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Oct 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 1, 2026
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Oct 1, 2026
Merged via the queue into microsoft:main with commit 5019894 Oct 1, 2026
57 of 59 checks passed
@SergeyMenshykh
SergeyMenshykh deleted the sergeymenshykh-skill-issue-triage branch October 1, 2026 18:38

This branch was previously deployed

2 inactive deployments
github-app-auth — bea7b7d4 Deployed Oct 1, 2026 by SergeyMenshykh via team_check #5747
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net python Usage: [Issues, PRs], Target: Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants