Skip to content

Python: [BREAKING] Graduate file memory provider out of experimental#7113

Draft
westey-m wants to merge 1 commit into
microsoft:mainfrom
westey-m:python-graduate-filememoryprovider
Draft

Python: [BREAKING] Graduate file memory provider out of experimental#7113
westey-m wants to merge 1 commit into
microsoft:mainfrom
westey-m:python-graduate-filememoryprovider

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation & Context

The Microsoft Agent Framework harness depends on several building-block features
that are still marked experimental. As part of releasing those dependencies (see
#6964), the file memory provider is now stable enough to graduate out of
experimental status so downstream users can rely on it without opting into
experimental warnings.

Description & Review Guide

  • What are the major changes?

    • Removed the @experimental(feature_id=ExperimentalFeature.HARNESS) decorator
      from FileMemoryProvider in _harness/_file_memory.py, along with the
      now-unused _feature_stage import.
    • Inverted the corresponding unit test into a graduation guard
      (test_file_memory_provider_is_not_experimental) asserting the provider no
      longer carries __feature_stage__ / __feature_id__ metadata.
  • What is the impact of these changes?

    • FileMemoryProvider no longer emits experimental warnings.
    • Breaking (experimental surface only): graduating a preview API is marked
      breaking so preview users of the experimental harness are notified; no
      released API is broken.
    • The shared ExperimentalFeature.HARNESS id is intentionally retained (still
      referenced by other harness symbols that remain experimental).
    • The shared file-store types in _file_access.py (AgentFileStore,
      InMemoryAgentFileStore, FileSystemAgentFileStore, and the file DTOs)
      remain experimental and are intentionally out of scope here.
  • What do you want reviewers to focus on?

    • That FileMemoryProvider (and its already-undecorated
      DEFAULT_FILE_MEMORY_SOURCE_ID / DEFAULT_FILE_MEMORY_INSTRUCTIONS
      constants) is the intended graduation scope, while the shared file-store
      types remain experimental.

Related Issue

Related to #6964

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • 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 title prefix in sync automatically.

Copilot AI review requested due to automatic review settings July 14, 2026 14:58
@giles17 giles17 added python Usage: [Issues, PRs], Target: Python breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible labels Jul 14, 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.

Pull request overview

This PR graduates the Python harness FileMemoryProvider out of experimental status so downstream users can depend on it without the experimental feature-stage metadata/warnings being attached to that provider type.

Changes:

  • Removed the @experimental(feature_id=ExperimentalFeature.HARNESS) decorator from FileMemoryProvider and dropped the now-unused feature-stage import.
  • Updated the unit test to guard graduation by asserting FileMemoryProvider no longer carries __feature_stage__ / __feature_id__ metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
python/packages/core/agent_framework/_harness/_file_memory.py Removes experimental decoration/metadata wiring from FileMemoryProvider by deleting the decorator and unused import.
python/packages/core/tests/core/test_harness_file_memory.py Updates the test to assert the provider is not marked experimental (no feature-stage metadata).

@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.

Automated Code Review

Reviewers: 5 | Confidence: 95%

✓ Correctness

This is a straightforward, correct change. The @experimental decorator and its import are cleanly removed from FileMemoryProvider in _file_memory.py. The ExperimentalFeature.HARNESS enum and experimental decorator remain in use in _file_access.py for the still-experimental file-store types, so no dead code or missing references are introduced. The test is properly inverted to assert the absence of experimental metadata. No correctness issues found.

✓ Security Reliability

This PR cleanly removes the @experimental decorator from FileMemoryProvider and updates the corresponding test to assert the absence of experimental metadata. The removed import (ExperimentalFeature, experimental) was only used by the decorator in this file, so no dangling references remain. The ExperimentalFeature.HARNESS enum value is still actively used by many other harness modules (_file_access.py, _agent.py, _todo.py, _loop.py, _memory.py, _background_agents.py), so it is correctly retained. No security or reliability issues found.

✓ Test Coverage

The PR cleanly removes the @experimental decorator from FileMemoryProvider and updates the corresponding test to verify graduation. The updated test (test_file_memory_provider_is_not_experimental) correctly asserts that both __feature_stage__ and __feature_id__ metadata are absent, which is a slightly stronger guard than the original test (which only checked __feature_stage__). Test coverage for the behavioral change is adequate — the rest of the existing test suite continues to exercise the provider's functional behavior without relying on experimental status. No test gaps found.

✓ Failure Modes

This PR cleanly removes the @experimental decorator from FileMemoryProvider and updates the corresponding test to assert the absence of experimental metadata. The import removal is safe — no other reference to ExperimentalFeature or experimental exists in _file_memory.py. There are no silent failure modes, swallowed exceptions, or operational risks introduced by this change. The decorator removal is a purely declarative change that does not alter any runtime behavior, error handling, or data paths.

✗ Design Approach

The PR removes experimental metadata from FileMemoryProvider, but the normal file-memory code path still instantiates an experimental store, so users will continue to see ExperimentalWarning when using file memory through the default harness wiring. That means the current design does not fully deliver the stated graduation goal; I have one blocking design issue on that path and no additional suggestions beyond resolving that inconsistency.

Flagged Issues

  • Graduating only FileMemoryProvider is incomplete: the default harness path still creates FileSystemAgentFileStore for file memory (python/packages/core/agent_framework/_harness/_agent.py:181-186), and experimental classes emit runtime warnings on instantiation (python/packages/core/agent_framework/_feature_stage.py:263-283). Because FileSystemAgentFileStore remains decorated as experimental (python/packages/core/agent_framework/_harness/_file_access.py:767-768), downstream users still hit experimental warnings on the standard file-memory path even after this PR.

Automated review by westey-m's agents

@github-actions

Copy link
Copy Markdown
Contributor

Flagged issue

Graduating only FileMemoryProvider is incomplete: the default harness path still creates FileSystemAgentFileStore for file memory (python/packages/core/agent_framework/_harness/_agent.py:181-186), and experimental classes emit runtime warnings on instantiation (python/packages/core/agent_framework/_feature_stage.py:263-283). Because FileSystemAgentFileStore remains decorated as experimental (python/packages/core/agent_framework/_harness/_file_access.py:767-768), downstream users still hit experimental warnings on the standard file-memory path even after this PR.


Source: automated DevFlow PR review

@github-actions

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework/_harness
   _file_memory.py2282389%345–346, 364–365, 387–388, 396–397, 406, 421–422, 424, 435, 440–441, 449–450, 452, 463, 468–469, 482, 484
TOTAL44429524388% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
8965 33 💤 0 ❌ 0 🔥 2m 14s ⏱️

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

Labels

breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants