Skip to content

Python: Clarify Redis context retrieval scope - #8584

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 2 commits into
microsoft:mainfrom
eavanvalkenburg:clarify-redis-context-scope
Sep 21, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 2 commits into
microsoft:mainfrom
eavanvalkenburg:clarify-redis-context-scope

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation & Context

RedisContextProvider supports cross-session memory retrieval, but its public docstring did not explain how optional scope identifiers affect filtering. Callers need to know that omitted identifiers leave that dimension unfiltered so they can provide every intended isolation boundary.

Description & Review Guide

  • What are the major changes? Clarify that retrieval spans sessions, applies every non-empty application_id, agent_id, and user_id conjunctively, and does not filter on omitted identifiers.
  • What is the impact of these changes? Documentation only; retrieval behavior and the public API are unchanged.
  • What do you want reviewers to focus on? Whether the docstring describes the existing scoping contract clearly and concisely.

Related Issue

Fixes #8583

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

Copilot review overview

🟡 Changes recommended

The documentation must clarify that at least one scope identifier is required.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Clarifies Redis context retrieval scope across sessions and identifiers.

Changes:

  • Documents conjunctive filtering for non-empty scope IDs.
  • Explains that omitted IDs leave that dimension unfiltered.
File Description
python/​packages/​redis/​agent_framework_redis/​_context_provider.py Clarifies retrieval scope semantics.

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

Overview

This documentation-only change describes the provider's existing cross-session retrieval model and advises callers to supply trusted isolation identifiers. The implementation and tests confirm that configured identifiers are combined conjunctively, omitted dimensions are not filtered, and at least one scope identifier is enforced before reads or writes. No 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.

Merged via the queue into microsoft:main with commit d91e44e Sep 21, 2026
42 checks passed
@eavanvalkenburg
Eduard van Valkenburg (eavanvalkenburg) deleted the clarify-redis-context-scope branch September 21, 2026 14:38
ZedingZhang (ZedingZhang) pushed a commit to ZedingZhang/agent-framework that referenced this pull request Sep 29, 2026
* Python: Clarify Redis context retrieval scope

* Python: Document required Redis context scope

This branch was previously deployed

1 inactive deployment
github-app-auth — 8d39b90f Deployed Sep 21, 2026 by eavanvalkenburg via add_label #23435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Clarify RedisContextProvider retrieval scope

3 participants