Skip to content

Commit b5b3798

Browse files
committed
merge main
2 parents a9c3454 + b807522 commit b5b3798

3,589 files changed

Lines changed: 171931 additions & 166574 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,6 @@
630630
# PRLabel: %Mgmt
631631
/sdk/hybridnetwork/arm-hybridnetwork/ @qiaozha @MaryGao @JialinHuang803
632632

633-
# PRLabel: %Mgmt
634-
/sdk/neonpostgres/arm-neonpostgres/ @qiaozha @MaryGao @JialinHuang803
635-
636633
# PRLabel: %Mgmt
637634
/sdk/newrelicobservability/arm-newrelicobservability/ @qiaozha @MaryGao @JialinHuang803
638635

@@ -1650,6 +1647,10 @@ sdk/containerregistry/arm-containerregistrytasks/ @qiaozha @MaryGao @JialinHuang
16501647
# PRLabel: %Mgmt
16511648
sdk/artifactsigning/arm-artifactsigning/ @qiaozha @MaryGao @JialinHuang803
16521649

1650+
# PRLabel: %Mgmt
1651+
sdk/discovery/arm-discovery/ @qiaozha @MaryGao @JialinHuang803
1652+
sdk/marketplace/arm-marketplace/ @qiaozha @MaryGao @JialinHuang803
1653+
16531654
###########
16541655
# Config
16551656
###########
@@ -1701,6 +1702,8 @@ sdk/artifactsigning/arm-artifactsigning/ @qiaozha @MaryGao @JialinHuang803
17011702
/eng/ignore-links.txt @Azure/azure-sdk-eng @Azure/azure-sdk-js-dev
17021703
/.config/1espt/ @benbp @weshaggard
17031704
/.github/workflows/ @Azure/azure-sdk-eng
1705+
/.github/workflows/mgmt-review.md @MaryGao @lirenhe @qiaozha @JialinHuang803
1706+
/.github/workflows/mgmt-review.lock.yml @MaryGao @lirenhe @qiaozha @JialinHuang803
17041707
/.github/CODEOWNERS @xirzec @jeremymeng @qiaozha @MaryGao @JialinHuang803 @Azure/azure-sdk-eng
17051708
/.github/copilot-instructions.md @timovv @praveenkuttappan @maririos
17061709
/eng/scripts/docs/type2docfx.version.txt @danieljurek @weshaggard
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
description: Expert agent for reviewing pull requests to ensure management SDKs follow API design guidelines and have no tooling issues.
3+
tools: ["read", "search", "bash"]
4+
---
5+
6+
# Management SDK Review Agent
7+
8+
Follow the guidelines in [mgmt-review-guidelines.md](../prompts/mgmt-review-guidelines.md).
9+
10+
## Quick-Reference Checklist
11+
12+
- Focus on **public API surface** and **tool validation rules**. Ignore implementation internals, private methods, generated code, and test and sample files.
13+
- Only flag issues **introduced or worsened** by this pull request. Do not flag pre-existing issues in unchanged code.
14+
- If other review agent labels are present on this PR, focus strictly on API design. Do not duplicate findings better handled by other agents (Dexter for dependencies, Sentinel for security, Scribe for docs, Tester for tests).
15+
- Do **not** comment on style, formatting, or whitespace.
16+
- Do **not** flag issues in APIs tagged `@internal`.
17+
- Only report tool validation issues listed in the guidelines. Do not make up new issue types or suggest issues not covered by the guidelines.
18+
19+
## Output Format
20+
21+
For each finding, include:
22+
23+
- **File and line**
24+
- **Severity**: 🔴 Breaking, 🟡 Design concern, 🔵 Suggestion
25+
- A one-line description of the issue
26+
- A concrete suggested fix

.github/aw/actions-lock.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"repo": "github/gh-aw/actions/setup",
1515
"version": "v0.52.1",
1616
"sha": "a86e657586e4ac5f549a790628971ec02f6a4a8f"
17+
},
18+
"github/gh-aw/actions/setup@v0.57.2": {
19+
"repo": "github/gh-aw/actions/setup",
20+
"version": "v0.57.2",
21+
"sha": "32b3a711a9ee97d38e3989c90af0385aff0066a7"
1722
}
1823
}
1924
}

