fix: updated the testcases and resolve the conflict - #1105
Merged
Conversation
Dhruvkumar-Microsoft
requested review from
Avijit-Microsoft,
Fr4nc3,
Prajwal-Microsoft,
Roopan-Microsoft,
Vinay-Microsoft,
aniaroramsft,
dgp10801,
nchandhi and
toherman-msft
as code owners
July 20, 2026 12:46
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request streamlines deployment configuration by removing the custom azure_custom.yaml/main_custom.bicep path in favor of a single azure.yaml, updates CI/CD triggers and documentation to match, and adds/adjusts a sizable set of backend unit tests (including new coverage for MCP config, agent registry, router endpoints, and orchestration connection state).
Changes:
- Removed custom deployment configuration (
azure_custom.yaml,infra/main_custom.bicep) and updated pipeline triggers to watch onlyazure.yaml. - Updated deployment documentation to reflect the unified config and corrected script paths/section numbering.
- Added and updated backend unit tests across orchestration, config, services, tools, and API router modules; refined test mocking for external dependencies.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/backend/tools/test_clarification_tool.py | New unit tests for clarification tool answer store and fallback behavior. |
| src/tests/backend/services/test_team_service.py | Expanded tests for model extraction/validation and search index validation helpers. |
| src/tests/backend/orchestration/test_user_interaction_agent.py | New unit test for creating the user interaction agent with MCP tool wiring. |
| src/tests/backend/orchestration/test_orchestration_manager.py | Updated mocks/expectations for team IDs and orchestration builder args. |
| src/tests/backend/orchestration/test_connection_config.py | New tests for orchestration/connection/team config singletons and helpers. |
| src/tests/backend/conftest.py | Enhanced framework mocking and SDK patching for improved test collection. |
| src/tests/backend/config/test_mcp_config.py | New tests for MCP config env parsing, headers, and knowledge base URL building. |
| src/tests/backend/config/test_agent_registry.py | New tests for AgentRegistry lifecycle tracking and cleanup behavior. |
| src/tests/backend/common/utils/test_team_utils.py | Adjusted test expectations to match in-place team mutation behavior. |
| src/tests/backend/common/utils/test_agent_utils.py | Improved module-level mocking imports and Azure stubbing setup. |
| src/tests/backend/callbacks/test_response_handlers.py | Updated mocking and expectations for markdown normalization and content concatenation. |
| src/tests/backend/api/test_router.py | New router tests with robust import isolation and collaborator patching. |
| src/backend/orchestration/plan_review_helpers.py | Minor whitespace cleanup. |
| infra/main_custom.bicep | Removed custom Bicep entrypoint for local-change deployment. |
| docs/DeploymentGuide.md | Updated script paths/section numbering; removed advanced custom-config swapping section. |
| azure.yaml | Enabled template metadata (uncommented) for unified configuration. |
| azure_custom.yaml | Removed custom azd configuration file. |
| .github/workflows/docker-build-and-push.yml | Updated workflow triggers to stop referencing removed config. |
| .github/workflows/deploy-waf.yml | Updated workflow triggers to stop referencing removed config. |
| .azdo/pipelines/azure-dev.yml | Updated pipeline triggers to stop referencing removed config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
110
to
115
| if importlib.util.find_spec('agent_framework') is not None: | ||
| # Real agent_framework (and its companion distributions) are installed; | ||
| # use them directly instead of substituting stubs. | ||
| return | ||
|
|
||
| if 'agent_framework' not in sys.modules: |
| @@ -119,40 +188,56 @@ def _decorator(func): | |||
|
|
|||
| if 'agent_framework_orchestrations' not in sys.modules: | |||
| _install_lazy_attrs(mock_af_orch_mag) | ||
| sys.modules['agent_framework_orchestrations._magentic'] = mock_af_orch_mag | ||
|
|
||
| if 'agent_framework_azure_ai' not in sys.modules: |
| mock_af_ai.AzureAIClient = _stub_class('AzureAIClient') | ||
| sys.modules['agent_framework_azure_ai'] = mock_af_ai | ||
|
|
||
| if 'agent_framework_foundry' not in sys.modules: |
| mock_af_foundry.FoundryChatClient = _stub_class('FoundryChatClient') | ||
| sys.modules['agent_framework_foundry'] = mock_af_foundry | ||
|
|
||
| if 'agent_framework_openai' not in sys.modules: |
Roopan-Microsoft
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request primarily removes the custom deployment configuration (
azure_custom.yaml) in favor of a single unifiedazure.yamlfile, streamlining deployment and configuration management. It also updates CI/CD pipeline triggers to reflect this change, cleans up related documentation, and adds new unit tests for the agent registry. Several minor test improvements and clarifications are also included.Configuration and Pipeline Simplification:
azure_custom.yamland migrated all configuration into a singleazure.yaml, enabling a unified deployment process and eliminating the need to swap config files for local changes. [1] [2]azure_custom.yaml, ensuring pipelines only respond to changes in the main configuration. (.azdo/pipelines/azure-dev.yml,.github/workflows/deploy-waf.yml,.github/workflows/docker-build-and-push.yml) [1] [2] [3] [4]Documentation Updates:
DeploymentGuide.mdand all instructions about swapping configuration files, reflecting the new unified config approach.DeploymentGuide.mdfor accuracy and consistency. [1] [2]Testing Improvements:
AgentRegistrysingleton, covering registration, cleanup, and error handling.Test Logic Correction:
test_team_utils.pyto verify that team configuration mutations are performed in place, reflecting the actual implementation. [1] [2]Minor Code Cleanup:
plan_review_helpers.py.Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information