mirror of
https://github.com/microsoft/mcp.git
synced 2026-11-04 12:01:31 +00:00
* Fix AzureBackup governance immutability & soft-delete payload regressions Fixes regressions introduced in PR #3279 (SDK RecoveryServicesBackup 1.2.0 → 1.3.0 upgrade) that broke: azurebackup governance immutability azurebackup governance soft-delete Root cause: SDK 1.3.0 (api-version 2026-05-01+) made previously-optional payload fields required, and PR #3279 did not add them: - ImmutabilityConfiguration.Type / DurationInDays (when state != Disabled) - SoftDeleteRetentionPeriodInDays + EnhancedSecurityState mirror (on every PATCH) Recorded playback did NOT catch this because the matcher uses URI+method only, not request body. Changes: * Options: --immutability-state / --immutability-type both required (typed enums, AsPerPolicy | TimeBased). "Enabled" alias -> Unlocked. * Options: --soft-delete-retention-days required (14-180). Locked + AlwaysOn now clearly marked IRREVERSIBLE. * RSV / DPP services now always populate the newly-required fields. * DPP falls back to top-level BackupVaultSecuritySettings.ImmutabilityState because nested ImmutabilitySettings is internal in DPP 1.8.0. * Regression prevention: internal-static BuildImmutabilitySettings / BuildSoftDeleteSettings helpers on RsvBackupOperations and DppBackupOperations, exercised by dedicated Rsv/DppGovernancePayloadTests. Future SDK bumps will fail unit tests before hitting a live vault. * Docs: azmcp-commands.md, e2eTestPrompts.md updated with the new required parameters and IRREVERSIBLE warnings. * Live recordings refreshed against mcp26139ae9-rsv and mcp26139ae9-dpp; new assets tag Azure.Mcp.Tools.AzureBackup.Tests_040f539e79. 7/7 tests pass in Record mode and Playback. * azurebackup(governance): address PR review + fix spellcheck - Changelog: use allowed `Bugs Fixed` section value (was `Bug Fixes`, which fails schema validation). - Options: reword `--immutability-type` description to match the actual (unconditional) required binding; note the service ignores it when state=Disabled. - Command: mention the `Enabled` backward-compat alias in the immutability command description; relax ValidateOptions so `--immutability-duration-days` is only required for TimeBased when the state is not `Disabled` (matches service behavior). - DPP: correct BuildImmutabilitySettings XML doc — only the top-level ImmutabilityState is populated; the DPP api-version has no nested ImmutabilitySettings.State. - Tests: add regression for Disabled+TimeBased no longer requiring duration. - Cspell: replace British spellings (`normalises`/`normalised`) with US spellings across the three files that CSpell flagged. * azurebackup(governance): trim immutability tool descriptions per PR review Per @alzimmermsft feedback on PR #3430 - enum enumeration and requiredness are already conveyed by the tool's JSON inputSchema, so remove them from the command description and the ImmutabilityState / ImmutabilityType option descriptions. Preserves the non-obvious semantics (Locked is irreversible, Enabled is an alias for Unlocked, Type is ignored when State is Disabled). * azurebackup: add missing final newlines to governance files (dotnet format)