Skip to content

Python: [BREAKING] Scope Redis history storage keys - #8236

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
microsoft:mainfrom
eavanvalkenburg:fluffy-succotash
Sep 11, 2026
Merged

Python: [BREAKING] Scope Redis history storage keys#8236
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
microsoft:mainfrom
eavanvalkenburg:fluffy-succotash

Conversation

@eavanvalkenburg

@eavanvalkenburg Eduard van Valkenburg (eavanvalkenburg) commented Sep 10, 2026

Copy link
Copy Markdown
Member

Motivation & Context

Redis-backed conversation history needs stable storage boundaries across applications, providers, tenants, agents, and sessions, while existing deployments need an explicit compatibility path for historical keys.

Description & Review Guide

  • What are the major changes? Add a scoped key format as the default, retain the exact historical format through explicit legacy mode, and document deliberate migration.
  • What is the impact of these changes? Scoped mode requires an application ID and non-empty session ID. Existing deployments can opt into legacy formatting while migrating deliberately.
  • What do you want reviewers to focus on? The scoped key boundaries and the explicit legacy compatibility behavior.

Related Issue

Related to #7471

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 the title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings September 10, 2026 12:26
@eavanvalkenburg Eduard van Valkenburg (eavanvalkenburg) added the breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible label Sep 10, 2026
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Sep 10, 2026
@github-actions github-actions Bot changed the title Python: [BREAKING]: Scope Redis history storage keys Python: [BREAKING] [BREAKING]: Scope Redis history storage keys Sep 10, 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.

🔵 Needs a closer look

The breaking persisted-key format and migration implications warrant final human review despite strong unit coverage.

Pull request overview

Introduces scoped Redis conversation-history keys to isolate applications, tenants, agents, providers, and sessions while preserving explicit legacy compatibility.

Changes:

  • Adds deterministic scoped keys and validation.
  • Retains legacy key formatting for migrations.
  • Updates tests, documentation, and samples.
File summaries
File Description
python/packages/redis/agent_framework_redis/_history_provider.py Implements scoped and legacy keys.
python/packages/redis/tests/test_providers.py Tests scoping, validation, and compatibility.
python/packages/redis/README.md Documents isolation and migration.
python/packages/redis/AGENTS.md Updates package guidance.
python/samples/02-agents/conversations/redis_history_provider.py Adds stable scope identifiers.
python/samples/02-agents/context_providers/redis/azure_redis_conversation.py Updates Azure Redis configuration.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 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)): 223503a20fc2
Model: gpt-5.6-sol-fast

Overview

The PR introduces versioned, independently encoded Redis history boundaries while retaining the exact historical key format behind explicit legacy mode. Constructor and operation guards reject missing scoped identifiers, tests cover boundary isolation and legacy compatibility, and all changed production callers provide stable application and session identities. No PR-introduced Critical, High, or Medium defect remained after reconciliation.

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.

@jpalvarezl Jose Alvarez (jpalvarezl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just left a couple of questions and flagged something I might be misunderstanding.

Comment thread python/packages/redis/agent_framework_redis/_history_provider.py
Comment thread python/packages/redis/agent_framework_redis/_history_provider.py
Comment thread python/packages/redis/agent_framework_redis/_history_provider.py
Comment thread python/packages/redis/agent_framework_redis/_history_provider.py
Comment thread python/packages/redis/agent_framework_redis/_history_provider.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merged via the queue into microsoft:main with commit 119c795 Sep 11, 2026
41 checks passed
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 documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants