Skip to content

[TypeSpec Requirement] Block all PRs adding swagger in a new API version#42823

Closed
mikeharder wants to merge 30 commits into
Azure:mainfrom
mikeharder:tsr-v2
Closed

[TypeSpec Requirement] Block all PRs adding swagger in a new API version#42823
mikeharder wants to merge 30 commits into
Azure:mainfrom
mikeharder:tsr-v2

Conversation

@mikeharder
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ The required check named Swagger Avocado has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

mikeharder and others added 24 commits May 1, 2026 01:53
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
mikeharder and others added 2 commits May 4, 2026 20:58
Co-authored-by: Copilot <copilot@github.com>
@mikeharder mikeharder self-assigned this May 5, 2026
@mikeharder mikeharder moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 May 5, 2026
@mikeharder mikeharder moved this from 🔬 Dev in PR to 🐝 Dev in Azure SDK EngSys 🚀🌒🧑‍🚀 May 5, 2026
ravimeda added a commit that referenced this pull request May 8, 2026
…iewer (TSP-REQUIRED-V1) (#42846)

* Encode TypeSpec-required policy for new API versions into ARM API Reviewer (TSP-REQUIRED-V1)

Adds rule `TSP-REQUIRED-V1` to the ARM API Reviewer agent so it flags PRs
that introduce a new API version directory containing only handwritten
OpenAPI swagger. Updates to handwritten swagger inside pre-existing API
version directories are explicitly permitted and are not flagged.

The full rule definition (severity, three detection signals, fix, and
false-positive guidance) lives in
`.github/instructions/openapi-review.instructions.md` §2A. Cross-references
are added to the ARM and TypeSpec instruction files so the rule is visible
on every review path. The agent's Step 3 (Breaking Change Comparison) is
augmented to apply the check while it is already inspecting the previous
version folder.

Eval coverage: a new category (12xxxx) with three stimuli — violation
case (handwritten new version flagged), TypeSpec-generated new version
(true negative), and maintenance edit to an existing handwritten version
(true negative).

This is the agent-side companion to the deterministic CI check tracked in
PR #42823. It can land independently and remain in place after that check
ships, with the agent rule serving as the descriptive surface (severity,
fix, rule ID) for review feedback.

### Files changed

| File | Change |
| --- | --- |
| `.github/instructions/openapi-review.instructions.md` | New §2A defining `TSP-REQUIRED-V1` (policy, three detection signals, severity, fix, false-positive avoidance). New checklist bullet. |
| `.github/instructions/armapi-review.instructions.md` | New §0 cross-reference summarizing the rule for ARM PRs. New "Authoring Format" checklist section. |
| `.github/instructions/typespec-review.instructions.md` | §9.1 rewritten — drops future-tense Q4 FY26 wording, points to the canonical rule definition, confirms maintenance edits to existing handwritten OpenAPI remain permitted. Checklist line updated. |
| `.github/agents/arm-api-reviewer.agent.md` | Step 3 augmented with the TypeSpec-required check, reusing the existing previous-version lookup. |
| `.github/cspell.yaml` | Added `handwrittensvc`, `legacysvc`, `tspgenservice` to the eval-suite per-file dictionary. |
| `.github/skills/evals/arm-api-reviewer/evaluate/eval-typespec-required.yaml` | New eval category 12xxxx — three stimuli for `TSP-REQUIRED-V1`. |
| `.github/skills/evals/arm-api-reviewer/fixtures/arm-openapi/typespec-generated-spec.json` | Compliant ARM spec with the `x-typespec-generated` extension at the top level (true-negative fixture). |
| `.github/skills/evals/arm-api-reviewer/.vally.yaml`, `README.md`, `run-evals.ps1`, `fixtures/README.md` | Eval-suite metadata: 28 → 31 stimuli, 11 → 12 eval files, 14 → 15 ARM OpenAPI fixtures. |

### Validation

- `cspell` passes on all changed files
- `prettier --check` passes on all changed files

### Related

- PR #42823 — deterministic CI check that blocks PRs adding swagger in a new API version (in development)
- eng.ms TypeSpec policy: https://eng.ms/docs/products/azure-developer-experience/design/api-specs/api-typespec

* Enhance line number pattern matching in eval report format to support additional citation formats
saprakas pushed a commit to iyyappam/azure-rest-api-specs that referenced this pull request May 12, 2026
…iewer (TSP-REQUIRED-V1) (Azure#42846)

* Encode TypeSpec-required policy for new API versions into ARM API Reviewer (TSP-REQUIRED-V1)

Adds rule `TSP-REQUIRED-V1` to the ARM API Reviewer agent so it flags PRs
that introduce a new API version directory containing only handwritten
OpenAPI swagger. Updates to handwritten swagger inside pre-existing API
version directories are explicitly permitted and are not flagged.

The full rule definition (severity, three detection signals, fix, and
false-positive guidance) lives in
`.github/instructions/openapi-review.instructions.md` §2A. Cross-references
are added to the ARM and TypeSpec instruction files so the rule is visible
on every review path. The agent's Step 3 (Breaking Change Comparison) is
augmented to apply the check while it is already inspecting the previous
version folder.

Eval coverage: a new category (12xxxx) with three stimuli — violation
case (handwritten new version flagged), TypeSpec-generated new version
(true negative), and maintenance edit to an existing handwritten version
(true negative).

This is the agent-side companion to the deterministic CI check tracked in
PR Azure#42823. It can land independently and remain in place after that check
ships, with the agent rule serving as the descriptive surface (severity,
fix, rule ID) for review feedback.

### Files changed

| File | Change |
| --- | --- |
| `.github/instructions/openapi-review.instructions.md` | New §2A defining `TSP-REQUIRED-V1` (policy, three detection signals, severity, fix, false-positive avoidance). New checklist bullet. |
| `.github/instructions/armapi-review.instructions.md` | New §0 cross-reference summarizing the rule for ARM PRs. New "Authoring Format" checklist section. |
| `.github/instructions/typespec-review.instructions.md` | §9.1 rewritten — drops future-tense Q4 FY26 wording, points to the canonical rule definition, confirms maintenance edits to existing handwritten OpenAPI remain permitted. Checklist line updated. |
| `.github/agents/arm-api-reviewer.agent.md` | Step 3 augmented with the TypeSpec-required check, reusing the existing previous-version lookup. |
| `.github/cspell.yaml` | Added `handwrittensvc`, `legacysvc`, `tspgenservice` to the eval-suite per-file dictionary. |
| `.github/skills/evals/arm-api-reviewer/evaluate/eval-typespec-required.yaml` | New eval category 12xxxx — three stimuli for `TSP-REQUIRED-V1`. |
| `.github/skills/evals/arm-api-reviewer/fixtures/arm-openapi/typespec-generated-spec.json` | Compliant ARM spec with the `x-typespec-generated` extension at the top level (true-negative fixture). |
| `.github/skills/evals/arm-api-reviewer/.vally.yaml`, `README.md`, `run-evals.ps1`, `fixtures/README.md` | Eval-suite metadata: 28 → 31 stimuli, 11 → 12 eval files, 14 → 15 ARM OpenAPI fixtures. |

### Validation

- `cspell` passes on all changed files
- `prettier --check` passes on all changed files

### Related

- PR Azure#42823 — deterministic CI check that blocks PRs adding swagger in a new API version (in development)
- eng.ms TypeSpec policy: https://eng.ms/docs/products/azure-developer-experience/design/api-specs/api-typespec

* Enhance line number pattern matching in eval report format to support additional citation formats
@mikeharder mikeharder closed this May 14, 2026
@github-project-automation github-project-automation Bot moved this from 🐝 Dev to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

1 participant