Enhance mpg-sdk-migration skill for autonomous build-fix operation#56706
Merged
live1206 merged 7 commits intoAzure:mainfrom Mar 5, 2026
Merged
Enhance mpg-sdk-migration skill for autonomous build-fix operation#56706live1206 merged 7 commits intoAzure:mainfrom
live1206 merged 7 commits intoAzure:mainfrom
Conversation
- Rewrite Phase 8 as Autonomous Build-Fix Loop with decision trees for error classification, fix selection, and batch strategy - Add autonomous fix recipes for each error pattern (CS0234, CS0051, CS0246, CS0111, CS1729, AZC0030, AZC0032, CS0535, CS0115) - Add autonomous rename resolution strategy using old API surface - Add generator bug detection checklist and fix vs workaround decision - Add batch fix strategy to minimize regeneration cycles - Add SQL error tracking with attempt counters and escalation criteria - Update safety rules: autonomous mode permits spec and custom code changes without asking; define clear escalation boundaries - Enhance Discovery phase: snapshot old API, extract autorest renames, identify custom code folder convention - Add ApiCompat autonomous fix recipes with code examples - Consistent @@clientName namespace syntax across both files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After a generator fix is applied and code is regenerated with RegenSdkLocal.ps1, any custom code workarounds previously added for the same issue must be cleaned up. Stale workarounds cause CS0111 (duplicate definition) or silently override correct generated code. Updated in SKILL.md: - Fix Recipe: Generator Bug - explicit cleanup step with instructions - Sub-Agent Strategy - added cleanup agent step after generator regen Updated in error-reference.md: - Added pitfall Azure#17 about cleaning up stale custom workarounds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ecific logic error-reference.md: 342→63 lines. Replaced verbose per-error tutorials with concise decision tables mapping errors to migration-specific root causes and Azure SDK fix patterns. Copilot already knows what CS0234 means — it only needs the mgmt-migration-specific diagnosis (e.g., 'missing @@clientName'). SKILL.md: 660→590 lines. Removed duplicate fix recipes that were already in error-reference.md. Kept classification algorithm, decision tree, and generator fix workflow. Added cross-reference to error-reference.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Corrected what the mgmt emitter actually auto-handles: only Url→Uri, DateTime→On, Etag→ETag, and RP prefix for Sku/Plan/Usage/Kind. Removed false claims about Is* booleans, general acronym casing. - Removed misleading 'filter out automatic renames' step — if the generator handles it, there's no error to filter. - For all name mismatches, prefer @@clientName in spec over custom code. - Added operation diagnosis: check HTTP path and resource/extension scope to distinguish generator bugs from spec updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Plain partial classes need no attributes for adding new members - [CodeGenType] only when custom class name differs from spec name - [CodeGenSuppress] only when replacing a specific generated member - [CodeGenMember] only when custom property name differs from generated Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…x RegenSdkLocal syntax - Expand auto-naming transform documentation with full RP prefix list, At→On suffix, word stem transforms, resource update model naming - Add @@alternateType decorator throughout: Phase 3 directive mapping, Phase 8 error classification, decision tree, sub-agent strategy, safety rules, and error-reference.md - Fix RegenSdkLocal.ps1 invocations to use named -Services parameter (lines 129/133 in iteration cycle section) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eferences - ApiCompat TypesMustExist can be fixed spec-side with @@clientName when the type was just renamed; only truly changed APIs need custom code shims - Fix skill name azure-sdk-pr-review → azure-sdk-mgmt-pr-review (4 refs) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
haiyuazhang
approved these changes
Mar 5, 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.
Summary
Enhances the
mpg-sdk-migrationCopilot skill to enable autonomous operation during the build-fix loop. Copilot can now work through build errors — including spec fixes, generator fixes, and custom code additions — without asking the user, following structured decision trees.Changes
SKILL.md
RegenSdkLocal.ps1regeneration + cleanup of stale custom code workaroundsapi/*.cs, compare with generated names, filter out automatic renames, add only missing@@clientNamedecoratorsclient.tspspec changes and custom code additions without asking; clear escalation boundaries for non-client.tsp changesazure-sdk-pr-review→azure-sdk-mgmt-pr-review(4 occurrences)Url→Uri,Etag→ETagCreated,Deletion→Deleted,Expiration→Expire,Modification→Modified)Sku,SkuName,SkuTier,SkuFamily,SkuInformation,Plan,Usage,Kind,PrivateEndpointConnection,PrivateLinkResource, etc.){Resource}Patch/{Resource}CreateOrUpdateContent)@@alternateTypedecorator throughout: Phase 3 directive mapping, Phase 8 error classification/decision tree, sub-agent strategy, safety rulesRegenSdkLocal.ps1syntax — added missing-Servicesnamed parameterTypesMustExistcan be fixed spec-side with@@clientNamewhen the type was just renamed; only truly changed APIs need custom code shims[CodeGenType]/[CodeGenSuppress]/[CodeGenMember]are needed — plain partial classes do not need any attributes; each attribute has a specific use caseerror-reference.md (342 → ~65 lines)
@@alternateTypefor CS1729/CS1503 type mismatch errors