Repository navigation
Python: Fix per message user mapping in purview - #10193
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the per-message user-attribution change.
No open issues 🎉
What changed in this PR
This PR fixes per-message user attribution in the Python Purview integration so messages from different users can be evaluated under their respective identities.
Changes:
- Resolve identities per message, inheriting the latest explicit identity when absent and using the first explicit identity for leading messages.
- Preserve credential/provided-user overrides and return the final resolved identity for response processing.
- Add tests for mixed-user messages, identity precedence, and overrides.
| File | Description |
|---|---|
python/packages/purview/tests/purview/test_processor.py |
Tests per-message attribution, identity inheritance, precedence, and overrides. |
python/packages/purview/agent_framework_purview/_processor.py |
Implements per-message identity resolution and updates its documentation. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): 6c3576326f67
Model: gpt-5.6-sol
Overview
The change materializes the input once, resolves each message's identity with explicit override precedence, and preserves fail-closed behavior when no valid tenant or user can be resolved. The added tests cover mixed-user batches, identity inheritance, metadata precedence, and credential/provided overrides. No publishable Critical, High, or Medium defect remains after applying the package's documented trusted-identity boundary.
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.
Motivation & Context
Fix bug with per message user mapping in purview
Description & Review Guide
Fix bug with per message user mapping in purview
Related Issue
Fixes #
AI Assistance
AI assistance details:
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.