Repository navigation
.NET: Rename and restructure MCP skills cache - #9586
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: eeaa072d-79cf-4092-8f3f-9931e6c1a4e0
There was a problem hiding this comment.
🟢 Approval recommended
Static review supports this behavior-preserving refactor with no blocking issues identified; tests were not run.
No open issues 🎉
What changed in this PR
Clarifies the .NET MCP skills cache structure while preserving discovery and caching behavior.
Changes:
- Renames discovery results to snapshots.
- Moves the discovery callback into the cache constructor.
- Updates tests and adds null-callback validation coverage.
| File | Description |
|---|---|
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/Listed/McpListedSkillsCacheTests.cs |
Updates cache usage and tests constructor validation. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/McpListedSkillsSnapshot.cs |
Introduces the renamed snapshot container. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/McpListedSkillsLoader.cs |
Supplies discovery during cache construction. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/McpListedSkillsDiscoveryResult.cs |
Removes the former container name. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/McpListedSkillsCache.cs |
Stores the callback and adopts snapshot terminology. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): c557f78ab2b9
Model: gpt-5.6-sol
Overview
This refactor consistently renames the cached discovery result as a snapshot and binds discovery once when each per-loader cache is constructed. Existing guardrails preserve serialized refresh, atomic snapshot publication, TTL semantics, cancellation behavior, and source-to-cache disposal ownership, with focused cache tests and broader end-to-end TTL tests covering those contracts. No publishable Critical, High, or Medium defect was established.
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.
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
64c8df6
into
feature-mcp-skills-next
Motivation & Context
Make the MCP skills cache easier to understand by naming its stored skill list and page lifetimes a snapshot, and configuring discovery once when the cache is created. This is a naming and structural refactor; discovery and caching logic are unchanged.
Description
McpListedSkillsDiscoveryResulttoMcpListedSkillsSnapshotand use snapshot naming throughout the cache.discoverSkillsfromGetOrCreateAsyncto theMcpListedSkillsCacheconstructor.Related Issue
N/A
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.