Skip to content

Commit 7bc3527

Browse files
committed
Merge branch 'main' into feature/foundry-release-main-merge
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2 parents 0225bb9 + da8db6e commit 7bc3527

10,696 files changed

Lines changed: 1145052 additions & 194475 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: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
/specification/asazure/ @athipp
4343

4444
# PRLabel: %Authorization
45-
/specification/authorization/ @darshanhs90
45+
/specification/authorization/ @jruttle @abaccin @denyspanov-public @chocomochiko
4646

4747
# PRLabel: %Automation
4848
/specification/automation/ @vrdmr
@@ -290,31 +290,32 @@
290290
###########
291291
# Eng Sys
292292
###########
293-
/.gitattributes @weshaggard @mikeharder
294-
/.gitignore @weshaggard @mikeharder
295-
/.prettierrc.json @weshaggard @mikeharder
296-
/package-lock.json @weshaggard @mikeharder
297-
/package.json @weshaggard @mikeharder
298-
/tsconfig.json @weshaggard @mikeharder
299-
/.azure-pipelines/ @weshaggard @mikeharder @benbp
300-
/.github/ @weshaggard @mikeharder @benbp
301-
/.vscode/ @weshaggard @mikeharder @benbp
302-
/dev/ @weshaggard @mikeharder @benbp
303-
/eng/ @weshaggard @mikeharder @benbp
293+
/.gitattributes @mikeharder @benbp
294+
/.gitignore @mikeharder @benbp
295+
/.prettierrc.json @mikeharder @benbp
296+
/package-lock.json @mikeharder @benbp
297+
/package.json @mikeharder @benbp
298+
/tsconfig.json @mikeharder @benbp
299+
/.azure-pipelines/ @mikeharder @benbp
300+
/.github/ @mikeharder @benbp
301+
/.vscode/ @mikeharder @benbp
302+
/dev/ @mikeharder @benbp
303+
/eng/ @mikeharder @benbp
304304
/eng/common/ @Azure/azure-sdk-eng
305305
/eng/tools/typespec-migration-validation @pshao25 @live1206
306306
/eng/tools/typespec-validation/**/sdk-tspconfig-validation*.ts @marygao @raych1 @maririos
307-
/scripts/ @weshaggard @mikeharder
308-
/specification/suppressions.yaml @weshaggard @mikeharder @benbp @raych1 @marygao @maririos @qiaozha
307+
/scripts/ @mikeharder @benbp
308+
/specification/suppressions.yaml @mikeharder @benbp @raych1 @marygao @maririos @qiaozha
309309
/.github/CODEOWNERS @Azure/azure-sdk-eng
310310
/.github/skills @Azure/azure-sdk-eng @chunyu3 @lirenhe @ArthurMa1978 @haolingdong-msft
311311

312312
## Copilot
313313

314-
/.github/copilot-instructions.md @praveenkuttappan @maririos
315-
/.github/prompts/ @praveenkuttappan @maririos
316-
/.github/instructions/ @praveenkuttappan @maririos
317-
/.github/chatmodes/ @praveenkuttappan @maririos
314+
/.github/copilot-instructions.md @praveenkuttappan @maririos
315+
/.github/copilot-review-instructions.md @ravimeda @praveenkuttappan
316+
/.github/prompts/ @praveenkuttappan @maririos
317+
/.github/instructions/ @praveenkuttappan @maririos
318+
/.github/chatmodes/ @praveenkuttappan @maririos
318319

319320
## ARM API Reviewer
320321

.github/agents/arm-api-reviewer.agent.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ After presenting the review findings to the human reviewer for approval:
314314
The existing comment already covers the exact same rule violation on the same file and line. **Skip posting.** No action needed.
315315

316316
**Scenario B - Same finding, different line, comment was from _this agent or the same engineer running the agent_:**
317-
The code has shifted (e.g., lines were added/removed) and the existing comment now points to an outdated line, but the violation still exists at a new location. **Resolve the outdated comment** (to reduce noise) and **post a new comment at the correct line** with the updated finding. In the new comment, reference the resolved thread (e.g., "_(Updated from previous comment at \<url\> - line shifted due to code changes.)_"). To identify whether an existing comment was posted by this agent, check if its body contains the hidden marker `<!-- posted-by: arm-api-reviewer-agent -->`. Comments with this marker are agent-posted; comments without it are from human reviewers (apply Scenario C instead).
317+
The code has shifted (e.g., lines were added/removed) and the existing comment now points to an outdated line, but the violation still exists at a new location. **Resolve the outdated comment** (to reduce noise) and **post a new comment at the correct line** with the updated finding. In the new comment, reference the resolved thread (e.g., "_(Updated from previous comment at \<url\> - line shifted due to code changes.)_"). To identify whether an existing comment was posted by this agent, check if its body contains the substring `posted-by: arm-api-reviewer-agent`. Comments with this substring are agent-posted; comments without it are from human reviewers (apply Scenario C instead).
318318