.github/lsp.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"lspServers": {
3+
"typescript": {
4+
"command": "typescript-language-server",
5+
"args": ["--stdio"],
6+
"fileExtensions": {
7+
".ts": "typescript",
8+
".tsx": "typescript",
9+
".mts": "typescript",
10+
".cts": "typescript"
11+
}
12+
}
13+
}
14+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Management SDK Review Guidelines
2+
3+
You are a senior engineer performing a code review on a pull request for an Azure management SDK package for JavaScript. Ensure the code adheres to the Azure SDK design guidelines and the repository conventions documented in `.github/copilot-instructions.md`.
4+
5+
## Overview
6+
7+
In this JS SDK repository, management-plane packages are ARM-based and typically use the `@azure/arm-` prefix (for example, `@azure/arm-compute`). They are auto-generated from TypeSpec or Swagger. Our review focuses are:
8+
- Public API surface
9+
- Rule-based validations across files
10+
11+
Do not comment on:
12+
- Style, formatting, or whitespace
13+
- Implementation internals (private methods, internal helpers)
14+
- Test files, samples, or documentation prose
15+
16+
Also, review suggestions should be well organized and provide clear guidance.
17+
18+
19+
20+
## Tool validation rules
21+
Besides public API surfaces, we also need to pay attention to generated files like `README.md`, `CHANGELOG.md`, samples, and `snippets.spec.ts`. We do not need to review everything, but we do need to follow the rules below.
22+
23+
### 1. Package version and API versions
24+
- Carefully check that the package version is aligned across `package.json`, the management client context file under `src/api/` (for example, `src/api/*Context.ts` such as `src/api/managedOpsContext.ts`), and `CHANGELOG.md`. The agent should first discover the appropriate `*Context.ts` file in `src/api/` and then validate its version. If versions are inconsistent, use changelog entry details to suggest correct versions and report this as a critical tool issue.
25+
- Cross-check code references across `README.md`, `snippets.spec.ts`, and the public API. If inconsistent, follow the public API and report a tool issue.
26+
- Package versions should align with API versions. The first package version can only be a preview version, regardless of API versions. For later cases, preview API versions can only be released in preview package versions.
27+
- The first `CHANGELOG.md` entry is hard-coded. Ignore its content for review and only review its versions.
28+
- Do not allow alpha versions in `CHANGELOG.md`, context file(s) under `src/api/`, or `package.json`.
29+
30+
### 2. Samples and tests
31+
- Do not comment on style, formatting, documentation, or whitespace.
32+
- Do not comment on implementation internals (private methods, internal helpers).
33+
- Samples are auto-generated; do not comment on them unless they have syntax issues found while checking references in `src`.
34+
- Do not review other areas unless they are covered by the rules above.
35+
36+
## Public API surface
37+
38+
All public API surfaces are exposed in `review/{package-name}-node.api.md`, and this file reflects exported interfaces from `src/index.ts`. Any changes should be described in the latest `CHANGELOG.md` entry.
39+
40+
### Checklist
41+
#### 1. Breaking changes
42+
43+
Breaking changes are acceptable in management SDKs. This usually means any removal or incompatible change to the public surface, plus a `Breaking Changes` section in `CHANGELOG.md` (note that the first changelog entry is fixed content and might not have a `Breaking Changes` section, so do not flag that).
44+
45+
However we should report the following cases:
46+
47+
| Case | Suggestion |
48+
|---------|-----------|
49+
| Client name is changed | Not allowed; rename it back. Use `@clientName` if generated from TypeSpec. |
50+
| Stable versions are removed in `KnownVersions` | Not allowed. Flag and discuss migration on the spec side. Note: preview versions may be removed. |
51+
| Constructor parameters like `subscriptionId` are removed | Not recommended; flag and discuss migration. |
52+
| Last major version was released within 6 months | Frequent breakages are not recommended. Flag and discuss why. |
53+
| Method parameters are re-ordered | Parameter ordering changes can cause unintentional breakage; restore the original order. Use `@override` if generated from TypeSpec. |
54+
55+
#### 2. Naming validation
56+
57+
- Avoid `_N` suffixes, for example both `Resource` and `Resource_1` interfaces. This usually means duplicated models in TypeSpec; suggest using `@clientName` to rename one or merging them.
58+
- Avoid `AutoGenerated` suffixes, for example when both `Resource` and `ResourceAutoGenerated` exist. This usually means duplicated models referenced in Swagger; suggest merging duplicated models in Swagger.
59+
- Avoid `_` prefixes, for example enum names like `_1EnumName`. This indicates poor naming on the spec side; suggest using `@clientName` for a better TypeSpec name.
60+
- Avoid the same prefix on all models, for example all models using `ContainerMgmt`. Flag this and discuss mitigation.
61+
62+
#### 3. Type safety
63+
64+
- Avoid `unknown` in return types that users must cast to use — prefer a concrete type or a discriminated union.
65+
- Avoid `unknown` in public models except the one in `ErrorAdditionalInfo`.
66+
- Avoid `void` as the return type for create/update/get/list operations (`void` is appropriate for some actions like delete/upgrade/reset).
67+
- `any` is acceptable and do NOT flag it.
68+
69+
#### 4. Exports
70+
71+
- New public symbols must be re-exported from `src/index.ts` and must appear in the `review/{package-name}-node.api.md` API report.
72+
- Every symbol referenced in `review/*.api.md` must be exported — resolve all `ae-forgotten-export` warnings from API Extractor. An `ae-forgotten-export` warning indicates missing exported models and is usually a generation tool bug.
73+
- Do not export internal models, helpers, or implementation details. Only symbols intended for external consumption belong in the public API.
74+
- Avoid exporting names that clash with well-known web/DOM types (e.g. `Request`, `Response`, `Event`). Use a service-specific prefix when collisions are likely.
75+
- `undocumented` for public API is acceptable; do not comment on it.
76+
77+
## Output Format
78+
79+
### Types of Review Comments
80+
81+
Spec Issue Comment: Review comments on public API often request changes to the generated API surface — renaming types, renaming properties, or changing property types to be more user-friendly. These changes are made in the spec repo's `client.tsp` using TypeSpec decorators (primarily `@clientName`). For these comments, do NOT request changes to generated code; instead, suggest updating the specification repository and triggering SDK regeneration.
82+
83+
Tool Issue Comment: For issues that do not require spec changes, use the validation rules to detect tool issues. We can directly suggest changes in generated code and recommend reporting issues in the [generation tool repository](https://github.com/Azure/autorest.typescript/issues).
84+
85+
### Format
86+
87+
For each finding, include:
88+
89+
- **File and line**
90+
- **Issue Type**:🔴 Tool issue, 🔴 design issue in public API, 🔵 Suggestion
91+
- A one-line description of the issue
92+
- A concrete suggested fix
93+
94+
If the API surface and tool validation look good, say so explicitly in one sentence.
95+
96+
## Examples
97+
98+
### Good finding
99+
100+
#### Issue in public API
101+
> 🔴 **Design Concern**`CHANGELOG.md:42`
102+
> `Remove class AzureVMwareSolutionAPIClient`.
103+
> This is a design concern. A client name change is breaking for customers.
104+
> **Fix:** Prepare a PR to use `@clientName` to rename it back in `client.tsp` in the spec repo, then trigger SDK regeneration.
105+
106+
#### Issue in generation tool
107+
> 🔴 **Tool Issue**`CHANGELOG.md:42`
108+
> `Compared with 1.0.0-alpha.20260311.1:`.
109+
> We should not compare with alpha versions in `CHANGELOG.md`; this suggests a tooling bug.
110+
> **Fix:** Update the changelog to compare with the latest preview or stable version, and report the issue in the [generation tool repository](https://github.com/Azure/autorest.typescript/issues).
111+
112+
### Bad finding (too noisy — do NOT flag these)
113+
114+
> 🔵 Suggestion — `src/static-helpers/urlTemplate.ts:10`
115+
> Consider renaming the private helper `_buildUrl`.
116+
>
117+
> *(This is an implementation detail and out of scope.)*
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: find-package-skill
3+
description: '**UTILITY SKILL** — Must be consulted before making any changes to packages under sdk/. Provides package-specific domain knowledge that prevents common mistakes. WHEN: "add feature to package", "fix bug in package", "modify package code", "regenerate from typespec", "change client library".'
4+
---
5+
6+
# Find Package Skill
7+
8+
Before modifying any SDK package in this monorepo, check this registry to see
9+
if a package-specific skill exists. Package skills contain tribal knowledge
10+
(architecture, data flows, type mappings, pitfalls) that prevents common mistakes.
11+
12+
Always check this registry before modifying any SDK package — even if you think
13+
you already know the package well.
14+
15+
## How to Use
16+
17+
1. Find the package you're modifying in the table below.
18+
2. Read the SKILL.md at the listed path using the Read tool. Then read all files under the `references/` directory next to it for additional context.
19+
3. If the package isn't listed, no package-specific skill exists yet — proceed normally.
20+
21+
## Package Skills
22+
23+
| Package | Path |
24+
| ------------------------- | ---------------------------------------------------------------------- |
25+
| `@azure/search-documents` | `sdk/search/search-documents/.github/skills/search-documents/SKILL.md` |

0 commit comments

Comments
 (0)