-
Notifications
You must be signed in to change notification settings - Fork 96
Fix: consumption SKU agent runAfter bug — restore runAfter when re-adding agent loop #8663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix: consumption SKU agent runAfter bug — restore runAfter when re-adding agent loop #8663
Conversation
- Replace workflowKind check with isA2AWorkflow() helper in parser files - Fixes bug where consumption SKU agents lose runAfter after deletion/recreation - Affects both conversational and autonomous agent workflows - Updated 8 parser files in designer and designer-v2 libraries The issue was that allowRunAfterTrigger only checked for Standard SKU (workflowKind === 'agent') and missed Consumption SKU which uses metadata.agentType === 'conversational'. This caused agents to have no runAfter connection to trigger, breaking handoff addition.
- Added 21 tests covering all detection paths (Standard SKU, Consumption metadata, trigger pattern) - Tests verify case-sensitive metadata check and case-insensitive trigger check - Tests cover edge cases: empty state, missing triggers, priority/short-circuit behavior - Tests added to both designer and designer-v2 libraries for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where the runAfter property wasn't being set correctly for Agent-to-Agent (A2A) workflows in Consumption SKU. The fix replaces a simple workflowKind check with a more comprehensive isA2AWorkflow() helper that detects A2A workflows across both Standard and Consumption SKUs.
Key Changes:
- Introduced
isA2AWorkflow()helper function to properly detect A2A workflows across both SKUs - Replaced direct
equals(state.workflowKind, 'agent')checks with the new helper in workflow manipulation functions - Added comprehensive test coverage for the new detection logic
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/designer/src/lib/core/state/workflow/test/helper.spec.ts | Added comprehensive unit tests for isA2AWorkflow() function covering Standard SKU, Consumption SKU, and edge cases |
| libs/designer/src/lib/core/parsers/pasteScopeInWorkflow.ts | Updated to use isA2AWorkflow() helper instead of direct workflowKind check |
| libs/designer/src/lib/core/parsers/moveNodeInWorkflow.ts | Updated to use isA2AWorkflow() helper for both old and new graph locations |
| libs/designer/src/lib/core/parsers/deleteNodeFromWorkflow.ts | Updated to use isA2AWorkflow() helper when deleting nodes |
| libs/designer/src/lib/core/parsers/addNodeToWorkflow.ts | Updated to use isA2AWorkflow() helper when adding nodes |
| libs/designer-v2/src/lib/core/state/workflow/test/helper.spec.ts | Added identical comprehensive unit tests for designer-v2 library |
| libs/designer-v2/src/lib/core/parsers/pasteScopeInWorkflow.ts | Updated to use isA2AWorkflow() helper (designer-v2 version) |
| libs/designer-v2/src/lib/core/parsers/moveNodeInWorkflow.ts | Updated to use isA2AWorkflow() helper (designer-v2 version) |
| libs/designer-v2/src/lib/core/parsers/deleteNodeFromWorkflow.ts | Updated to use isA2AWorkflow() helper (designer-v2 version) |
| libs/designer-v2/src/lib/core/parsers/addNodeToWorkflow.ts | Updated to use isA2AWorkflow() helper (designer-v2 version) |
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Keep current title or drop Fix: prefix if repo prefers. |
| Commit Type | ✅ | Correct (fix). |
| Risk Level | Change to Medium (update PR body + labels) due to behavioral changes across multiple parser files. |
|
| What & Why | ✅ | Add a one-line note about the new isA2AWorkflow helper. |
| Impact of Change | ✅ | Add a staging QA step to verify runAfter edges for consumption A2A workflows. |
| Test Plan | Unit tests present — please add E2E or an explicit QA checklist. | |
| Contributors | Add contributors or note none. | |
| Screenshots/Videos | ✅ | N/A — acceptable. |
Final Notes
- Advised risk: Medium (higher than the submitter's Low). Please update the PR body selection and the repo label to
risk:mediumto reflect the behavioral scope. - Tests: Unit tests for the helper are included (good). Please either:
- add an E2E test that covers deleting and re-adding an agent loop in a consumption workflow and verifies runAfter restoration; or
- add a clear manual QA checklist and mark which environments/staging scenarios were validated.
- Contributors: Add the names/handles of contributors or annotate if none.
Please update the PR risk label and the Test Plan (E2E or QA checklist) and re-submit — thanks for the thorough tests and clear PR description!
(PR diff summary: 10 files changed, +638 additions, -20 deletions.)
Last updated: Fri, 23 Jan 2026 23:28:08 GMT
Commit Type
Risk Level
What & Why
Run after property wasn't being set properly for A2A workflows in consumption. If the agent loop was deleted, re-adding it would not be valid because the runAfter would not get set back up
Impact of Change
Test Plan
Contributors
Screenshots/Videos