[AutoPR @azure-arm-subscriptions]-generated-from-SDK Generation - JS-6054106#37800
[AutoPR @azure-arm-subscriptions]-generated-from-SDK Generation - JS-6054106#37800azure-sdk wants to merge 1 commit into
Conversation
…t.Subscription/Subscription/tspconfig.yaml', API Version: 2025-11-01-preview, SDK Release Type: beta, and CommitSHA: '431a0488ba8f92835169ffd9d9cc352f6ae568be' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6054106 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
3 issues found in @azure/arm-subscriptions 7.0.0-beta.1: 1 tool issue (autoPublish: false in package.json) and 2 API design issues (AzureClouds enum members use UPPER_SNAKE_CASE instead of PascalCase; AzureSupportedClouds is a closed template literal type instead of string). No naming collisions, alpha version references, or version mismatches detected. CI checks are currently in-progress.
📊 Structured Report
{"agent":"mgmt-reviewer","pr":37800,"summary":"issues_found","findings":[{"file":"sdk/subscription/arm-subscriptions/package.json","line":9,"issueType":"tool","category":"configuration","description":"autoPublish is false; should be true to enable automated publishing"},{"file":"sdk/subscription/arm-subscriptions/review/arm-subscriptions-node.api.md","line":76,"issueType":"design","category":"naming","description":"AzureClouds enum members use UPPER_SNAKE_CASE instead of PascalCase"},{"file":"sdk/subscription/arm-subscriptions/review/arm-subscriptions-node.api.md","line":83,"issueType":"design","category":"type-safety","description":"AzureSupportedClouds is a closed template literal type constrained to AzureClouds; should be string"}]}⚡ Benchmarked by Management SDK PR Review
| export enum AzureClouds { | ||
| AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", | ||
| AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", | ||
| AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" | ||
| } | ||
|
|
||
| // @public |
There was a problem hiding this comment.
🔴 Design Issue — arm-subscriptions-node.api.md:76-82
export enum AzureClouds {
AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
}Enum members use UPPER_SNAKE_CASE instead of the required PascalCase naming convention for Azure SDK TypeScript enums.
Fix: Apply @clientName decorators in the TypeSpec spec to rename the members to PascalCase (e.g., AzureChinaCloud, AzurePublicCloud, AzureUsGovernment). This is a spec change in azure-rest-api-specs.
| "@azure/core-rest-pipeline": "^1.19.1", | ||
| "tslib": "^2.8.1" | ||
| "sideEffects": false, | ||
| "autoPublish": false, |
There was a problem hiding this comment.
🔴 Tool Issue — package.json:9
"autoPublish": false
This package has autoPublish set to false, which disables automated publishing. Management SDK packages should have autoPublish: true unless there is a deliberate reason to hold the release.
Fix: Change "autoPublish": false to "autoPublish": true, or file an issue in the generation tool repository if this was generated incorrectly.
|
|
||
| // @public | ||
| export type AliasListResponse = SubscriptionAliasListResult; | ||
| export type AzureSupportedClouds = `${AzureClouds}`; |
There was a problem hiding this comment.
🔴 Design Issue — arm-subscriptions-node.api.md:83
export type AzureSupportedClouds = `\$\{AzureClouds}`;AzureSupportedClouds is defined as a closed template literal type constrained to AzureClouds enum values. This prevents callers from passing future or custom cloud strings without a breaking change. Per Azure SDK guidelines, extensible string union types should be string.
Fix: Change the type definition to export type AzureSupportedClouds = string; in the TypeSpec spec, or report this as a generation tool issue at autorest.typescript.
Breaking Change Analysis: @azure/arm-subscriptions 7.0.0-beta.1
Spec References:
Type 2: TypeSpec / Emitter Migration -- 6 items
Details
Open Questions
Total: 0 (Type 1: API Version Upgrade) + 6 (Type 2: TypeSpec/Emitter Migration) = 6 breaking changes Type 2 breakdown: 0 items from TypeSpec conversion, 6 items from emitter differences. 4 of 6 items match architect-approved patterns. 2 items (ErrorResponse structural change) need reviewer attention. |
## What this PR does Adds a new Copilot agent (\mgmt-breaking-change-analysis\) that analyzes breaking changes in ARM management SDK PRs migrating from Swagger/AutoRest to TypeSpec/emitter. ### Files - **\.github/agents/mgmt-breaking-change-analysis.agent.md\** -- Agent definition with mandatory execution protocol, phase skeleton, state tracking, cascade detection checklist, pattern matching step, and validation rules - **\.github/prompts/mgmt-breaking-change-analysis-guidelines.md\** -- Detailed workflow instructions covering context gathering, CHANGELOG extraction, root cause investigation (with cascade detection algorithm), four-layer swagger comparison model, sub-agent delegation, and report templates - **\.github/prompts/mgmt-breaking-change-patterns.md\** -- Lookup table of 10 architect-approved breaking change patterns for the HLC-to-Modular migration (sourced from autorest.typescript issues) ### How it works The agent follows a structured multi-phase workflow: 1. **Phase 1: Gather Context** -- Extract PR metadata, build per-service API version map, locate four spec layers (old swagger, new swagger pre-TypeSpec, TypeSpec-generated swagger, SDK api.md) 2. **Phase 2: Extract Breaking Changes** -- Parse CHANGELOG entries from PR branch 3. **Phase 3: Root Cause Analysis** -- Investigate model-level changes first, signature entries last; build broken_models set and type dependency graph; detect cascading breakings through nested type references 4. **Phase 4: Pattern Matching** -- Match Type 2 (migration-related) root causes against architect-approved patterns to pre-fill the Accepted column 5. **Phase 5: Self-Review Checklist** -- Review root cause depth and cascade completeness 6. **Phase 5: Verification and Report** -- Verify all entries classified (Type 1 + Type 2 = total), build structured report ### Key design decisions - **Agent as control plane**: The agent file defines mandatory execution steps and validation rules. The guidelines file serves as the knowledge base with full procedural details. This separation ensures the agent always follows the workflow. - **Explicit state tracking**: The agent externalizes intermediate results (broken_models, type_dependency_graph, classified_entries) after each phase to maintain consistency across long analysis chains. - **Cascade detection checklist**: Every 'new signature' entry requires documenting 4 checks (direct params, options changes, cascade from broken models, emitter differences) to prevent premature attribution. ### Scope - ARM management SDK packages migrating from Swagger/AutoRest to TypeSpec/emitter only - Not applicable to data-plane SDKs, RLC packages, or hand-written SDKs ### Examples: Subscriptions: #37800 (comment) Monitor: #38213 (comment) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configurations: 'specification/subscription/resource-manager/Microsoft.Subscription/Subscription/tspconfig.yaml', API Version: 2025-11-01-preview, SDK Release Type: beta, and CommitSHA: '431a0488ba8f92835169ffd9d9cc352f6ae568be' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6054106 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.