[ResilienceManagement] RO check readiness commands (namespace: resilience) - #3329
Merged
Vinay Gera (g2vinay) merged 38 commits intoAug 24, 2026
Merged
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
|
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
This PR extends the ResilienceManagement toolset and Azure MCP Server surfaces to support recovery plan lifecycle operations (create/update, delete, update-resources, and check-readiness), along with new unit + recorded tests, test-resource scaffolding, and documentation/consolidated-mode updates.
Changes:
- Added new Resilience recovery plan commands (create/delete/update-resources/check-readiness) and corresponding service APIs + models.
- Expanded test infrastructure and added extensive unit + recorded integration coverage for the new behaviors.
- Updated consolidated-mode/tooling docs (README, azmcp-commands, e2e prompts, troubleshooting, changelog, and vally prompt namespace mapping).
Reviewed changes
Copilot reviewed 47 out of 47 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 | Adds lifecycle-specific output names |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/test-resources-post.ps1 | Creates second service group + enrollment |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/remove-test-resources-pre.ps1 | Adds safer pre-teardown cleanup script |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Services/ResilienceManagementServiceTests.cs | New unit tests for service helpers/validation |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/ResilienceManagementCommandTests.cs | Recorded tests for new commands + sanitizers |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanUpdateResourcesCommandTests.cs | New command unit tests (update-resources) |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanDeleteCommandTests.cs | New command unit tests (delete) |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanCreateCommandTests.cs | New command unit tests (create/update) |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanCheckReadinessCommandTests.cs | New command unit tests (check-readiness) |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/assets.json | Updates test proxy assets tag |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/ResilienceManagementService.cs | Implements new recovery plan operations + polling |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/IResilienceManagementService.cs | Extends service interface for new operations |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/ResilienceManagementSetup.cs | Registers new commands and command group entries |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanUpdateResourcesOption.cs | New options for update-resources |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanDeleteOption.cs | New options for delete |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanCreateOption.cs | New options for create/update |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Recovery/Plans/RecoveryPlanCheckReadinessOptions.cs | New options for readiness check |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanUpdateResourcesResult.cs | New update-resources response model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanUpdateResourcesFailedResource.cs | New update-resources failure model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanUpdateResourcesError.cs | New update-resources error model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessResult.cs | New readiness response model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessFailedTask.cs | New readiness failed-task model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessFailedResource.cs | New readiness failed-resource model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanReadinessError.cs | New readiness error model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanKind.cs | Introduces plan-kind enum (Zonal) |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanInfo.cs | Introduces typed plan summary model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanIdentityKind.cs | Introduces identity-kind enum |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanIdentityInfo.cs | Adds identity info model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/RecoveryPlanGroupInfo.cs | Adds recovery group info model |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/ResilienceManagementJsonContext.cs | Registers new models for AOT JSON |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanValidation.cs | Adds shared recovery plan name validation |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanUpdateResourcesCommand.cs | New command implementation (update-resources) |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanDeleteCommand.cs | New command implementation (delete) |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanCreateCommand.cs | New command implementation (create/update) |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanCheckReadinessCommand.cs | New command implementation (check-readiness) |
| tools/Azure.Mcp.Tools.ResilienceManagement/cspell.yaml | Adds Resilience-specific dictionary words |
| servers/Azure.Mcp.Server/TROUBLESHOOTING.md | Adds consolidated-mode “missing command” guidance |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Updates resilience consolidated mapping/description |
| servers/Azure.Mcp.Server/README.md | Adds example prompts for new commands |
| servers/Azure.Mcp.Server/docs/new-command.md | Updates consolidated-mode requirements text |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds prompts for new resilience commands |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents new resilience commands |
| servers/Azure.Mcp.Server/cspell.yaml | Adds additional spelling words |
| servers/Azure.Mcp.Server/changelog-entries/resilience-recovery-plan-commands.yaml | Adds changelog entry for new commands |
| eng/tools/VallyEvaluator/tests/VallyUtilitiesTests.cs | Adds test for namespace alias mapping |
| eng/tools/VallyEvaluator/src/Program.cs | Adds prompt namespace alias logic |
| .vscode/cspell.json | Adds resiliencemanagement term |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vinay Gera (g2vinay)
left a comment
Contributor
There was a problem hiding this comment.
Leaving my comments in-line.
…O/checkreadiness # Conflicts: # servers/Azure.Mcp.Server/changelog-entries/resilience-recovery-plan-commands.yaml # servers/Azure.Mcp.Server/docs/azmcp-commands.md # servers/Azure.Mcp.Server/docs/e2eTestPrompts.md # servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json # tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanCreateCommand.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanDeleteCommand.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanUpdateResourcesCommand.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Recovery/Plans/RecoveryPlanValidation.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/ResilienceManagementJsonContext.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/ResilienceManagementSetup.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/IResilienceManagementService.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/ResilienceManagementService.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanCreateCommandTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanDeleteCommandTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Recovery/Plans/RecoveryPlanUpdateResourcesCommandTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/ResilienceManagementCommandTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Services/ResilienceManagementServiceTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/assets.json # tools/Azure.Mcp.Tools.ResilienceManagement/tests/remove-test-resources-pre.ps1
- Updated JSON resource identifiers for recovery plans and jobs to use a consistent naming convention (e.g., "resilience_recovery_plan_get" to "resilience_recoveryplan_get"). - Enhanced error messages in the RecoveryPlanCheckReadinessCommand to provide clearer feedback on readiness check failures. - Refactored ResilienceManagementService to improve handling of recovery job identifiers, including new methods for validation and retrieval. - Added tests to ensure proper functionality of recovery job identifier handling and error conditions. - Updated PowerShell scripts to include role assignments for recovery contributors and improved provisioning checks. - Modified Bicep templates to ensure deterministic naming for resources based on the resource group name.
…O/checkreadiness
Vinay Gera (g2vinay)
approved these changes
Aug 24, 2026
1 task
21 tasks
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.
Adds recovery-plan readiness assessment to the Azure Resilience Management toolset (Azure.Mcp.Tools.ResilienceManagement, command namespace resilience).
This PR adds a command that starts an Azure Resilience Management readiness assessment for a recovery plan, waits for the resulting recovery job to reach a terminal state, and returns the complete assessment outcome. The implementation reuses the existing toolset plumbing, including IAreaSetup, BaseAzureResourceService, non-standard serviceGroup path-parameter handling, telemetry, AOT-safe serialization, and recorded-test infrastructure.
The command is non-destructive (Destructive = false) but not read-only or idempotent (ReadOnly = false, Idempotent = false) because each invocation creates one new readiness job with a unique operation ID.
This is PR 2 of the rollout plan in [#3241 ]
Commands added:
Recovery Plan
Discovers and assesses whether a recovery plan and its protected resources are ready for recovery operations.
Starts exactly one readiness job per invocation.
Waits for the readiness job to reach Completed, Failed, or Cancelled.
Polls the specific recovery job every 30 seconds with a 10-minute timeout.
Returns the operation ID, recovery job ID, readiness status, job errors, failed tasks, and failed resources.
Treats a completed assessment with readiness failures as a successful command response with isReady: false.
Handles transient job availability responses while preserving caller cancellation and timeout behavior.
Also includes unit tests for command behavior and bounded polling, a recorded live test with playback validation, AOT-safe response model registration, README and command documentation, end-to-end prompts, consolidated tool registration, a changelog entry, and updated test-proxy assets.
Recovery Plan Check-Readiness Tool Description Evaluation
Tool
resilience_recoveryplan_checkreadinessazmcp resilience recoveryplan checkreadinessResults
<recovery_plan_name>and its protected resources are ready for recovery operations in service group<service_group><recovery_plan_name>in service group<service_group>Acceptance Criteria
The expected tool must rank first with a confidence score of at least 0.6 for every prompt.
Evaluator Command
The report was generated with ToolDescriptionEvaluator using a one-tool inventory and the two production prompts from
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md.Conclusion
Pass: the registered tool has rank 1 for every evaluated prompt, and all scores exceed
0.6.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