Repository navigation
Python: scope executor activity IDs to workflow runs - #8549
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The delimiter-based ID format permits collisions between unrestricted run and executor IDs.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Scopes executor activity IDs to workflow runs to prevent cross-run snapshot overwrites.
Changes:
- Prefixes activity IDs with the run ID.
- Adds completion and failure regression coverage across runs and executors.
| File | Description |
|---|---|
python/packages/ag-ui/agent_framework_ag_ui/_workflow_run.py |
Adds run-scoped executor activity IDs. |
python/packages/ag-ui/tests/ag_ui/test_workflow_run.py |
Tests activity identity and run separation. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Naveen Chatlapalli (@1aifanatic), thanks for the contribution. The current head is not green: |
|
Fixed in 6992ea0. The regression tests now narrow events with isinstance(event, ActivitySnapshotEvent), so message_id and content are accessed on the concrete event type rather than BaseEvent. I reproduced the CI diagnostics from Test Typing Checks and ran the repository's test-typing task for ag-ui with all five gating checkers: mypy, pyrefly, ty, zuban, and Pyright all pass. The full AG-UI package suite also passes (1,370 passed, 14 skipped), and Ruff lint/format checks pass. The new head is pushed; I will re-request review once its required CI checks are green. The new-head workflows currently show action_required, including Python - Code Quality. A maintainer needs to approve those runs before I can confirm green CI and re-request review. |
Eduard van Valkenburg (eavanvalkenburg)
left a comment
There was a problem hiding this comment.
Naveen Chatlapalli (@1aifanatic) Reviewed the current head; no blocking findings.

Motivation & Context
Executor activity snapshots currently reuse IDs such as
executor:researcheracross workflow runs. A UI or message store keyed by message ID can overwrite the activity from an earlier turn.Description & Review Guide
content.executor_id; no public API or dependency is added.Related Issue
Fixes #7338. Checked the issue discussion, cross-references, and open PRs; no competing implementation was found. The related #7429 concerns lifecycle/thread correlation and explicitly excludes activity message IDs.
Contribution Checklist