319319
**Scenario C - Same finding, different line, comment was from a _different_ human reviewer:**
320-
Another ARM reviewer (not this agent) posted the comment at the old line -- i.e., the comment body does **not** contain `<!-- posted-by: arm-api-reviewer-agent -->`. Do **not** resolve their comment - it is their review thread and they may be tracking the conversation. Do **not** post a duplicate comment. Instead, **add a reply** to the existing thread noting the line shift: e.g., "_The code referenced by this comment has moved. The same violation now appears at `<file>` - line <N>. The issue is still unresolved._" This helps the author and reviewer find the right code without creating duplicate threads.
320+
Another ARM reviewer (not this agent) posted the comment at the old line -- i.e., the comment body does **not** contain the substring `posted-by: arm-api-reviewer-agent`. Do **not** resolve their comment - it is their review thread and they may be tracking the conversation. Do **not** post a duplicate comment. Instead, **add a reply** to the existing thread noting the line shift: e.g., "_The code referenced by this comment has moved. The same violation now appears at `<file>` - line <N>. The issue is still unresolved._" This helps the author and reviewer find the right code without creating duplicate threads.
321321

322322
**Scenario D - No new findings beyond what existing comments already cover:**
323323
If every finding from the current review is already covered by an existing comment (same file, same or nearby line, same rule), **do not post any new comments**. Report to the human reviewer: "_All findings from this review are already covered by existing comments on the PR. No new comments are needed - the existing threads already highlight the required changes._" List the existing comment threads that match, **including the comment URL** for each so the reviewer can click through and verify.
@@ -333,7 +333,22 @@ After presenting the review findings to the human reviewer for approval:
333333
5. Every posted comment **MUST** clearly tag the issue as `[NEW]` or `[EXISTING]` with an explanation of the classification (e.g., "This issue also exists in `2025-12-01-preview` at the same JSON path" or "Introduced in this PR - this property did not exist in the previous version").
334334
6. For `[NEW]` issues, include the severity level: `🔴 Blocking`, `🟡 Warning`, or `💡 Suggestion`.
335335
7. Use the format: ``**[NEW] 🔴 Blocking** **[<Rule ID>]** `<file-path>` - line <N> - <issue description>`` or ``**[EXISTING]** **[<Rule ID>]** `<file-path>` - line <N> - <issue description>`` followed by the classification reasoning and suggested fix.
336-
8. Every posted comment **MUST** end with the hidden HTML marker `<!-- posted-by: arm-api-reviewer-agent -->` as the very last line of the comment body. This marker is invisible in rendered markdown but enables querying agent-posted comments via the GitHub API and distinguishing them from manually posted comments during reconciliation. Do not omit this marker.
336+
8. Every posted comment **MUST** end with a hidden HTML telemetry marker as the very last line of the comment body. The marker format is:
337+
338+
```html
339+
<!-- posted-by: arm-api-reviewer-agent | rule: <RULE-ID> | severity: blocking|warning|suggestion | classification: new|existing -->
340+
```
341+
342+
- **`rule`**: The rule ID of the finding (e.g., `RPC-Put-V1-01`, `OAPI027`, `SEC-SECRET-DETECT`). Use `summary` for summary comments that don't flag a single rule.
343+
- **`severity`**: One of `blocking`, `warning`, or `suggestion`.
344+
- **`classification`**: One of `new` (introduced in this PR) or `existing` (pre-existing technical debt).
345+
346+
Example: `<!-- posted-by: arm-api-reviewer-agent | rule: RPC-Put-V1-11 | severity: blocking | classification: new -->`
347+
348+
This marker is invisible in rendered markdown but enables querying agent-posted comments via the GitHub API, computing telemetry (comments per day, top rule violations, new-vs-existing ratio), and distinguishing agent comments from human comments during reconciliation. Do not omit this marker. All fields after `posted-by` are required.
349+
350+
**Backward compatibility:** To detect whether an existing comment was posted by this agent (e.g., during reconciliation in Scenarios B and C), check if the comment body contains the substring `posted-by: arm-api-reviewer-agent`. This matches both the old simple marker and the new extended marker.
351+
337352
9. Prioritize posting **New** issues first, as these are the PR author's direct responsibility.
338353
10. **Report a reconciliation summary** to the human reviewer before posting:
339354
- Findings to **post as new comments** (with line numbers)
@@ -356,6 +371,24 @@ After successfully posting review comments to the PR:
356371
4. If the PR does not have the `WaitForARMFeedback` label, skip the removal step and only propose adding `ARMChangesRequested`.
357372
5. Report to the human reviewer which labels were added and removed.
358373

