Normalize command result shapes to object-root *CommandResult records#3058
Draft
vcolin7 wants to merge 22 commits into
Draft
Normalize command result shapes to object-root *CommandResult records#3058vcolin7 wants to merge 22 commits into
vcolin7 wants to merge 22 commits into
Conversation
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
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?
PR 3 of the input/output schema modernization series (follows #2995 "Modernize
inputSchema" and #3000 "outputSchema+structuredContentinfrastructure"). This PR is stacked onvcolin7/output-schema-infra— please review with that as the base.Why: PR 4+ will attach
ResultTypeInfo(i.e.outputSchema+structuredContent) uniformly across every namespace. That only works cleanly if every command's payload root is already a well-formed object. Today a number of commands emit bare JSON arrays, raw scalars/strings, loosely-named records, or several different record types depending on state — none of which can have an objectoutputSchemaattached uniformly. This PR fixes the result shapes so PR 4 becomes a mechanical wiring pass.Approach (shape-only): for every command, make
ResponseResult.Create(...)emit a single{Resource}{Operation}CommandResultrecord whose JSON root is an object, by one of:*CommandResultobject root (3b).*CommandResultconvention.Every new/changed record is registered in its source-gen
*JsonContext([JsonSerializable(...)]) for AOT safety. This PR intentionally does not wireResultTypeInfo/SetResult(that is PR 4) and excludes App Configuration, which was migrated in PR 2 as the pilot and is the reference template.Where a shape necessarily changed (bare array/scalar/object → object root) that is an intentional, user-facing output change and is captured in the changelog entries.
Tools normalized
vm get,vmss get*CommandResultw/ optional fields447a29b17namespace get*CommandResultc3c7c4dc5importjob get,autoimportjob get,autoexportjob get*CommandResultrecordse344db853*CommandResultfd7d5af73server get(+ others){ servers: [...] }; rename recordsserver get)60ed90764index query{ results: [...] }7f1c9a189blob uploadBlobUploadResult→BlobUploadCommandResult53240007crecommendation apply(+ others){ rules: [...] }90836e140language list,project get327d30985get{ bestPractices: [...] }/{ guidance: [...] }0a6941721{result}/{results}/{health})fb210099dgroup list*CommandResulta01c5c7fcmonitoredresources list*CommandResult417a8899c*CommandResultf5ac53f19*CommandResulta43f19435*CommandResultea27a2e9e*CommandResult95026f8c4*CommandResult38e7b3107designDesignCommandResult91f8e483093abe9c09{shortcut}/{shortcuts,...}/{role}/{roles,...}/{settings})03d564ddcChangelog entries added in
ac6893be2(6 Azure + 4 Fabric Breaking Changes).Intentionally not touched
ResultTypeInfo == null):service start, plugin telemetry — intentionally payload-free / raw passthrough.tools list(emits a bare-arrayresultspayload that is a hard CLI wire contract consumed byeng/scripts/New-ToolsListFile.ps1,Update-AzCommandsMetadata.ps1, and the ToolDescriptionEvaluator scripts — wrapping it would break them); the shared SreAgent result types (SreAgentInvestigationResult,SreAgentThreadOperationResult,ScheduledTaskOperationResult,SreAgentTextResult), which are already object-root service DTOs / two-genericTResultand auto-wire in PR 4 with zero output churn.Verification
./eng/scripts/Build-Local.ps1 -VerifyNpx: all 3 servers (Azure, Fabric, Template) build + package AOT-safe;npx ... tools listsmoke test passes for Azure and Fabric (status 200), confirming all source-genJsonContextregistrations resolve.GitHub issue number?
N/A — part of the input/output schema modernization series (see #2995, #3000). No standalone tracking issue.
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentation — N/A (no tool surface change)README.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package README — N/AToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts — N/A (no description changes)consolidated-tools.json— N/A (no tool-name changes; only internal result-record renames)breaking-changelabel — N/A (no tool renames)servers/Azure.Mcp.Server/docs/azmcp-commands.md— N/A./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI) — N/Aservers/Azure.Mcp.Server/docs/e2eTestPrompts.md— N/Acrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test PipelineInvoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess to the repo need to validate the contents of this PR before leaving a comment with the text/azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.