Repository navigation
Python: Improve MCP skill archive loading consistency - #8937
SergeyMenshykh merged 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Motivation & Context
Make MCP skill archive loading more predictable across Python and .NET, with clearer diagnostics and expanded regression coverage.
Description & Review Guide
Related Issue
No public issue linked.
Contribution Checklist
breaking changelabel (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.