374+
### Step 9: Clean Up Local Workspace
375+
376+
If the review required creating any local artifacts to inspect the PR (typically a Git worktree and/or local branch tracking the PR's head ref - for example, when the PR is too large for `gh pr diff` to handle), **clean these up at the end of the review**, after the comments have been posted (Step 7) and labels updated (Step 8).
377+
378+
1. **Inventory** anything created during this session:
379+
- Local branches matching `pr-<number>` or similar patterns created by you.
380+
- Worktrees created by you (e.g., `<repo>/../specs-pr-<number>`).
381+
- Temporary files written to the workspace root (e.g., `review-payload.json`, `review-body.txt`).
382+
2. **Confirm the user is not still using them.** If `git status` in the worktree shows uncommitted work, ask the user before removing.
383+
3. **Remove** the artifacts (PowerShell):
384+
- `git worktree remove <worktree-path>`
385+
- `git branch -D <branch-name>`
386+
- `Remove-Item ./review-payload.json, ./review-body.txt -ErrorAction SilentlyContinue`
387+
4. **Do not** touch branches, worktrees, or files that pre-existed the review (e.g., the user's working branch, unrelated worktrees, the user's stashes).
388+
5. **Report** what was cleaned up to the user.
389+
390+
This keeps the user's workspace tidy and prevents accumulation of stale `pr-*` branches across reviews.
391+
359392
## Constraints
360393

361394
- **Read-only.** This agent does not modify specification files. Its job is to flag issues and suggest fixes, not apply them.
@@ -366,6 +399,7 @@ After successfully posting review comments to the PR:
366399
- **Clean specs get clean reports.** If after thorough review a specification has no blocking violations, explicitly state that no blocking issues were found. Do not downgrade compliant patterns into violations. For example: a spec that correctly uses common-types, has all required CRUD operations, includes `provisioningState` with the right terminal states, and follows naming conventions should receive a clean bill of health -- not a list of fabricated issues. The absence of findings is a valid review outcome.
367400
- **Scope boundaries.** Do not review SDK code, pipeline configs, or infrastructure files. Only review specification artifacts (OpenAPI JSON, TypeSpec `.tsp`, `tspconfig.yaml`, examples, readmes for AutoRest config).
368401
- **Always compare versions.** When a previous API version exists in the repository, load it and check for breaking changes. Do not skip this step.
402+
- **Clean up after yourself.** Any local branches, worktrees, or temporary files you create to inspect a PR MUST be removed at the end of the review (see Step 9). Never leave stale `pr-*` branches or scratch JSON payloads in the user's workspace.
369403

370404
## Example Prompts
371405

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.AIGrounding
3+
startdate: "2026-05-20"
4+
duration: P180D
5+
reviewer: "@vikeshi26"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.AzureResilienceManagement
3+
startdate: "2026-05-21"
4+
duration: P180D
5+
reviewer: "@tejaswiminnu"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.DeviceUpdate
3+
startdate: "2026-05-21"
4+
duration: P180D
5+
reviewer: "@vikeshi26"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.Migrate
3+
startdate: "2026-05-21"
4+
duration: P180D
5+
reviewer: "@vikeshi26"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.Monitor
3+
startdate: "2026-05-14"
4+
duration: P120D
5+
reviewer: "@tejaswiminnu"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: PaloAltoNetworks.Cloudngfw
3+
startdate: "2026-05-18"
4+
duration: P120D
5+
reviewer: "@tejaswiminnu"
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
lease:
2+
resource-provider: Microsoft.ProgramEnrollment
3+
startdate: "2026-05-20"
4+
duration: P120D
5+
reviewer: "@tejaswiminnu"

0 commit comments

Comments
 (0)