Python: fix(ag-ui): dedupe client-replayed transcripts on resume - #8149
Python: fix(ag-ui): dedupe client-replayed transcripts on resume#8149LI (ktz03) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Empty-message resumes can lose stored history in both agent and workflow paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates AG-UI resume handling to deduplicate client-replayed transcripts using snapshot reconstruction.
Changes:
- Applies reconstruction to agent and workflow resume history.
- Adds transcript deduplication regression tests.
File summaries
| File | Review |
|---|---|
python/packages/ag-ui/tests/ag_ui/test_resume_transcript_dedupe.py |
Adds tests, but misses empty-message integration coverage and the required copyright header. |
python/packages/ag-ui/agent_framework_ag_ui/_workflow.py |
Reconstruction drops stored history for empty checkpoint-resume input. |
python/packages/ag-ui/agent_framework_ag_ui/_agent_run.py |
Reconstruction drops stored history for empty approval-resume input. |
Review details
Suppressed comments (1)
python/packages/ag-ui/tests/ag_ui/test_resume_transcript_dedupe.py:1
- This new Python file is missing the required first-line copyright header mandated by
python/CODING_STANDARD.md:453and used throughout this test directory.
"""Regression for AG-UI resume with client-replayed transcript (#8140)."""
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@microsoft-github-policy-service agree |
Use the transcript reconstructor only when the client sends a non-empty messages list; empty approval/checkpoint resumes still go through resume_seeded_messages so stored history is preserved. Also add the required copyright header and document the empty-input reconstructor contract in tests.
|
Addressed Copilot review:
Existing |
|
Addressed on head
Existing |
Add reconcile_resume_messages for empty vs replayed resume shapes, use it from agent and workflow runners, and mark generic reconstructed resumes as seeded so save-time prepend does not duplicate history.
|
Thanks Evan Mattson (@moonbox3) — addressed both points on this head:
Added a unit test covering the session-owned empty vs replayed shapes. |
|
Please resolve individual comments with a note if addressed or not. Then resolve when complete. |
|
Evan Mattson (@moonbox3) Done — replied on each review thread with addressed/partial notes and resolved all five threads. Please take another look when convenient. |
Summary
use_service_sessionAG-UI resume, seed history via_reconstruct_messages_from_thread_snapshotinstead of naive concatenation.Fixes #8140
Test plan