-
Notifications
You must be signed in to change notification settings - Fork 95
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
✅ Commit Type
❌ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Keep as-is or align with conventional commit prefix if used in repo |
| Commit Type | ✅ | None |
| Risk Level | ❌ | Add repo label risk:medium and/or update PR body risk to Medium and justify if you think Low is correct |
| What & Why | ✅ | Optionally add a short user-observed example |
| Impact of Change | ✅ | Clarify migration/backwards-compat details |
| Test Plan | ✅ | Add E2E/integration test or documented rationale for not adding one; include how/where tests ran |
| Contributors | Consider adding credits | |
| Screenshots/Videos | ✅ | Not required |
Final message
Please address the risk-label mismatch and add the repo risk label (risk:medium) or update the PR body to justify keeping Low. Also consider adding an E2E/integration test (or a clear rationale for why none is needed) that validates the full re-add-agent-loop flow in a staging-like environment.
Quick actionable checklist to update PR before merging:
- Add repo label:
risk:medium(orrisk:lowwith a detailed justification). This must match the "Risk Level" section in the PR body. - If you keep the PR Risk Level as Low, add a short explanation in the PR body explaining why this behavioral change is limited and why it cannot affect other workflows.
- Add or reference an E2E/integration test covering re-adding an agent loop in Consumption SKU or explain why it is not necessary.
- Optionally add contributor credits and a short repro example under "What & Why" to make the user impact clearer.
Thanks — once the risk label is added/updated and you either add an E2E test or justify its absence, this PR will be in much better shape for final review and merge.
Last updated: Tue, 06 Jan 2026 21:18:02 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