Skip to content

fix: Dev v4 to main PR#1001

Merged
Roopan-Microsoft merged 26 commits into
mainfrom
dev-v4
May 25, 2026
Merged

fix: Dev v4 to main PR#1001
Roopan-Microsoft merged 26 commits into
mainfrom
dev-v4

Conversation

@Dhruvkumar-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request primarily updates the naming of a key Azure role from "Azure AI User" to "Foundry User" throughout the documentation, infrastructure, and scripts, to match current Azure terminology. Additionally, it introduces improved error handling and status reporting in the frontend and backend plan orchestration workflow.

Role Naming Consistency Updates:

  • All references to the "Azure AI User" role in documentation (docs/LocalDevelopmentSetup.md, docs/re-use-foundry-project.md), infrastructure Bicep modules (infra/main.bicep, infra/main_custom.bicep), deployment scripts (infra/scripts/assign_azure_ai_user_role.sh), and generated ARM templates (infra/main.json) have been changed to "Foundry User" for accuracy and clarity. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

Frontend Plan Orchestration Improvements:

  • Enhanced error handling in the plan execution workflow: when a plan fails or an error is received as a final result message, the UI now clearly displays an error message, updates plan status, stops spinners, and disables further input. [1] [2] [3] [4] [5] [6] [7]
  • Added a new planFailedFinal action in the Redux slice to centralize error state management for plan execution. [1] [2]
  • Minor UI update: only display the "AI Agent" tag for non-system agents in streaming agent messages.

Backend Orchestration Robustness:

  • Improved error handling in backend orchestration: exceptions in background orchestration tasks are now logged and tracked with additional context, including plan and session IDs.
  • Preparatory backend imports for plan status and database integration, likely supporting the new error reporting and status updates.

These changes ensure consistent terminology, improve user experience by making error states more visible and actionable, and enhance backend robustness for orchestration failures.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
v4/orchestration
   orchestration_manager.py2643188%266–267, 328–330, 334, 340, 352–354, 358, 364, 404–405, 423, 483–484, 491, 493–497, 499–502, 504, 554, 559, 563
TOTAL305538187% 

Tests Skipped Failures Errors Time
886 5 💤 0 ❌ 0 🔥 7.849s ⏱️

Comment thread src/App/src/hooks/usePlanWebSocket.tsx Dismissed
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 pull request aligns Azure AI Foundry RBAC terminology by renaming the “Azure AI User” role to “Foundry User” across docs/infra/scripts, and improves plan-execution failure reporting end-to-end (backend orchestration → WebSocket → frontend UI state).

Changes:

  • Rename “Azure AI User” → “Foundry User” in documentation, Bicep templates, ARM template output, and the role-assignment script.
  • Backend: propagate orchestration failures with richer logging/telemetry and emit ERROR_MESSAGE WebSocket events; attempt to mark the plan as failed in storage.
  • Frontend: add a centralized planFailedFinal Redux action and handle ERROR_MESSAGE (plus a safety net for error-as-final-result), improving UX for failure states; minor UI tweak for “AI Agent” tag display.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tests/backend/v4/orchestration/test_orchestration_manager.py Extends mocks to cover new imports/message types used by orchestration error handling.
src/backend/v4/orchestration/orchestration_manager.py Adds plan_id threading, DB status update on failure, and sends ERROR_MESSAGE via WebSocket.
src/backend/v4/api/router.py Wraps background orchestration task with error logging + telemetry (plan/session/user context).
src/App/src/store/slices/planSlice.ts Adds planFailedFinal action to centralize plan failure UI state updates.
src/App/src/hooks/usePlanWebSocket.tsx Handles ERROR_MESSAGE and updates plan/UI state accordingly; disconnects socket on terminal failure.
src/App/src/components/content/streaming/StreamingAgentMessage.tsx Only shows “AI Agent” tag for non-system agent messages.
infra/scripts/assign_azure_ai_user_role.sh Updates role-name output/messages to “Foundry User”.
infra/main.json Regenerates ARM template (Bicep generator metadata and formatting changes).
infra/main.bicep Updates inline role comment to “Foundry User”.
infra/main_custom.bicep Updates inline role comment to “Foundry User”.
docs/re-use-foundry-project.md Updates role assignment guidance to “Foundry User”.
docs/LocalDevelopmentSetup.md Updates local dev role assignment command to “Foundry User”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/backend/v4/orchestration/orchestration_manager.py
Comment thread src/backend/v4/orchestration/orchestration_manager.py
Comment thread infra/scripts/assign_azure_ai_user_role.sh Outdated
feat: Enhance email template, add RG owner tag, scalability input
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (1)

src/App/src/hooks/usePlanWebSocket.tsx:260

  • In the ERROR_MESSAGE handler you mark the plan failed and disconnect, but you don’t disable the chat input. If input was enabled (e.g., after a clarification request), the user can still submit text against a disconnected/failed run. Dispatch setSubmittingChatDisableInput(true) as part of this failure handling.
                const errorAgent: AgentMessageData = {
                    agent: 'system',
                    agent_type: AgentMessageType.SYSTEM_AGENT,
                    timestamp: Date.now(),
                    steps: [],
                    next_steps: [],
                    content: formatErrorMessage(errorContent),
                    raw_data: errorMessage || '',
                };
                dispatch(addAgentMessage(errorAgent));
                dispatch(planFailedFinal());
                dispatch(setShowBufferingText(false));
                scrollToBottom();
                showToast(errorContent, 'error');
                webSocketService.disconnect();
            },

Comment thread src/backend/v4/orchestration/orchestration_manager.py
Comment thread src/backend/v4/orchestration/orchestration_manager.py Outdated
Comment thread src/backend/v4/orchestration/orchestration_manager.py
Comment thread src/App/src/hooks/usePlanWebSocket.tsx
Comment thread infra/scripts/assign_azure_ai_user_role.sh Outdated
Comment thread .github/workflows/job-send-notification.yml
Comment thread .github/workflows/job-send-notification.yml
Comment thread src/backend/v4/orchestration/orchestration_manager.py
fix: address SFI security compliance issues
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Comment thread src/backend/v4/orchestration/orchestration_manager.py
Comment thread infra/scripts/assign_azure_ai_user_role.sh
@Roopan-Microsoft Roopan-Microsoft merged commit 22aa354 into main May 25, 2026
15 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.2.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants