.NET: [BREAKING] Graduate FileMemoryProvider#7114
Conversation
There was a problem hiding this comment.
Pull request overview
This PR graduates the .NET harness FileMemory public types out of experimental/preview by removing [Experimental(MAAI001)] annotations and now-unused related using directives, making these types part of the stable public API surface.
Changes:
- Removed
[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)]fromFileMemoryProvider,FileMemoryProviderOptions,FileMemoryState, andFileListEntry. - Removed orphaned
using System.Diagnostics.CodeAnalysis;/using Microsoft.Shared.DiagnosticIds;directives from the affected files.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileMemoryProvider.cs | Removes experimental attribute/diagnostic imports to make the provider stable API. |
| dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileMemoryProviderOptions.cs | Removes experimental attribute/diagnostic imports to make options stable API. |
| dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileMemoryState.cs | Removes experimental attribute/diagnostic imports to make state type stable API. |
| dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileListEntry.cs | Removes experimental attribute/diagnostic imports to make list entry type stable API. |
There was a problem hiding this comment.
Automated Code Review
Reviewers: 5 | Confidence: 96%
✓ Correctness
This PR cleanly removes the
[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)]attribute and associatedusingdirectives from exactly four FileMemory types:FileListEntry,FileMemoryProvider,FileMemoryProviderOptions, andFileMemoryState. No behavioral code was changed. The removedusing System.Diagnostics.CodeAnalysis;andusing Microsoft.Shared.DiagnosticIds;directives are confirmed orphaned — no other references to those namespaces remain in the affected files. The graduation scope matches the PR description precisely.
✓ Security Reliability
This PR is a clean, attribute-only diff that removes the [Experimental(MAI001)] attribute and its associated using directives from four FileMemory public types (FileListEntry, FileMemoryProvider, FileMemoryProviderOptions, FileMemoryState). No behavioral code was changed. The removed usings (System.Diagnostics.CodeAnalysis and Microsoft.Shared.DiagnosticIds) are confirmed to be orphaned after the attribute removal. No security or reliability concerns arise from graduating these types out of experimental status.
✓ Test Coverage
This PR removes [Experimental] attributes from four FileMemory types (FileListEntry, FileMemoryProvider, FileMemoryProviderOptions, FileMemoryState). It is a purely attribute/using-removal diff with no behavioral changes. Existing tests in FileMemoryProviderTests.cs (49 tests) and HarnessAgentTests.cs (3 tests) comprehensively cover the behavior of these types — constructor validation, file CRUD, state management, thread safety, and integration. The remaining #pragma warning disable MAAI001 in the test file guards other still-experimental types (AIContextProvider.InvokingContext, AIContext), not the graduated types. No API surface approval tests exist for these types, but that is a pre-existing gap unrelated to this PR. No test coverage issues arise from this change.
✓ Failure Modes
This PR cleanly removes the [Experimental(MAI001)] attribute and its associated using directives from four FileMemory public types (FileListEntry, FileMemoryProvider, FileMemoryProviderOptions, FileMemoryState). The changes are purely declarative — no behavioral code was modified. There are no silent failures, swallowed exceptions, partial writes, or other operational failure modes introduced by this diff. The remaining using statements and class definitions are intact and correct in all four files.
✗ Design Approach
The main design gap is that
FileMemoryProvideris being graduated as stable even though its only public construction path still requires the experimentalAgentFileStoresurface, so consumers still need to opt intoMAI001to actually use the provider. I did not find other design-approach issues in the attribute-only diff.
Flagged Issues
- Graduating
FileMemoryProvideralone does not achieve the stated consumption goal, because its only public constructor still requiresAgentFileStore, which remains[Experimental](dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileMemoryProvider.cs:103,dotnet/src/Microsoft.Agents.AI/Harness/FileStore/AgentFileStore.cs:25-26). A caller that tries to instantiate the newly-stable provider still hits the same experimental warning path.
Automated review by westey-m's agents
|
Flagged issue Graduating Source: automated DevFlow PR review |
Motivation & Context
The .NET
HarnessAgentand its supporting building blocks are being graduated out of experimental/preview status so the harness can ship GA (tracked by #6964).FileMemoryProvider— the harness's durable, owner-keyed file-memory building block — was still marked[Experimental(MAAI001)], which prevented it (and anything built on it) from being consumed without opting into experimental diagnostics. This PR graduates that provider and its directly related public types.Description & Review Guide
What are the major changes?
Removed the
[Experimental(MAAI001)]attribute (and the now-orphanedusing System.Diagnostics.CodeAnalysis;/using Microsoft.Shared.DiagnosticIds;usings) from the fourFileMemorypublic types:FileMemoryProviderFileMemoryProviderOptionsFileMemoryStateFileListEntryWhat is the impact of these changes?
These four types become part of the stable public API surface — callers no longer need
#pragma warning disable MAAI001(or an equivalentNoWarn) to use them. Graduating public API out of experimental is a breaking change for existing experimental consumers, hence the[BREAKING]prefix.Note:
FileMemoryProvider's public constructor still takes anAgentFileStore, which remains[Experimental](out of scope for this PR). Constructing the provider therefore still touches an experimental type untilAgentFileStoreis graduated separately.What do you want reviewers to focus on?
That the graduation scope is limited to exactly these four
FileMemorytypes and that no behavior changed — this is an attribute/using-only diff (4 files, 13 deletions).Related Issue
Related to #6964 (umbrella tracking issue — intentionally left open, this PR graduates only the
FileMemoryProvidertypes).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.