[ResilienceManagement] RO update commands (namespace: resilience) - #3352
Open
adishiritwick wants to merge 48 commits into
Open
[ResilienceManagement] RO update commands (namespace: resilience)#3352adishiritwick wants to merge 48 commits into
adishiritwick wants to merge 48 commits into
Conversation
# Conflicts: # servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
# Conflicts: # eng/tools/VallyEvaluator/tests/VallyUtilitiesTests.cs
# Conflicts: # .vscode/cspell.json
…Oupdate # Conflicts: # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/assets.json
# Conflicts: # eng/tools/VallyEvaluator/src/Program.cs # eng/tools/VallyEvaluator/tests/VallyUtilitiesTests.cs
adishiritwick
requested review from
a team and
Vinay Gera (g2vinay)
as code owners
August 22, 2026 18:59
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Thank you for your contribution adishiritwick! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the Azure Resilience Management toolset with a new recovery plan readiness check, richer recovery plan create/update capabilities (additional groups and actions), and a breaking rename of the recovery plan/job command groups to single-word names for tool/command consistency.
Changes:
- Added
recoveryplan checkreadinesscommand with new readiness result models and service implementation. - Enhanced
recoveryplan createto accept/validate JSON for additional recovery groups and pre/post actions, and wired the new inputs through the service layer. - Renamed command groups to
recoveryplanandrecoveryjob, updating consolidated tool mappings, docs, prompts, and test infrastructure accordingly.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/test-resources.bicep | Makes test resource naming more deterministic via a new baseName parameter. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/test-resources-post.ps1 | Improves post-deploy provisioning robustness, adds RBAC assignment, and makes goal assignment/drill creation idempotent. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Services/ResilienceManagementServiceTests.cs | Adds unit coverage for readiness helpers (timeouts, polling, recovery job ID parsing) and recovery group behavior. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/ResilienceManagementCommandTests.cs | Updates live/integration-style tests to use the renamed tool IDs and adds readiness coverage. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanUpdateResourcesCommandTests.cs | Adds test coverage for UTF-8 payload byte-limit enforcement. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanCreateCommandTests.cs | Expands tests for additional groups and action validation/forwarding. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanCheckReadinessCommandTests.cs | New unit tests for the checkreadiness command behavior and error mapping. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/assets.json | Updates recorded-test assets tag. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/ResilienceManagementService.cs | Implements readiness polling and extends recovery plan creation to support groups/actions. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/IResilienceManagementService.cs | Extends service contract for groups/actions and adds readiness API. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/ResilienceManagementSetup.cs | Registers new command and applies the breaking command group renames. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanCreateOption.cs | Adds options and detailed descriptions for group/action JSON inputs. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanCheckReadinessOption.cs | New options for readiness command. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessResult.cs | New readiness result DTO. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessFailedTask.cs | New DTO for readiness failed tasks. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessFailedResource.cs | New DTO for readiness failed resources. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessError.cs | New DTO for readiness error details. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanGroupInput.cs | New DTO for additional group inputs. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanGroupActionKind.cs | New enum describing supported action kinds. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanGroupActionInput.cs | New DTO for action inputs (manual and runbook). |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/ResilienceManagementJsonContext.cs | Registers readiness result type for source-generated JSON serialization. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanUpdateResourcesCommand.cs | Enforces payload size limit by UTF-8 bytes rather than string length. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanCreateCommand.cs | Parses/validates JSON group/action inputs and forwards them to the service. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanCheckReadinessCommand.cs | New command to run readiness checks and return structured readiness results. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Updates mappings for renamed tools and adds a consolidated tool for readiness checks. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Updates prompts for renamed tools and adds prompts for readiness checks and group/action scenarios. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Updates CLI docs for renamed groups and documents new readiness command and create options. |
| servers/Azure.Mcp.Server/changelog-entries/resilience-recovery-plan-commands.yaml | Adds changelog entries for new features and breaking renames. |
| .vscode/cspell.json | Adds new command/group terms to spelling allowlist. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
What does this PR do?
Adds recovery-group and pre/post action management to the Azure Resilience Management toolset (Azure.Mcp.Tools.ResilienceManagement, command namespace resilience).
This PR extends resilience recoveryplan create so it can create, replace, and remove additional recovery groups and configure pre/post actions for both the default group and additional groups. Existing recovery-plan settings are preserved during sparse updates when the corresponding options are omitted.
The command remains destructive (Destructive = true), idempotent (Idempotent = true), and not read-only (ReadOnly = false) because it creates or updates recovery-plan configuration using PUT semantics.
This is PR 3 of the rollout plan in [#3241 ]
Command updated:
#Recovery Plan
#Recovery Group Actions
#Validation completed:
Tool Selection Analysis Setup
Setup completed: 2026-08-23 01:17:06
Tool count: 351
Database setup time: 2.6544743s
Tool Selection Analysis Results
Analysis Date: 2026-08-23 01:17:06
Tool count: 351
Table of Contents
Test 1
Expected Tool:
resilience_recoveryplan_createPrompt: Create a Zonal recovery plan named <recovery_plan_name> in service group <service_group>
Results
resilience_recoveryplan_createresilience_recoveryplan_getresilience_recoveryplan_deleteresilience_recoveryplan_checkreadinessresilience_recoveryplan_resource_updateTest 2
Expected Tool:
resilience_recoveryplan_createPrompt: Set up a Zonal recovery plan named <recovery_plan_name> in service group <service_group>. Use a system-assigned managed identity, description <plan_description>, and default recovery group description <default_group_description>
Results
resilience_recoveryplan_createresilience_recoveryplan_getresilience_recoveryplan_checkreadinessresilience_recoveryplan_deleteresilience_recoveryplan_resource_updateTest 3
Expected Tool:
resilience_recoveryplan_createPrompt: Create Zonal recovery plan <recovery_plan_name> in service group <service_group> and attach user-assigned managed identity <user_assigned_identity_resource_id>. Use <plan_description> for the plan description and <default_group_description> for the default recovery group
Results
resilience_recoveryplan_createresilience_recoveryplan_getresilience_recoveryplan_resource_updateresilience_recoveryplan_checkreadinessresilience_recoveryplan_deleteTest 4
Expected Tool:
resilience_recoveryplan_createPrompt: Change recovery plan <recovery_plan_name> in service group <service_group> to a system-assigned managed identity and description <plan_description>. Keep its Zonal plan type and existing recovery groups
Results
resilience_recoveryplan_createresilience_recoveryplan_getresilience_recoveryplan_resource_updateresilience_recoveryplan_deleteresilience_recoveryplan_checkreadinessTest 5
Expected Tool:
resilience_recoveryplan_createPrompt: Split recovery plan <recovery_plan_name> in service group <service_group> into its default recovery group and one additional group described as <additional_group_description>. Preserve its existing plan type and managed identity
Results
resilience_recoveryplan_createresilience_recoveryplan_resource_updateresilience_recoveryplan_getresilience_recoveryplan_deleteresilience_recoveryplan_checkreadinessTest 6
Expected Tool:
resilience_recoveryplan_createPrompt: Update recovery plan <recovery_plan_name> in service group <service_group>. Add a manual pre-action named <manual_action_name> with timeout <timeout_minutes> to the default group, and add a post-action script using Automation runbook <runbook_resource_id> to additional recovery group <recovery_group_id>. Preserve its existing plan type and managed identity
Results
resilience_recoveryplan_createresilience_recoveryplan_resource_updateresilience_recoveryplan_getresilience_recoveryplan_checkreadinessresilience_recoveryplan_deleteTest 7
Expected Tool:
resilience_recoveryplan_createPrompt: Add a pre-action to the default group of recovery plan <recovery_plan_name> in service group <service_group>. I have not chosen the action values yet. Explain the accepted values and ask me for the action type, name, optional description, timeout, and any runbook-specific values one at a time before updating the plan. Preserve its existing plan type and managed identity
Results
resilience_recoveryplan_createresilience_recoveryplan_resource_updateresilience_recoveryplan_getresilience_recoveryplan_checkreadinessresilience_recoveryplan_deleteTest 8
Expected Tool:
resilience_recoveryplan_createPrompt: Change a system-assigned recovery plan <recovery_plan_name> in service group <service_group> to use a user-assigned managed identity
Results
resilience_recoveryplan_createresilience_recoveryplan_resource_updateresilience_recoveryplan_getresilience_recoveryplan_deleteresilience_recoveryplan_checkreadinessTest 9
Expected Tool:
resilience_recoveryplan_createPrompt: Update recovery plan <recovery_plan_name> in service group <service_group> to use both its system-assigned identity and user-assigned managed identity <user_assigned_identity_resource_id>. Preserve its existing plan settings
Results
resilience_recoveryplan_createresilience_recoveryplan_resource_updateresilience_recoveryplan_getresilience_recoveryplan_checkreadinessresilience_recoveryplan_deleteSummary
Total Prompts Tested: 9
Analysis Execution Time: 3.9054768s
Success Rate Metrics
Top Choice Success: 100.0% (9/9 tests)
Confidence Level Distribution
💪 Very High Confidence (≥0.8): 0.0% (0/9 tests)
🎯 High Confidence (≥0.7): 22.2% (2/9 tests)
✅ Good Confidence (≥0.6): 100.0% (9/9 tests)
👍 Fair Confidence (≥0.5): 100.0% (9/9 tests)
👌 Acceptable Confidence (≥0.4): 100.0% (9/9 tests)
❌ Low Confidence (<0.4): 0.0% (0/9 tests)
Top Choice + Confidence Combinations
💪 Top Choice + Very High Confidence (≥0.8): 0.0% (0/9 tests)
🎯 Top Choice + High Confidence (≥0.7): 22.2% (2/9 tests)
✅ Top Choice + Good Confidence (≥0.6): 100.0% (9/9 tests)
👍 Top Choice + Fair Confidence (≥0.5): 100.0% (9/9 tests)
👌 Top Choice + Acceptable Confidence (≥0.4): 100.0% (9/9 tests)
Success Rate Analysis
🟢 Excellent - The tool selection system is performing exceptionally well.
📈 Recommendation: Consider optimizing tool descriptions to achieve higher confidence scores (≥0.8).
GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline